A method and system for monitoring ecological environment data based on data analysis
Through data analysis methods, combined with threshold segmentation and time series decomposition algorithms, the changes in heavy metal content in water areas are identified, which solves the problem of error in water quality monitoring data and improves the accuracy and reliability of monitoring data.
Patent Information
- Application Number
- CN202411280725.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-13
AI Technical Summary
The existing water quality heavy metal monitoring methods have errors in measuring heavy metal content due to the complexity of the basin and the self-repair ability of the water area, which reduces the accuracy and reliability of the monitoring data.
Using a data analysis method, by obtaining the change trend and distribution differences of heavy metal content at each sampling point, combining the threshold segmentation algorithm and the time series decomposition algorithm, the stationary interval and decreasing interval are determined, and the water level interference and monitoring availability are analyzed to improve the accuracy of the data. Sex and reliability.
It improves the accuracy and authenticity of changes in heavy metal content in water areas, reduces the impact of water level changes on monitoring data, and enhances the reliability and accuracy of monitoring data.
Smart Images

Figure CN118797368B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of water quality heavy metal monitoring, and specifically to an ecological environment data monitoring method and system based on data analysis. Background Art
[0002] In recent years, with the rapid development of industrialization and urbanization, monitoring of ecological environment conditions has become particularly important. Among the many contents of ecological environment monitoring, water quality monitoring is one of the important monitoring contents. Some untreated industrial wastewater is directly discharged into the river, resulting in excessive heavy metal content in the water. The river has a wide basin and a large impact range, which has a direct impact on the safety of water resources. Therefore, in order to better protect water resources, the heavy metal content in the basin is usually monitored in real time.
[0003] Normally, the detection of heavy metal content in water resources of a river basin will adopt a multi-point monitoring method, that is, multiple data sampling points are set up in the river basin to collect the heavy metal content of water resources. However, since river basins are usually more complex and water areas have a certain self-repair ability, the heavy metal content in water areas will decrease over time. In this case, the measured heavy metal content is reduced to a normal data change. The heavy metal content will also decrease temporarily over time due to environmental factors in the water area (such as rain, water level increase caused by tributary inflow, etc.). In this case, the measured heavy metal content cannot indicate the actual heavy metal content in the water area, resulting in a certain error in the detected heavy metal content, reducing the accuracy and reliability of the monitoring data. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of this application is to provide an ecological environment data monitoring method and system based on data analysis. The technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of the present application provides an ecological environment data monitoring method based on data analysis, the method comprising the following steps:
[0006] Within the preset total collection time, obtain the content of any type of heavy metal at each preset sampling point on the river to be monitored at all times, and divide the total collection time into each time period;
[0007] Based on the difference in the distribution of any type of heavy metal content between each sampling point and the other sampling points in each time period, and the difference in the change trend of the corresponding heavy metal content, determine the approximate change of any type of heavy metal content in each sampling point in each time period;
[0008] In each time period, based on the changing trend of any type of heavy metal content in each sampling point, all stable intervals and all decreasing intervals of any type of heavy metal in each sampling point are obtained in combination with the threshold segmentation algorithm;
[0009] Based on the change rate of the content of any type of heavy metal in each sampling point in each decreasing interval, combined with the approximation of the content change in all time periods, determine the credibility of the content of any type of heavy metal in each sampling point;
[0010] Based on the numerical differences and length differences in the content of any type of heavy metals in each sampling point and each adjacent downstream sampling point in different decreasing intervals, the first disturbance similarity of any type of heavy metal in each sampling point is determined;
[0011] Based on the difference in the distribution of any type of heavy metal content in each sampling point in two adjacent stable intervals of each decreasing interval, and the length of each decreasing interval of the same type of heavy metal, the second disturbance similarity of any type of heavy metal in each sampling point is determined, and combined with the first disturbance similarity and the content credibility, the monitoring availability of any type of heavy metal in each sampling point is determined, and the content of any type of heavy metal in the monitored river is monitored.
[0012] Preferably, the expression for the approximate change in the content of any type of heavy metal in each sampling point within each time period is: ; In the formula, It indicates the approximate change of the content of the s-th heavy metal in the p-th sampling point within the time period k; , They represent the mean values of all contents of the s-th heavy metal in the p-th and q-th sampling points in the time period k; , They represent the changing trends of all contents of the s-th heavy metal in the p-th and q-th sampling points in the time period k; Q represents the number of all sampling points; Indicates a preset constant greater than 0.
[0013] Preferably, the method for obtaining all stable intervals and all decreasing intervals of any type of heavy metal in each sampling point is:
[0014] All contents of any type of heavy metal in each sampling point in each time period are used as the input of the time series decomposition algorithm to obtain the trend intensity of any type of heavy metal in each sampling point in each time period;
[0015] All trend intensities of any type of heavy metal in each sampling point are used as inputs of the threshold segmentation algorithm to obtain the first segmentation threshold;
[0016] For any type of heavy metal in each sampling point, the time period corresponding to the trend intensity less than the first segmentation threshold is recorded as a stable interval, the time period corresponding to the trend intensity greater than or equal to the first segmentation threshold is recorded as a changing interval, and the changing interval corresponding to the difference between the first and last moments of the changing interval being greater than 0 is recorded as a decreasing interval.
[0017] Preferably, the method for determining the credibility of the content of any type of heavy metal in each sampling point is:
[0018] Based on the change rate of any type of heavy metal content in each sampling point in each decreasing interval, the water level disturbance degree of any type of heavy metal in each sampling point is determined;
[0019] The expression for the reliability of the content of any type of heavy metal in each sampling point is: ; In the formula, Indicates the reliability of the content of the sth heavy metal in the pth sampling point; represents the water level disturbance degree of the sth type of heavy metal in the pth sampling point; K represents the number of all time periods in the total sampling time.
[0020] Preferably, the method for determining the water level interference degree of any type of heavy metal in each sampling point is:
[0021] Analyze the change rate of the content of any type of heavy metal at each sampling point at the beginning and end of each decreasing interval;
[0022] The water level disturbance degree of any type of heavy metal in each sampling point is the average of the change rate of any type of heavy metal in each sampling point in all decreasing intervals.
[0023] Preferably, the method for determining the first disturbance similarity of any type of heavy metal in each sampling point is:
[0024] The end time of the jth decreasing interval of the sth heavy metal in the pth sampling point is taken as the jth starting time of the sth heavy metal in the p+1th sampling point;
[0025] Analyze the difference between all contents of the s-th heavy metal in the j-th decreasing interval in the p-th sampling point and all contents of the s-th heavy metal in the first decreasing interval after the j-starting moment in the p+1-th sampling point, and record it as the j-th first difference of the s-th heavy metal in the p-th sampling point;
[0026] Analyze the mean of all first differences of the s-th heavy metal in the p-th sampling point, and record it as the first mean of the s-th heavy metal in the p-th sampling point;
[0027] Determine the time interval between the end time of the jth decreasing interval of the sth heavy metal in the pth sampling point and the end time of the first decreasing interval after the jth starting time of the sth heavy metal in the p+1th sampling point;
[0028] Analyze the discreteness of all time intervals of the sth type of heavy metal in the pth sampling point;
[0029] The first mean and the degree of dispersion are both negatively correlated with the first disturbance similarity of any type of heavy metal in each sampling point.
[0030] Preferably, the method for determining the second disturbance similarity of any type of heavy metal in each sampling point is:
[0031] Analyze the difference between the mean of all contents of any type of heavy metal in each decreasing interval in the previous stable interval and the mean of all contents in the next stable interval, and record it as the second difference of any type of heavy metal in each decreasing interval in each sampling point;
[0032] Analyze the mean of the second differences of all decreasing intervals of any type of heavy metal in each sampling point, and record it as the second mean of any type of heavy metal in each sampling point;
[0033] Analyze the mean of all decreasing interval lengths of any type of heavy metal in each sampling point, and record it as the third mean of any type of heavy metal in each sampling point;
[0034] The second mean and the third mean are both negatively correlated with the second disturbance similarity of any type of heavy metal in each sampling point.
[0035] Preferably, the expression for monitoring availability of any type of heavy metal in each sampling point is: ; In the formula, represents the monitoring availability of the s-th heavy metal in the p-th sampling point; It represents the first disturbance similarity of the s-th heavy metal in the p-th sampling point; It represents the second disturbance similarity of the s-th heavy metal in the p-th sampling point.
[0036] Preferably, the monitoring of any type of heavy metal content in the river to be monitored includes:
[0037] The normalized value of the monitoring availability of any type of heavy metal in all sampling points is used as the input of the threshold segmentation algorithm to obtain the second segmentation threshold, and the sampling points whose monitoring availability is greater than or equal to the second segmentation threshold are recorded as the points to be monitored;
[0038] During the total collection time, the content of any type of heavy metal in each monitoring point is used as the input of the anomaly detection algorithm, and the anomaly score value of all the contents of any type of heavy metal in each monitoring point is output. The average of the anomaly score values of all the contents of any type of heavy metal in each monitoring point is recorded as the average anomaly value of the content of any heavy metal in each monitoring point;
[0039] If the average value of the abnormal mean of any type of heavy metal at all monitoring points is greater than or equal to the preset value, the content of this type of heavy metal in the monitored river exceeds the standard; otherwise, it does not exceed the standard.
[0040] In the second aspect, an embodiment of the present application also provides an ecological environment data monitoring system based on data analysis, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, it implements the steps of any one of the above-mentioned ecological environment data monitoring methods based on data analysis.
[0041] This application has at least the following beneficial effects:
[0042] This application analyzes the heavy metal content in the water area in the ecological environment monitoring data, and determines the approximate change of the content of any type of heavy metal in each sampling point in each time period based on the difference in the distribution of the content of any type of heavy metal between each sampling point and the other sampling points in each time period, and the difference between the change trends of the content of the same type of heavy metals. The beneficial effect is that it is conducive to more accurately analyzing the impact of environmental factors on the heavy metal content;
[0043] The present application determines the credibility of the content of any type of heavy metal in each sampling point by analyzing the change rate of the content of any type of heavy metal in each sampling point in each decreasing interval, combined with the approximation of the content change in all time periods, and has the beneficial effect of reflecting the authenticity of the collected data; based on the difference between the content of any type of heavy metal in each sampling point and each adjacent downstream sampling point in different decreasing intervals, and the length difference of different decreasing intervals corresponding to the same type of heavy metal, the first disturbance similarity of any type of heavy metal in each sampling point is determined, and has the beneficial effect of more accurately analyzing the impact of water level rise caused by local precipitation on the heavy metal content;
[0044] This application determines the second disturbed similarity of any type of heavy metal in each sampling point by analyzing the difference in the distribution of any type of heavy metal content in two adjacent stable intervals of each decreasing interval, as well as the length of each decreasing interval of the same type of heavy metal, and combines the first disturbed similarity and the content credibility to determine the monitoring availability of any type of heavy metal in each sampling point, and monitors the content of any type of heavy metal in the monitored river, which has the beneficial effect of improving the accuracy and reliability of monitoring data. This application improves the accuracy and reliability of monitoring data by comprehensively analyzing the change pattern of heavy metal content and the authenticity of heavy metal content. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0046] Figure 1 A flowchart of a method for monitoring ecological environment data based on data analysis provided in one embodiment of the present application;
[0047] Figure 2 A schematic diagram of a first disturbed similarity extraction process provided by an embodiment of the present application;
[0048] Figure 3 A schematic diagram of a second disturbed similarity extraction process provided by an embodiment of the present application;
[0049] Figure 4 A schematic diagram of a monitoring availability extraction process provided for one embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to further explain the technical means and effects adopted by this application to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, characteristics and effects of an ecological environment data monitoring method and system based on data analysis proposed in this application, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0051] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0052] The following is a detailed description of a specific scheme of an ecological environment data monitoring method and system based on data analysis provided by the present application in conjunction with the accompanying drawings.
[0053] See also Figure 1 , which shows a flowchart of a method for monitoring ecological environment data based on data analysis provided by an embodiment of the present application, the method comprising the following steps:
[0054] Step S1: Obtain the content of any type of heavy metal at each sampling point on the river to be monitored at all times.
[0055] Multiple sampling points are set at equal intervals from the upstream to the downstream of the river to be monitored, and the content of any type of heavy metal at each sampling point on the river to be monitored at all times is collected using a water quality heavy metal monitoring instrument. The sampling time interval is set to T, the total sampling time is t, and the total sampling time is divided into various time periods. The length of each time period is .
[0056] It should be understood that the number of sampling points, the time interval T, and the length of the sampling period The values of the sampling time t are all set manually. In this embodiment, the number of sampling points is 20, the time interval T is 10 minutes, and the time period is The value of is 5h, and the total sampling time is 3 days. The implementer can adjust it according to the actual situation. This embodiment does not impose any special restrictions on the number of sampling points, time interval T and sampling time t.
[0057] Step S2: Based on the difference in the distribution of any type of heavy metal content between each sampling point and the remaining sampling points in each time period, and the difference between the change trends of the corresponding heavy metal content of the same type, determine the approximate change in the content of any type of heavy metal in each sampling point in each time period.
[0058] When testing the heavy metal content in water areas, rainfall is one of the important factors that affect the accuracy of heavy metal content testing. When it rains, rainwater will flow into the water area, causing the water level to rise, and the collected heavy metal content to decrease, resulting in data deviation. Specifically, the data change characteristics of the collected heavy metal content at each sampling point are similar, and the time period of change is similar.
[0059] Since the influence of water level changes on heavy metal content takes some time, in order to more accurately analyze the influence of environmental factors on heavy metal content, based on the difference between the distribution of any type of heavy metal content in each sampling point and the other sampling points in each time period, and the difference between the change trend of any type of heavy metal content in each sampling point and the other sampling points, the approximate change of any type of heavy metal content in each sampling point in each time period is determined. The specific process is:
[0060] The expression for the approximate change of the content of any type of heavy metal in each sampling point during each period is: ; In the formula, It indicates the approximate change of the content of the s-th heavy metal in the p-th sampling point within the time period k; , They represent the mean values of all contents of the s-th heavy metal in the p-th and q-th sampling points in the time period k; , They represent the changing trends of all contents of the s-th heavy metal in the p-th and q-th sampling points in the time period k; Q represents the number of all sampling points; Indicates a preset constant greater than 0. The value of is 0.01. Under the premise of ensuring that the denominator is not 0 and does not excessively affect the calculation result, the implementer can set it according to the specific situation. This embodiment does not impose any special restrictions.
[0061] It should be noted that there are many methods to measure the changing trend of a set of data. In this embodiment, all contents of any type of heavy metal in each sampling point in each time period are used as the input of the STL decomposition algorithm, and the trend intensity of the content of any type of metal in each sampling point in each time period is output to characterize the changing trend of the content of any type of heavy metal in each sampling point in each time period; in actual application, the implementer can also use the SEATS decomposition algorithm to count the changing trend of the content of any type of heavy metal in each sampling point in each time period.
[0062] Among them, the STL decomposition algorithm is a well-known technology, and its specific working principle will not be described in detail.
[0063] Furthermore, according to the approximation of the change in the content of any type of heavy metal in each sampling point in each time period, it can be understood that when the water level change affects the change in the heavy metal content data, the change trend and change amount of the heavy metal content data in the same water area in the same time period are relatively similar, that is, the smaller the difference between the content of any type of heavy metal in the sampling point in the same time period and the content of the same heavy metal in other sampling points, the smaller the difference between the change trend of the content of any type of heavy metal in the sampling point in the same time period and the change trend of the content of the same type of heavy metal in other sampling points, so that the approximation of the content change is greater, indicating that the heavy metal content data in the corresponding time period is more likely to be affected by natural factors such as rainfall; conversely, if the difference between the content of any type of heavy metal in the sampling point in the same time period and the content of the same type of heavy metal in other sampling points is greater, the difference between the change trend of the content of any type of heavy metal in the sampling point in the same time period and the change trend of the content of the same type of heavy metal in other sampling points is greater, then the approximation of the change in the content of any type of heavy metal at the corresponding sampling point is smaller.
[0064] Step S3: Based on the change rate of any type of heavy metal content in each sampling point in each decreasing interval and combined with the approximation of the content change in all time periods, determine the credibility of any type of heavy metal content in each sampling point.
[0065] The water body itself also has a certain degree of self-repair ability, so the heavy metal content in the water body will also decrease due to the restoration of the water body, which is a normal data change. Therefore, it is also necessary to distinguish between the data changes caused by the self-repair of the water body and the data changes caused by environmental factors.
[0066] Generally speaking, the self-repairing ability of water bodies has a slower impact on the change of heavy metal content, while environmental changes have a greater impact on heavy metal content and the impact speed is faster. Specifically, when the water body is self-repairing, the change of heavy metal content data collected at a single sampling point lasts longer, changes more slowly, and the overall decline is lower; when the heavy metal content data decreases due to rainfall, the data decreases faster, lasts for a shorter period of time, and the decline is greater.
[0067] S301: In each time period, based on the change trend of the content of any type of heavy metal in each sampling point, all stable intervals and all decreasing intervals of any type of heavy metal in each sampling point are obtained in combination with a threshold segmentation algorithm.
[0068] In order to distinguish the changes in heavy metal content in the water area during the self-repair process and the changes in the heavy metal content in the water area caused by changes in the external environment, a stable interval and a decreasing interval are constructed respectively. The stable interval represents the interval in which the heavy metal content in the water area changes during the self-repair process, and the decreasing interval represents the interval in which the heavy metal content in the water area changes due to changes in the external environment such as rainfall. Specifically:
[0069] (1) The total content of any type of heavy metal in each sampling point in each time period is used as the input of the time series decomposition algorithm to obtain a trend intensity of any type of heavy metal in each sampling point, where one time period corresponds to one trend intensity.
[0070] It should be noted that there are many commonly used time series decomposition algorithms. In this embodiment, the STL decomposition algorithm is used to obtain the trend intensity of any type of heavy metal at each sampling point at each moment. The implementer can also use the SEATS decomposition algorithm to obtain the trend intensity of any type of heavy metal at each moment. This embodiment does not impose any special restrictions on the choice of time series decomposition algorithm.
[0071] (2) Further, all trend intensities of any type of heavy metal in each sampling point are used as inputs of the threshold segmentation algorithm to obtain the first segmentation threshold;
[0072] (3) For any type of heavy metal in each sampling point, the period when the trend intensity is less than the first segmentation threshold is recorded as the stable interval, the period when the trend intensity is greater than or equal to the first segmentation threshold is recorded as the changing interval, and the changing interval when the difference between the first and last moments of the changing interval is greater than 0 is recorded as the decreasing interval.
[0073] It should be noted that there are many commonly used threshold segmentation algorithms. In this embodiment, the maximum inter-class variance algorithm is used to classify all time periods of each sampling point according to the trend intensity. The implementer may also use other threshold segmentation algorithms, and this embodiment does not impose any special restrictions.
[0074] Among them, the maximum inter-class variance algorithm is a well-known technology, and its segmentation principle and specific process are not described in detail.
[0075] S302: Determine the water level disturbance degree of any type of heavy metal at each sampling point based on the change rate of any type of heavy metal content at each sampling point in each decreasing interval.
[0076] Furthermore, in order to quantify the reliability of the data and identify whether the data changes are affected by the water level rise, the water level interference degree of any type of heavy metal at each sampling point is determined based on the change rate of any type of heavy metal content in each decreasing interval, specifically:
[0077] Analyze the change rate of the content of any type of heavy metal at each sampling point at the beginning and end of each decreasing interval;
[0078] The water level disturbance degree of any type of heavy metal in each sampling point is the average of the change rate of any type of heavy metal in each sampling point in all decreasing intervals.
[0079] According to the water level interference degree of any type of heavy metal in each sampling point, it can be understood that if the heavy metal content in the measured water area is affected by environmental factors, the faster the heavy metal content data changes in a single decreasing interval, and the shorter the time interval from the last stable change to the next stable change of the heavy metal content data, that is, the greater the change rate, the greater the possibility that the data will be disturbed by rising water levels, and the greater the water level interference degree; conversely, if the change rate is smaller, it means that the heavy metal content data changes relatively smoothly in a single decreasing interval, the heavy metal content in the measured water area is less affected by environmental factors, and the water level interference degree is smaller.
[0080] S303: Based on the water level disturbance of any type of heavy metal in each sampling point and the approximate degree of the content change in all time periods, determine the credibility of the content of any type of heavy metal in each sampling point.
[0081] Furthermore, in order to characterize the authenticity of the data collected at the sampling points, based on the water level interference of any type of heavy metal at each sampling point, combined with the approximation of the content change at all times, the credibility of the content of any type of heavy metal at each sampling point is determined, specifically:
[0082] The expression for the reliability of the content of any type of heavy metal in each sampling point is: ; In the formula, Indicates the reliability of the content of the sth heavy metal in the pth sampling point; represents the water level disturbance degree of the sth type of heavy metal in the pth sampling point; K represents the number of all time periods in the total sampling time.
[0083] When collecting heavy metal content data in a water area, if the water area is normal and there is no interference from environmental factors, the lower the approximate degree of change in the heavy metal content data, the lower the degree of interference from rising water levels, that is, the smaller the water level interference, the smaller the approximate degree of content change, and the greater the credibility of the heavy metal content, which means that the collected data can better reflect the actual heavy metal content in the current target water area; conversely, if the water level interference is greater, the approximate degree of content change is greater, the lower the credibility of the heavy metal content, which means that the collected data is less likely to reflect the actual heavy metal content in the current target water area.
[0084] Step S4: Determine the first disturbed similarity of any type of heavy metal in each sampling point based on the difference between the content of any type of heavy metal in each sampling point and the adjacent downstream sampling points in different decreasing intervals, and the length difference of different decreasing intervals corresponding to the same type of heavy metals; determine the second disturbed similarity of any type of heavy metal in each sampling point based on the difference in the distribution of the content of any type of heavy metal in each sampling point in two adjacent stable intervals of each decreasing interval, and the length of each decreasing interval of the same type of heavy metals; and determine the monitoring availability of any type of heavy metal in each sampling point in combination with the first disturbed similarity and the content credibility.
[0085] When monitoring waters in the ecological environment, there are many types of waters in the ecological environment. In addition to large lakes, reservoirs, and wetlands, there are also rivers, streams, artificial waterways, etc., and the distance between upstream and downstream of waters such as rivers is large, and there are certain differences in the impact of water level changes between upstream and downstream. For example, when the water level rises due to precipitation in the upstream, the downstream is far away from the upstream and the rainfall does not cover the downstream. It may take some time for the downstream water level to rise due to the arrival of upstream water. Therefore, if only the content credibility is used, there may be a situation where the upstream water level rises and changes, but the downstream has not changed, so the content credibility is greater, and then the credibility judgment of the data is biased, which requires further analysis, specifically:
[0086] S401: Determine the first disturbance similarity of any type of heavy metal in each sampling point based on the difference in the content of any type of heavy metal between each sampling point and each adjacent downstream sampling point in different decreasing intervals, and the difference in the length of different decreasing intervals corresponding to the same type of heavy metals.
[0087] When local precipitation occurs in the ecological environment, the water level of the affected waters will gradually increase, but the waters downstream of the waters will increase after a period of time. Specifically, the heavy metal content data is as follows: the heavy metal content data of the sampling points in the affected waters begin to decrease from a certain time interval, and the sampling points in the waters downstream of the sampling points will experience the same decrease in a certain time interval after the time interval, with similar decreasing trends and amplitudes, and the same interval time.
[0088] Therefore, in order to quantify the impact of water level rise caused by local precipitation on heavy metal content, the first disturbance similarity of any type of heavy metal in each sampling point was determined by comparing the changes in heavy metal content at upstream and downstream sampling points, specifically:
[0089] (1) The end time of the jth decreasing interval of the sth heavy metal in the pth sampling point is taken as the jth starting time of the sth heavy metal in the p+1th sampling point;
[0090] (2) Further, the difference between all contents of the s-th heavy metal in the j-th decreasing interval at the p-th sampling point and all contents of the s-th heavy metal in the first decreasing interval after the j-th starting time at the p+1-th sampling point is analyzed and recorded as the j-th first difference of the s-th heavy metal in the p-th sampling point;
[0091] It should be noted that there are many methods for measuring the differences between multiple groups of data. In this embodiment, the difference between them is measured by calculating the dtw distance between all contents of the s-th heavy metal in the p-th sampling point in the j-th decreasing interval and all contents of the s-th heavy metal in the p+1-th sampling point in the first decreasing interval after the j-starting moment. The implementer may also use other methods for measuring the differences between sequences, such as Euclidean distance and Manhattan distance. This embodiment does not impose any special restrictions on the selection of methods for measuring the differences between multiple groups of data.
[0092] The calculation process of the dtw distance is a well-known technique, and the specific process will not be described in detail.
[0093] (3) Further, the mean of all first differences of the s-th heavy metal in the p-th sampling point is analyzed and recorded as the first mean of the s-th heavy metal in the p-th sampling point;
[0094] (4) Further, determine the time interval between the end time of the jth decreasing interval of the sth heavy metal at the pth sampling point and the end time of the first decreasing interval after the jth starting time of the sth heavy metal at the p+1th sampling point;
[0095] (5) Further, the discreteness of all time intervals of the sth type of heavy metal in the pth sampling point was analyzed;
[0096] It should be noted that there are many methods to measure the degree of discreteness of a set of data. In this embodiment, the degree of discreteness of the first interval is measured by calculating the variance of all first intervals of the sth type heavy metal in the pth sampling point. The implementer may also use other methods to measure the degree of discreteness such as dispersion coefficient or standard deviation, and this embodiment does not impose any special restrictions.
[0097] (6) Further, based on the first mean value and the degree of dispersion, a first disturbed similarity of any type of heavy metal in each sampling point is determined, and the first mean value and the degree of dispersion are negatively correlated with the first disturbed similarity of any type of heavy metal in each sampling point.
[0098] It should be understood that a negative correlation relationship indicates that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtraction relationship or a division relationship, etc., which is determined by the actual application and is not particularly limited in this embodiment.
[0099] Preferably, in the present embodiment, the first disturbed similarity of any type of heavy metal in each sampling point is the reciprocal of the sum of the first mean value and the degree of dispersion of any type of heavy metal in each sampling point; in actual application, as other implementation methods, the first disturbed similarity of any type of heavy metal in each sampling point is an exponential function value with a natural constant as the base and the inverse of the sum of the first mean value and the degree of dispersion of any type of heavy metal in each sampling point as the independent variable.
[0100] Furthermore, according to the first disturbance similarity of any type of heavy metal in each sampling point, it can be understood that when the local water level rises at a sampling point upstream in the water area, resulting in a decrease in the heavy metal content data, the data of the sampling points downstream of the sampling point will also undergo similar changes over time. The smaller the difference between the content of the s-th heavy metal in the p-th sampling point in the j-decreasing interval and the content of the s-th heavy metal in the p+1-th sampling point in the first decreasing interval after the j-starting moment, the more likely the data collected at the sampling point is to be affected by the rising water level, that is, the greater the first disturbance similarity; conversely, if the difference between the content of the s-th heavy metal in the p-th sampling point in the j-decreasing interval and the content of the s-th heavy metal in the p+1-th sampling point in the first decreasing interval after the j-starting moment is greater, it means that the data collected at the sampling point is less likely to be affected by the rising water level, that is, the smaller the first disturbance similarity.
[0101] Preferably, the schematic diagram of the first disturbed similarity extraction process provided in this embodiment is as follows: Figure 2 shown.
[0102] S402: Determine the second disturbance similarity of any type of heavy metal in each sampling point based on the difference in distribution of any type of heavy metal content in two adjacent stable intervals of each decreasing interval and the length of each decreasing interval of the same type of heavy metal.
[0103] Furthermore, in order to quantify the degree of interference of external factors such as water level rise on the heavy metal content, based on the difference in the distribution of any type of heavy metal content in each sampling point in the two adjacent stable intervals of each decreasing interval, and the length of each decreasing interval of the same type of heavy metal, the second disturbance similarity of any type of heavy metal in each sampling point is determined, so as to timely discover the abnormal changes in the heavy metal content, so as to take corresponding environmental protection and governance measures. The specific process of determining the content of any type of heavy metal in each sampling point is as follows:
[0104] (1) Analyze the difference between the mean of all contents of any type of heavy metal in the adjacent previous stable interval of each decreasing interval and the mean of all contents in the adjacent next stable interval at each sampling point, and record it as the second difference of any type of heavy metal in each decreasing interval at each sampling point;
[0105] (2) Further, the mean of the second difference of all decreasing intervals of any type of heavy metal in each sampling point was analyzed and recorded as the second mean of any type of heavy metal in each sampling point;
[0106] (3) Further, the mean of all decreasing interval lengths of any type of heavy metal in each sampling point was analyzed and recorded as the third mean of any type of heavy metal in each sampling point;
[0107] (4) Thus, the second disturbed similarity of any type of heavy metal in each sampling point is determined based on the second mean and the third mean, and the second mean and the third mean are both negatively correlated with the second disturbed similarity of any type of heavy metal in each sampling point.
[0108] Preferably, in this embodiment, the expression of the second disturbance similarity of any type of heavy metal in each sampling point is: ; It represents the second disturbance similarity of the s-th heavy metal in the p-th sampling point; represents the mean of the second means of the s-th heavy metal in all downstream sampling points of the p-th sampling point; represents the mean of the lengths of all decreasing intervals of the sth type of heavy metal in the pth sampling point; Represents a preset constant greater than 0, used to prevent the denominator from being 0, where The value of is set manually. The value of is 0.01. Under the premise of ensuring that the denominator is not 0 and does not excessively affect the calculation result, the implementer can set it according to the specific situation. This embodiment does not impose any special restrictions.
[0109] In actual application, as other implementation methods, the method for determining the second disturbed similarity of any type of heavy metal in each sampling point is: analyzing the mean of the second means of any type of heavy metal in all downstream sampling points of each sampling point, and recording it as the fourth mean of each sampling point; analyzing the mean of the lengths of all decreasing intervals of any type of heavy metal in each sampling point, and recording it as the fifth mean of each sampling point; the second disturbed similarity of any type of heavy metal in each sampling point is an exponential function value with a natural constant as the base and the negative of the sum of the fourth mean and the fifth mean of each sampling point as the independent variable.
[0110] Furthermore, according to the second disturbance similarity of any type of heavy metal in each sampling point, it can be understood that when the heavy metal content data of a sampling point is disturbed by rising water levels, the water level disturbances suffered by the data of its downstream sampling points after a period of time are similar, and the changes in the heavy metal content data are similar, that is, the smaller the second difference is, and the more similar the time intervals of the changes are, the smaller the mean length of all decreasing intervals of any type of heavy metal at the sampling point is, the greater the second disturbance similarity is; conversely, if the second difference of any type of heavy metal at the sampling point is greater, the mean length of all decreasing intervals of any type of heavy metal is greater, and the second disturbance similarity is smaller.
[0111] Preferably, the schematic diagram of the second disturbed similarity extraction process provided in this embodiment is as follows: Figure 3 shown.
[0112] S403: Based on the second disturbance similarity of any type of heavy metal in each sampling point, combined with the first disturbance similarity and the content credibility, determine the monitoring availability of any type of heavy metal in each sampling point.
[0113] In order to identify and screen out the heavy metal content data that is less disturbed by the outside world and is more accurate, the monitoring availability of any type of heavy metal in each sampling point is determined based on the second disturbance similarity of any type of heavy metal in each sampling point, combined with the first disturbance similarity and the content credibility, by comprehensively analyzing the change pattern of the heavy metal content and the authenticity of the heavy metal content, so as to improve the accuracy and reliability of the monitoring data. The process of determining the monitoring availability of any type of heavy metal in each sampling is as follows:
[0114] The expression for monitoring availability of any type of heavy metal at each sampling point is: ; In the formula, represents the monitoring availability of the s-th heavy metal in the p-th sampling point; It represents the first disturbance similarity of the s-th heavy metal in the p-th sampling point; It represents the second disturbance similarity of the s-th heavy metal in the p-th sampling point.
[0115] Therefore, according to the monitoring availability of any type of heavy metal in each sampling point, it can be understood that when the heavy metal content data collected at the sampling point is more similar to the change degree of the heavy metal content collected at its downstream sampling point after a period of time, that is, the second disturbed similarity is larger, it means that the data collected at the sampling point is more likely to be affected by the rising water level caused by rainfall at the location described by the sampling point, that is, the larger the first disturbed similarity, the greater the possibility that the collected heavy metal content data is disturbed, that is, the smaller the content credibility and the larger the first disturbed similarity, the smaller the monitoring availability, indicating that the data collected at the sampling point and its changes are all abnormal changes in heavy metal content caused by changes in the external natural environment, and the availability of the collected data in subsequent monitoring is lower; conversely, if the second disturbed similarity at the sampling point is larger, the content credibility is larger, and the first disturbed similarity is smaller, the monitoring availability is larger, indicating that the data collected at the sampling point and its changes are all normal changes in heavy metal content in ecological environment waters, and the availability of the collected data in subsequent monitoring is higher.
[0116] Preferably, the monitoring availability extraction process diagram provided in this embodiment is as follows: Figure 4 shown.
[0117] Step S5: Determine the monitoring availability of any type of heavy metal in each sampling point, and monitor the content of any type of heavy metal in the river to be monitored.
[0118] The normalized value of the monitoring availability of any type of heavy metal in all sampling points is used as the input of the threshold segmentation algorithm to obtain the second segmentation threshold, and the sampling points whose monitoring availability is greater than or equal to the second segmentation threshold are recorded as the points to be monitored;
[0119] During the total collection time, the content of any type of heavy metal in each monitoring point is used as the input of the anomaly detection algorithm, and the anomaly score value of all contents of any type of heavy metal in each monitoring point is output. The average of the anomaly score values of all contents of any type of heavy metal in each monitoring point is recorded as the anomaly mean of the content of any heavy metal in each monitoring point.
[0120] It should be noted that there are many commonly used anomaly detection methods. In this embodiment, the LOF anomaly score algorithm is used to obtain the anomaly score values of all contents of any type of heavy metal. The implementer may also use other anomaly detection algorithms such as the COF anomaly detection algorithm, and this embodiment does not impose any special restrictions.
[0121] Among them, the LOF anomaly score algorithm is a well-known technology, and the specific process of obtaining the anomaly score is not repeated here.
[0122] If the average value of the abnormal mean of any type of heavy metal at all monitoring points is greater than or equal to the preset value, the content of this type of heavy metal in the monitored river exceeds the standard; otherwise, the content of this type of heavy metal in the monitored river does not exceed the standard.
[0123] It should be noted that the value of the preset value is manually set. In this embodiment, the value of the preset value is 0.98, and the implementer needs to set it according to the specific situation.
[0124] Based on the same inventive concept as the above method, an embodiment of the present application also provides an ecological environment data monitoring system based on data analysis, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-mentioned ecological environment data monitoring methods based on data analysis.
[0125] It should be noted that the above sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0126] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0127] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for monitoring ecological environment data based on data analysis, characterized in that: The method comprises the following steps: Within the preset total collection time, obtain the content of any type of heavy metal at each preset sampling point on the river to be monitored at all times, and divide the total collection time into each time period; Based on the difference in the distribution of any type of heavy metal content between each sampling point and the other sampling points in each time period, and the difference in the change trend of the corresponding heavy metal content, determine the approximate change of any type of heavy metal content in each sampling point in each time period; In each time period, based on the changing trend of any type of heavy metal content in each sampling point, all stable intervals and all decreasing intervals of any type of heavy metal in each sampling point are obtained in combination with the threshold segmentation algorithm; Based on the change rate of the content of any type of heavy metal in each sampling point in each decreasing interval, combined with the approximation of the content change in all time periods, determine the credibility of the content of any type of heavy metal in each sampling point; Based on the numerical differences and length differences in the content of any type of heavy metals in each sampling point and each adjacent downstream sampling point in different decreasing intervals, the first disturbance similarity of any type of heavy metal in each sampling point is determined; Based on the difference in the distribution of any type of heavy metal content in each sampling point in two adjacent stable intervals of each decreasing interval, and the length of each decreasing interval of the same type of heavy metal, the second disturbance similarity of any type of heavy metal in each sampling point is determined, and combined with the first disturbance similarity and the content credibility, the monitoring availability of any type of heavy metal in each sampling point is determined, and the content of any type of heavy metal in the monitored river is monitored; The method for determining the first disturbance similarity of any type of heavy metal in each sampling point is: The end time of the jth decreasing interval of the sth heavy metal in the pth sampling point is taken as the jth starting time of the sth heavy metal in the p+1th sampling point; Analyze the difference between all contents of the s-th heavy metal in the j-th decreasing interval in the p-th sampling point and all contents of the s-th heavy metal in the first decreasing interval after the j-starting moment in the p+1-th sampling point, and record it as the j-th first difference of the s-th heavy metal in the p-th sampling point; Analyze the mean of all first differences of the s-th heavy metal in the p-th sampling point, and record it as the first mean of the s-th heavy metal in the p-th sampling point; Determine the time interval between the end time of the jth decreasing interval of the sth heavy metal in the pth sampling point and the end time of the first decreasing interval after the jth starting time of the sth heavy metal in the p+1th sampling point; Analyze the discreteness of all time intervals of the sth type of heavy metal in the pth sampling point; The first mean and the degree of dispersion are both negatively correlated with the first disturbance similarity of any type of heavy metal in each sampling point; The method for determining the second disturbance similarity of any type of heavy metal in each sampling point is: Analyze the difference between the mean of all contents of any type of heavy metal in each decreasing interval in the previous stable interval and the mean of all contents in the next stable interval, and record it as the second difference of any type of heavy metal in each decreasing interval in each sampling point; Analyze the mean of the second differences of all decreasing intervals of any type of heavy metal in each sampling point, and record it as the second mean of any type of heavy metal in each sampling point; Analyze the mean of all decreasing interval lengths of any type of heavy metal in each sampling point, and record it as the third mean of any type of heavy metal in each sampling point; The second mean and the third mean are both negatively correlated with the second disturbance similarity of any type of heavy metal in each sampling point; The expression for the approximate change of the content of any type of heavy metal in each sampling point within each time period is: ; In the formula, It indicates the approximate change of the content of the s-th heavy metal in the p-th sampling point within the time period k; , They represent the mean values of all contents of the s-th heavy metal in the p-th and q-th sampling points in the time period k; , They represent the changing trends of all contents of the s-th heavy metal in the p-th and q-th sampling points in the time period k; Q represents the number of all sampling points; Indicates a preset constant greater than 0; The method for obtaining all stable intervals and all decreasing intervals of any type of heavy metal in each sampling point is: All contents of any type of heavy metal in each sampling point in each time period are used as the input of the time series decomposition algorithm to obtain the trend intensity of any type of heavy metal in each sampling point in each time period; All trend intensities of any type of heavy metal in each sampling point are used as inputs of the threshold segmentation algorithm to obtain the first segmentation threshold; For any type of heavy metal in each sampling point, the period corresponding to the trend intensity less than the first segmentation threshold is recorded as a stable interval, the period corresponding to the trend intensity greater than or equal to the first segmentation threshold is recorded as a gradual change interval, and the gradual change interval corresponding to the difference between the first and last moments of the gradual change interval being greater than 0 is recorded as a decreasing interval; The method for determining the credibility of the content of any type of heavy metal in each sampling point is: Based on the change rate of any type of heavy metal content in each sampling point in each decreasing interval, the water level disturbance degree of any type of heavy metal in each sampling point is determined; The expression for the reliability of the content of any type of heavy metal in each sampling point is: ; In the formula, Indicates the reliability of the content of the sth heavy metal in the pth sampling point; represents the water level disturbance degree of the s-th heavy metal in the p-th sampling point; K represents the number of all time periods in the total sampling time; The method for determining the water level disturbance degree of any type of heavy metal in each sampling point is: Analyze the change rate of the content of any type of heavy metal at each sampling point at the beginning and end of each decreasing interval; The water level disturbance degree of any type of heavy metal at each sampling point is the mean of the change rate of any type of heavy metal at each sampling point in all decreasing intervals; The expression for monitoring availability of any type of heavy metal in each sampling point is: ; In the formula, represents the monitoring availability of the s-th heavy metal in the p-th sampling point; It represents the first disturbance similarity of the s-th heavy metal in the p-th sampling point; It represents the second disturbance similarity of the s-th heavy metal in the p-th sampling point.
2. The method for monitoring ecological environment data based on data analysis according to claim 1, characterized in that: The monitoring of any type of heavy metal content in the river to be monitored includes: The normalized value of the monitoring availability of any type of heavy metal in all sampling points is used as the input of the threshold segmentation algorithm to obtain the second segmentation threshold, and the sampling points whose monitoring availability is greater than or equal to the second segmentation threshold are recorded as the points to be monitored; During the total collection time, the content of any type of heavy metal in each monitoring point is used as the input of the anomaly detection algorithm, and the anomaly score value of all the contents of any type of heavy metal in each monitoring point is output. The average of the anomaly score values of all the contents of any type of heavy metal in each monitoring point is recorded as the average anomaly value of the content of any heavy metal in each monitoring point; If the average value of the abnormal mean of any type of heavy metal at all monitoring points is greater than or equal to the preset value, the content of this type of heavy metal in the monitored river exceeds the standard; otherwise, it does not exceed the standard.
3. An ecological environment data monitoring system based on data analysis, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, it implements the steps of an ecological environment data monitoring method based on data analysis as described in any one of claims 1-2.
Citation Information
Patent Citations
Key enterprise environment analysis method based on data samples
CN116128260A
Data cleaning method and system for atmospheric environment monitoring
CN118520237A