A water bloom disaster early warning method and terminal based on similarity analysis

Through a similarity analysis method, the spatial distribution similarity and environmental conditions of water bloom disasters are calculated, and similar time periods and time points are screened, which solves the limitations of water bloom disaster warning in the existing technology and achieves high-accuracy prediction effect.

CN114254836BActive Publication Date: 2025-05-06SICHUANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111620749.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-05-06
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

The existing water bloom disaster warning technology has limitations, and depends on weather forecast accuracy or complex model construction, making it difficult to effectively predict water bloom disasters.

Method used

A method based on similarity analysis was used to obtain algae data, meteorological data and water quality data, and pretreat it to form a standard time series, calculate the spatial distribution similarity and environmental conditions similarity, screen similar time periods and time points, and calculate the subsequent trend level of algae situation.

Benefits of technology

Accurate prediction of water bloom disasters has been achieved, and it has the advantages of ease of realization and high accuracy compared to existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114254836B_ABST
    Figure CN114254836B_ABST
Patent Text Reader

Abstract

The present invention discloses a water bloom disaster early warning method and terminal based on similarity analysis, comprising the following steps: step S1, obtaining algae data, meteorological data and water quality data, and pre-processing the algae data, meteorological data and water quality data to form a standard time series with the same time frequency; step S2, calculating the spatial distribution similarity according to the algae data, meteorological data and water quality data of the standard time series; step S3, calculating the environmental condition similarity according to the algae data, meteorological data and water quality data of the standard time series; step S4, screening the environmental condition similar time period according to the environmental condition similarity, screening the spatial distribution similar time point according to the spatial distribution similarity, and calculating the final subsequent trend level according to the environmental condition similar time period and the spatial distribution similar time point. The present invention calculates the spatial similarity and time similarity of the environment and obtains the subsequent trend level of the algae situation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of disaster early warning, and in particular to a water bloom disaster early warning method and terminal based on similarity analysis. Background Art

[0002] Algal bloom refers to the explosive reproduction of certain algae in freshwater bodies due to eutrophication, and the formation of floating algae on the water surface. The outbreak of algal bloom will not only destroy the water landscape, but also stimulate the breeding of bacteria, seriously deteriorate the water body, inhibit the growth and reproduction of beneficial plankton, harm farmed animals, and thus endanger human physical and mental health. China is a country with many lakes, and many lakes are affected by algal bloom disasters. For example, Taihu Lake, Chaohu Lake, and Dianchi Lake have experienced large outbreaks of blue-green algae for many years. Other lakes such as Poyang Lake, Dongting Lake, and Erhai Lake have also suffered from algal bloom disasters to varying degrees. Therefore, the country is also paying more and more attention to the monitoring and early warning of algal bloom disasters.

[0003] At present, the monitoring of algal bloom disasters mainly relies on setting up stations to regularly collect algae water samples for laboratory analysis, or building a water color remote sensing model to invert blue algae blooms. Its early warning mainly includes two categories of methods. One is to establish a prediction model based on the algae cell concentration and weather forecast, and the other is to build a water ecological dynamics model considering factors such as nutrients, water flow, and vertical water temperature distribution. However, the former is heavily dependent on the accuracy of weather forecasts, and the latter is very complicated to build a model due to the many factors that affect algae. Therefore, the current early warning technology for algal bloom disasters still has certain limitations. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a water bloom disaster early warning method and terminal based on similarity analysis to predict water bloom disasters.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0006] A water bloom disaster early warning method based on similarity analysis comprises the following steps:

[0007] Step S1, obtaining algae data, meteorological data and water quality data, and preprocessing the algae data, meteorological data and water quality data to form a standard time series with the same time frequency;

[0008] Step S2, calculating the spatial distribution similarity based on the algae data of the standard time series;

[0009] Step S3, calculating the similarity of environmental conditions based on the algae data, meteorological data and water quality data of the standard time series;

[0010] Step S4, filtering similar time periods of environmental conditions according to the similarity of environmental conditions, filtering similar time points of spatial distribution according to the similarity of spatial distribution, and calculating the final subsequent trend level according to the similar time periods of environmental conditions and the similar time points of spatial distribution.

[0011] In order to solve the above technical problems, another technical solution adopted by the present invention is:

[0012] A water bloom disaster warning terminal based on similarity analysis includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0013] Step S1, obtaining algae data, meteorological data and water quality data, and preprocessing the algae data, meteorological data and water quality data to form a standard time series with the same time frequency;

[0014] Step S2, calculating the spatial distribution similarity based on the algae data of the standard time series;

[0015] Step S3, calculating the similarity of environmental conditions based on the algae data, meteorological data and water quality data of the standard time series;

[0016] Step S4, filtering similar time periods of environmental conditions according to the similarity of environmental conditions, filtering similar time points of spatial distribution according to the similarity of spatial distribution, and calculating the final subsequent trend level according to the similar time periods of environmental conditions and the similar time points of spatial distribution.

[0017] The beneficial effect of the present invention is: a water bloom disaster warning method and terminal based on similarity analysis, which calculates the spatial distribution similarity and the environmental condition similarity, and obtains the subsequent trend level of the algae situation based on the spatial distribution similarity and the environmental condition similarity, thereby predicting the water bloom disaster. Compared with the existing water bloom prediction method, it has the advantages of being easy to implement and having higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of a process of a water bloom disaster early warning method based on similarity analysis according to an embodiment of the present invention;

[0019] Figure 2 The present invention is a schematic structural diagram of a water bloom disaster warning terminal based on similarity analysis according to an embodiment of the present invention.

[0020] Description of labels:

[0021] 1. A water bloom disaster warning terminal based on similarity analysis; 2. Processor; 3. Memory. DETAILED DESCRIPTION

[0022] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.

[0023] Please refer to Figure 1 , a method,

[0024] A water bloom disaster early warning method based on similarity analysis comprises the following steps:

[0025] Step S1, obtaining algae data, meteorological data and water quality data, and preprocessing the algae data, meteorological data and water quality data to form a standard time series with the same time frequency;

[0026] Step S2, calculating the spatial distribution similarity based on the algae data of the standard time series;

[0027] Step S3, calculating the similarity of environmental conditions based on the algae data, meteorological data and water quality data of the standard time series;

[0028] Step S4, filtering similar time periods of environmental conditions according to the similarity of environmental conditions, filtering similar time points of spatial distribution according to the similarity of spatial distribution, and calculating the final subsequent trend level according to the similar time periods of environmental conditions and the similar time points of spatial distribution.

[0029] From the above description, it can be seen that the beneficial effect of the present invention is that it calculates the spatial distribution similarity and the environmental condition similarity, and obtains the subsequent trend level of the algae situation based on the spatial distribution similarity and the environmental condition similarity, so as to predict the algal bloom disaster. Compared with the existing algal bloom prediction method, it has the advantages of easy implementation and higher accuracy.

[0030] Furthermore, the step S3 specifically includes:

[0031] Step S31, using the Pearson correlation coefficient to calculate the correlation between all meteorological and water quality elements and algae changes;

[0032] Step S32, taking the element whose absolute value of correlation is greater than the set value as the key element related to the change of algae;

[0033] Step S33: Calculate the similarity of environmental conditions based on key factors related to algae changes.

[0034] From the above description, it can be seen that by screening the elements according to the correlation to obtain the key elements that need to be calculated, and calculating the key elements to obtain the environmental correlation, the complexity of the calculation is reduced through screening, making the whole method easier to implement.

[0035] Furthermore, the step S31 specifically includes:

[0036] For time series data, the Pearson correlation coefficient is used to screen the key factors related to algae changes. The calculation formula is as follows:

[0037]

[0038] In the formula, ρ represents the correlation, A and B represent the time series of algae and the time series of a single meteorological or water quality element, respectively, cov represents the covariance, and std represents the standard deviation;

[0039] The step S33 specifically includes:

[0040] The similarity of environmental conditions is calculated according to the following formula:

[0041]

[0042] In the formula, ω m is the factor weight, which is obtained according to the relevance of the factors. The greater the relevance, the higher the factor weight. m ,y m ) is the distance between a single element in two time series, Y is a sequence of multiple elements at time a, and X is a sequence of multiple elements at time b:

[0043]

[0044] In the formula, m is the main factor, so m in Y and X are equal, k and n are the time lengths, k <n;

[0045] The distance d(x) between a single feature in two time series m ,y m ) is calculated according to the following formula:

[0046]

[0047] Where l k For x m and m Distance from center alignment point:

[0048]

[0049] In the formula, i and j are the index numbers in the two sequences respectively, l Z is the distance of the Zth alignment point;

[0050] With constraints:

[0051] {x mn' ,…,x mn”}∈x m , n"-n'=[k-2, k+2];

[0052] Where n' is the starting position of the interception, and n" is the ending position of the interception. If:

[0053] l z-1 =(x mn' ,y mk' );

[0054] Then the next alignment point:

[0055] l z =(x mn ,y mk );

[0056] The following conditions must be met: n-n'≤1 and k-k'≤1, n-n'≥0 and k-k'≥0.

[0057] From the above description, it can be seen that an example of the calculation method of environmental condition similarity is given. It overcomes the disadvantage of Euclidean distance that it cannot distinguish the similarity of shape and dynamic change amplitude through the dynamic time warping algorithm, and achieves the minimum sum of weighted distances through the local optimization method.

[0058] Furthermore, the step S2 specifically includes:

[0059] The spatial similarity s_spatial between time a and time b is calculated using the following formula: a,b :

[0060]

[0061] In the formula, s_num a,b is the numerical similarity of the spatial distribution between time a and time b, s_trend a,b is the trend similarity of the spatial distribution between time a and time b, ω num and ω trend are the weights of numerical similarity and trend similarity respectively;

[0062] Among them, for the numerical similarity s_num a,b , calculated according to the following formula:

[0063]

[0064] In the formula, x represents the algal cell concentration, that is, x ai represents the algal cell concentration at sampling point i at time a, x bi represents the algal cell concentration at sampling point i at time b, std xi is the standard deviation of algal cell concentration at sampling point i at all historical times, ω i Represents the weight of sampling point i, which is calculated using the following formula:

[0065]

[0066] In the formula, ω i represents the weight of sampling point i, N represents the total number of sampling points, R represents the number of sub-regions, and R i Represents the number of sampling points in the sub-region to which sampling point i belongs;

[0067] For trend similarity s_trend a,b , calculated according to the following formula:

[0068]

[0069] In the formula, r ai represents the ranking of algae cell concentration at sampling point i at time a among all sampling points, r bi Indicates the ranking of algae cell concentration at sampling point i at time b among all sampling points, std ri is the standard deviation of the algal cell concentration ranking of sampling point i at all historical times.

[0070] From the above description, it can be seen that it gives a specific calculation method for spatial distribution similarity and realizes the calculation of spatial distribution similarity. Among them, by dividing the lake area into R sub-areas, weights are assigned to each point when calculating the numerical similarity, thus avoiding the similarity being excessively affected by areas with dense sampling points.

[0071] Furthermore, the step S4 specifically includes:

[0072] The subsequent trends of each similar time point or similar time period are graded, and the change range of algae cell concentration between the similar time point or the end time point of the similar time period and the next time point is calculated, and the corresponding set score is obtained according to the grade division of the subsequent trend, and the final trend grade score is calculated according to the following formula:

[0073]

[0074] In the formula, grade r Indicates the classification of subsequent trends at similar time r, i represents the corresponding set score, sim r Represents the similarity of similar time r, trend i A score representing the final trend level.

[0075] From the above description, it can be seen that by weighting the trends of each similar time period and time point, the final trend grade score is obtained, which can be easily implemented and calculated to predict the water bloom disaster.

[0076] A water bloom disaster warning terminal based on similarity analysis includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0077] Step S1, obtaining algae data, meteorological data and water quality data, and preprocessing the algae data, meteorological data and water quality data to form a standard time series with the same time frequency;

[0078] Step S2, calculating the spatial distribution similarity based on the algae data of the standard time series;

[0079] Step S3, calculating the similarity of environmental conditions based on the algae data, meteorological data and water quality data of the standard time series;

[0080] Step S4, filtering similar time periods of environmental conditions according to the similarity of environmental conditions, filtering similar time points of spatial distribution according to the similarity of spatial distribution, and calculating the final subsequent trend level according to the similar time periods of environmental conditions and the similar time points of spatial distribution.

[0081] From the above description, it can be seen that the beneficial effect of the present invention is that it calculates the spatial distribution similarity and the environmental condition similarity, and obtains the subsequent trend level of the algae situation based on the spatial distribution similarity and the environmental condition similarity, so as to predict the algal bloom disaster. Compared with the existing algal bloom prediction method, it has the advantages of easy implementation and higher accuracy.

[0082] Furthermore, the step S3 specifically includes:

[0083] Step S31, using the Pearson correlation coefficient to calculate the correlation between all meteorological and water quality elements and algae changes;

[0084] Step S32, taking the element whose absolute value of correlation is greater than the set value as the key element related to the change of algae;

[0085] Step S33: Calculate the similarity of environmental conditions based on key factors related to algae changes.

[0086] From the above description, it can be seen that by screening the elements according to the correlation to obtain the key elements that need to be calculated, and calculating the key elements to obtain the environmental correlation, the complexity of the calculation is reduced through screening, making the whole method easier to implement.

[0087] Furthermore, the step S31 specifically includes:

[0088] For time series data, the Pearson correlation coefficient is used to screen the key factors related to algae changes. The calculation formula is as follows:

[0089]

[0090] In the formula, ρ represents the correlation, A and B represent the time series of algae and the time series of a single meteorological or water quality element, respectively, cov represents the covariance, and std represents the standard deviation;

[0091] The step S33 specifically includes:

[0092] The similarity of environmental conditions is calculated according to the following formula:

[0093]

[0094] In the formula, ω m is the factor weight, which is obtained according to the relevance of the factors. The greater the relevance, the higher the factor weight. m ,y m ) is the distance between a single element in two time series, Y is a sequence of multiple elements at time a, and X is a sequence of multiple elements at time b:

[0095]

[0096] In the formula, m is the main factor, so m in Y and X are equal, k and n are the time lengths, k <n;

[0097] The distance d(x) between a single feature in two time series m ,y m ) is calculated according to the following formula:

[0098]

[0099] Where l k For x m and m Distance from center alignment point:

[0100]

[0101] In the formula, i and j are the index numbers in the two sequences respectively, l Z is the distance of the Zth alignment point;

[0102] With constraints:

[0103] {x mn' ,…,x mn”}∈x m , n"-n'=[k-2, k+2];

[0104] Where n' is the starting position of the interception, and n" is the ending position of the interception. If:

[0105] l z-1=(x mn' ,y mk' );

[0106] Then the next alignment point:

[0107] l z =(x mn ,y mk );

[0108] The following conditions must be met: n-n'≤1 and k-k'≤1, n-n'≥0 and k-k'≥0.

[0109] From the above description, it can be seen that an example of the calculation method of environmental condition similarity is given. It overcomes the disadvantage of Euclidean distance that it cannot distinguish the similarity of shape and dynamic change amplitude through the dynamic time warping algorithm, and achieves the minimum sum of weighted distances through the local optimization method.

[0110] Furthermore, the step S2 specifically includes:

[0111] The spatial similarity s_spatial between time a and time b is calculated using the following formula: a,b :

[0112]

[0113] In the formula, s_num a,b is the numerical similarity of the spatial distribution between time a and time b, s_trend a,b is the trend similarity of the spatial distribution between time a and time b, ω num and ω trend are the weights of numerical similarity and trend similarity respectively;

[0114] Among them, for the numerical similarity s_num a,b , calculated according to the following formula:

[0115]

[0116] In the formula, x represents the algal cell concentration, that is, x ai represents the algal cell concentration at sampling point i at time a, x bi represents the algal cell concentration at sampling point i at time b, std xi is the standard deviation of algal cell concentration at sampling point i at all historical times, ω i Represents the weight of sampling point i, which is calculated using the following formula:

[0117]

[0118] In the formula, ω irepresents the weight of sampling point i, N represents the total number of sampling points, R represents the number of sub-regions, and R i Represents the number of sampling points in the sub-region to which sampling point i belongs;

[0119] For trend similarity s_trend a,b , calculated according to the following formula:

[0120]

[0121] In the formula, r ai represents the ranking of algae cell concentration at sampling point i at time a among all sampling points, r bi Indicates the ranking of algae cell concentration at sampling point i at time b among all sampling points, std ri is the standard deviation of the algal cell concentration ranking of sampling point i at all historical times.

[0122] From the above description, it can be seen that it gives a specific calculation method for spatial distribution similarity and realizes the calculation of spatial distribution similarity. Among them, by dividing the lake area into R sub-areas, weights are assigned to each point when calculating the numerical similarity, thus avoiding the similarity being excessively affected by areas with dense sampling points.

[0123] Furthermore, the step S4 specifically includes:

[0124] The subsequent trends of each similar time point or similar time period are graded, and the change range of algae cell concentration between the similar time point or the end time point of the similar time period and the next time point is calculated, and the corresponding set score is obtained according to the grade division of the subsequent trend, and the final trend grade score is calculated according to the following formula:

[0125]

[0126] In the formula, grade r Indicates the classification of subsequent trends at similar time r, i represents the corresponding set score, sim r Represents the similarity of similar time r, trend i A score representing the final trend level.

[0127] From the above description, it can be seen that by weighting the trends of each similar time period and time point, the final trend grade score is obtained, which can be easily implemented and calculated to predict the water bloom disaster.

[0128] Please refer to Figure 1 , Embodiment 1 of the present invention is:

[0129] A water bloom disaster early warning method based on similarity analysis comprises the following steps:

[0130] Step S1, acquiring algae data, meteorological data and water quality data, and preprocessing the algae data, meteorological data and water quality data to form a standard time series with the same time frequency.

[0131] Specifically, the algae data, meteorological data, and water quality data were preprocessed, including outlier removal, null value filling, and resampling to standard time series with the same time frequency.

[0132] Step S2: Calculate the spatial distribution similarity based on the algae data of the standard time series.

[0133] The spatial distribution similarity s_spatial between time a and time b is calculated based on the numerical similarity of algae cell concentration at each point and the trend similarity of algae cells at each point. a,b ;

[0134] Among them, time a refers to the current sampling time point, and time b refers to each historical sampling time point.

[0135] Specifically, the spatial similarity s_spatial is calculated using the following formula: a,b :

[0136]

[0137] In the formula, s_num a,b is the numerical similarity of the spatial distribution between time a and time b, s_trend a,b is the trend similarity of the spatial distribution between time a and time b, ω num and ω trend are weights of numerical similarity and trend similarity, respectively, which are given by technicians according to actual conditions. In this embodiment, the weight of numerical similarity ω num Specifically, it is 0.7, and the weight of trend similarity ω trend Specifically 0.3.

[0138] Among them, for the numerical similarity s_num a,b , calculated according to the following formula:

[0139]

[0140] In the formula, x represents the algal cell concentration, that is, x ai represents the algal cell concentration at sampling point i at time a, x bi represents the algal cell concentration at sampling point i at time b, std xi is the standard deviation of algal cell concentration at sampling point i at all historical times, ω i Represents the weight of sampling point i.

[0141] Due to geographical conditions and other factors, the locations of artificial sampling points are usually not evenly distributed. In order to avoid the similarity being too greatly affected by the area with dense sampling points, the lake area is divided into R sub-areas. When calculating the numerical similarity, a weight is assigned to each point. The weight calculation formula for each point is:

[0142]

[0143] In the formula, ω i represents the weight of sampling point i, N represents the total number of sampling points, R represents the number of sub-regions, and R i Represents the number of sampling points in the sub-region to which sampling point i belongs.

[0144] For trend similarity s_trend a,b , calculated according to the following formula:

[0145]

[0146] In the formula, r ai represents the ranking of algae cell concentration at sampling point i at time a among all sampling points, r bi Indicates the ranking of algae cell concentration at sampling point i at time b among all sampling points, std ri is the standard deviation of the algal cell concentration ranking of sampling point i at all historical times.

[0147] Step S3: Calculate the similarity of environmental conditions based on the algae data, meteorological data and water quality data of the standard time series.

[0148] Specifically, step S3 includes:

[0149] Step S31, using the Pearson correlation coefficient to calculate the correlation between all meteorological and water quality elements and algae changes;

[0150] Specifically, for the similarity of environmental conditions, the Pearson correlation coefficient was used to screen the key factors related to algae changes for time series data. The calculation formula is as follows:

[0151]

[0152] Where ρ represents correlation, A and B represent the time series of algae and the time series of a single meteorological or water quality element, respectively, cov represents covariance, and std represents standard deviation.

[0153] Step S32: taking the elements with absolute correlation values ​​greater than 0.5 as key elements related to algae changes.

[0154] Step S33: Calculate the similarity of environmental conditions based on key factors related to algae changes.

[0155] Specifically, let the multiple main element sequences at time a be represented as Y, and the multiple main element sequences at time b be represented as X, then:

[0156]

[0157] In the formula, m is the main factor, so m in Y and X are equal, k and n are the time lengths, k <n。

[0158] Then the historical time set R with similar meteorological and water quality conditions is:

[0159] R = {X i |Find(Sim(X i ,Y)),X i ∈X};

[0160] It can be seen that due to the presence of multiple influencing factors, both Y and X are multivariate time series, and the time series similarity measure based on a single variable is improved when searching for similar time. Commonly used time series similarity measure methods based on a single variable include Euclidean distance, dynamic time warping (Dynamic Time Warping, DTW), etc. Among them, the DTW algorithm overcomes the disadvantage of the Euclidean distance that it cannot distinguish the similarity of shape and dynamic change amplitude, and achieves the minimum weighted distance sum through a local optimization method. Therefore, the present invention uses an improved DTW algorithm to calculate the similarity of time series.

[0161] Specifically, for two time series with m influencing factors, the similarity of their environmental conditions is calculated as:

[0162]

[0163] In the formula, ω m is the factor weight, which is obtained according to the relevance of the factors. The greater the relevance, the higher the factor weight. m ,y m ) is the distance between a single element in two time series, and the DTW method is used to solve it. Let x m and m Distance from center alignment point:

[0164]

[0165] In the formula, i and j are the index numbers in the two sequences respectively, then:

[0166]

[0167] Since the path must start from the starting point and end at the end point, that is, the beginning and end of the two sequences must match, it has boundary conditions:

[0168] l1=(x mn' ,y m1 ), l z =(x mn ”,y mk );

[0169] in:

[0170] {x mn' ,…,x mn”}∈x m , n"-n'=[k-2, k+2];

[0171] In the formula, n' is the starting position of the interception, n" is the ending position of the interception, and n"-n' limits the interception time length to not differ from the target sequence by more than two time units.

[0172] Since alignment cannot cross a certain point, each point of the two sequences needs to be matched, and they are continuous if:

[0173] l z-1 =(x mn' ,y mk' );

[0174] The next alignment point

[0175] l z =(x mn ,y mk );

[0176] The following conditions must be met: n-n'≤1 and k-k'≤1;

[0177] Since the alignment points are monotonically performed over time, it is guaranteed that the two alignment lines will not intersect, and it is also monotonic if:

[0178] l z-1 =(x mn' ,y mk' );

[0179] The next alignment point

[0180] l z =(x mn ,y mk );

[0181] The following conditions must be met: n-n'≥0 and k-k'≥0.

[0182] Step S4, filtering similar time periods of environmental conditions according to the similarity of environmental conditions, filtering similar time points of spatial distribution according to the similarity of spatial distribution, and calculating the final subsequent trend level according to the similar time periods of environmental conditions and the similar time points of spatial distribution.

[0183] Specifically, each subsequent trend is graded into five levels, including a sharp rise, a slight rise, a flattening, a slight decline, and a sharp decline. The change in algae cell concentration between it and the next time point is calculated based on a similar time point or the end of a similar time period, and is divided into 0.4, 0.1, -0.1, and -0.4 as the dividing values, and then the weighted average is used to obtain the final trend grade score:

[0184]

[0185] In the formula, grade r Indicates the subsequent change trend level of similar time r, sim r represents the similarity of similar time r, trend i A score representing the final trend level.

[0186] Please refer to Figure 2 , Embodiment 2 of the present invention is:

[0187] A water bloom disaster warning method terminal 1 based on similarity analysis includes a memory 3, a processor 2, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, the steps of the above-mentioned embodiment 1 are implemented.

[0188] In summary, the present invention provides a water bloom disaster warning method and terminal based on similarity analysis, which calculates the spatial similarity and temporal similarity of the environment, and obtains the subsequent trend level of the algae situation according to the temporal similarity and spatial similarity, thereby predicting the water bloom disaster. Compared with the existing water bloom prediction method, it has the advantages of easy implementation and high accuracy. The elements are screened according to the correlation to obtain the key elements that need to be calculated, and the key elements are calculated to obtain the environmental correlation. The complexity of the calculation is reduced by screening, making the whole method easier to implement. The dynamic time warping algorithm overcomes the disadvantage that the Euclidean distance cannot distinguish the similarity of the shape and the dynamic change amplitude. The local optimization method is used to achieve the minimum weighted distance sum. By dividing the lake area into R sub-areas, weights are assigned to each point when calculating the numerical similarity, which avoids the similarity being too greatly affected by the area with dense sampling points.

[0189] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A water bloom disaster early warning method based on similarity analysis, characterized in that: Includes steps: Step S1, obtaining algae data, meteorological data and water quality data, and preprocessing the algae data, meteorological data and water quality data to form a standard time series with the same time frequency; Step S2, calculating the spatial distribution similarity based on the algae data of the standard time series; The step S2 specifically includes: The spatial similarity between time a and time b is calculated using the following formula: : ; In the formula, is the numerical similarity of the spatial distribution at time a and time b, is the trend similarity of the spatial distribution between time a and time b, and are the weights of numerical similarity and trend similarity respectively; Among them, for the numerical similarity , calculated according to the following formula: ; In the formula, represents the algal cell concentration, i.e. Indicates time Sampling point The algal cell concentration, Indicates time Sampling point The algal cell concentration, For sampling point The standard deviation of algal cell concentration at all historical times, Representative sampling points The weight is calculated using the following formula: ; In the formula, Representative sampling points The weight of N represents the total number of sampling points, and R represents the number of sub-regions. Representative sampling points The number of sampling points in the sub-area; For trend similarity , calculated according to the following formula: ; In the formula, Indicates time Sampling point The ranking of algae cell concentration among all sampling points, Indicates time Sampling point The ranking of algae cell concentration among all sampling points, For sampling point The standard deviation of the algal cell concentration rankings at all historical times; Step S3, calculating the similarity of environmental conditions based on the algae data, meteorological data and water quality data of the standard time series; The step S3 specifically includes: Step S31, using the Pearson correlation coefficient to calculate the correlation between all meteorological and water quality elements and algae changes; Step S32, taking the element whose absolute value of correlation is greater than the set value as the key element related to the change of algae; Step S33, calculating the similarity of environmental conditions based on key factors related to algae changes; Step S4, filtering similar time periods of environmental conditions according to the similarity of environmental conditions, filtering similar time points of spatial distribution according to the similarity of spatial distribution, and calculating the final subsequent trend level according to the similar time periods of environmental conditions and the similar time points of spatial distribution.

2. The water bloom disaster early warning method based on similarity analysis according to claim 1 is characterized in that: The step S31 specifically includes: For time series data, the Pearson correlation coefficient is used to screen the key factors related to algae changes. The calculation formula is as follows: ; In the formula, represents correlation, A and B represent the time series of algae and the time series of a single meteorological or water quality element, respectively. represents the covariance, represents standard deviation; The step S33 specifically includes: The similarity of environmental conditions is calculated according to the following formula: ; In the formula, is the factor weight, which is obtained according to the relevance of the factors. The greater the relevance, the higher the weight of the factor. is the distance between a single element in two time series, Y is a sequence of multiple elements at time a, and X is a sequence of multiple elements at time b: ; In the formula, As the main factor, so Y and X equal, is the length of time, ; The distance between a single feature in two time series Calculated according to the following formula: ; Where l k for and Distance from center alignment point: ; In the formula, i and j are the index numbers in the two sequences respectively, l Z is the distance of the Zth alignment point; With constraints: , ; Where n' is the starting position of the interception, and n" is the ending position of the interception. If: ; Then the next alignment point: ; Requirements: and , and .

3. The water bloom disaster early warning method based on similarity analysis according to claim 1 is characterized in that: The step S4 specifically includes: The subsequent trends of each similar time point or similar time period are graded, and the change range of algae cell concentration between the similar time point or the end time point of the similar time period and the next time point is calculated, and the corresponding set score is obtained according to the grade division of the subsequent trend, and the final trend grade score is calculated according to the following formula: ; In the formula, represents the classification of subsequent trends at similar time r, Indicates the corresponding set score, represents the similarity of similar time r, A score representing the final trend level.

4. A water bloom disaster warning terminal based on similarity analysis, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: Step S1, obtaining algae data, meteorological data and water quality data, and preprocessing the algae data, meteorological data and water quality data to form a standard time series with the same time frequency; Step S2, calculating the spatial distribution similarity based on the algae data of the standard time series; The step S2 specifically includes: The spatial similarity between time a and time b is calculated using the following formula: : ; In the formula, is the numerical similarity of the spatial distribution at time a and time b, is the trend similarity of the spatial distribution between time a and time b, and are the weights of numerical similarity and trend similarity respectively; Among them, for the numerical similarity , calculated according to the following formula: ; In the formula, represents the algal cell concentration, i.e. Indicates time Sampling point The algal cell concentration, Indicates time Sampling point The algal cell concentration, For sampling point The standard deviation of algal cell concentration at all historical times, Representative sampling points The weight is calculated using the following formula: ; In the formula, Representative sampling points The weight of N represents the total number of sampling points, and R represents the number of sub-regions. Representative sampling points The number of sampling points in the sub-area; For trend similarity , calculated according to the following formula: ; In the formula, Indicates time Sampling point The ranking of algae cell concentration among all sampling points, Indicates time Sampling point The ranking of algae cell concentration among all sampling points, For sampling point The standard deviation of the algal cell concentration rankings at all historical times; Step S3, calculating the similarity of environmental conditions based on the algae data, meteorological data and water quality data of the standard time series; The step S3 specifically includes: Step S31, using the Pearson correlation coefficient to calculate the correlation between all meteorological and water quality elements and algae changes; Step S32, taking the element whose absolute value of correlation is greater than the set value as the key element related to the change of algae; Step S33, calculating the similarity of environmental conditions based on key factors related to algae changes; Step S4, filtering similar time periods of environmental conditions according to the similarity of environmental conditions, filtering similar time points of spatial distribution according to the similarity of spatial distribution, and calculating the final subsequent trend level according to the similar time periods of environmental conditions and the similar time points of spatial distribution.

5. The water bloom disaster early warning terminal based on similarity analysis according to claim 4 is characterized in that: The step S31 specifically includes: For time series data, the Pearson correlation coefficient is used to screen the key factors related to algae changes. The calculation formula is as follows: ; In the formula, represents correlation, A and B represent the time series of algae and the time series of a single meteorological or water quality element, respectively. represents the covariance, represents standard deviation; The step S33 specifically includes: The similarity of environmental conditions is calculated according to the following formula: ; In the formula, is the factor weight, which is obtained according to the relevance of the factors. The greater the relevance, the higher the weight of the factor. is the distance between a single element in two time series, Y is a sequence of multiple elements at time a, and X is a sequence of multiple elements at time b: ; In the formula, As the main factor, so Y and X equal, is the length of time, ; The distance between a single feature in two time series Calculated according to the following formula: ; Where l k for and Distance from center alignment point: ; In the formula, i and j are the index numbers in the two sequences respectively, l Z is the distance of the Zth alignment point; With constraints: , ; Where n' is the starting position of the interception, and n" is the ending position of the interception. If: ; Then the next alignment point: ; Requirements: and , and .

6. The water bloom disaster early warning terminal based on similarity analysis according to claim 4 is characterized in that: The step S4 specifically includes: The subsequent trends of each similar time point or similar time period are graded, and the change range of algae cell concentration between the similar time point or the end time point of the similar time period and the next time point is calculated, and the corresponding set score is obtained according to the grade division of the subsequent trend, and the final trend grade score is calculated according to the following formula: ; In the formula, represents the classification of subsequent trends at similar time r, Indicates the corresponding set score, represents the similarity of similar time r, A score representing the final trend level.

Citation Information

Patent Citations

  • Time-series similarity measurement method based on segmented statistical approximate representation

    CN104462217A

  • Method for measuring the space-time multi-variant hydrological time series similarity

    CN108537247A