River dissolved oxygen key factor identification method based on nonlinearity and time-varying characteristics
By combining the maximum information coefficient method and cross wavelet transform with principal component analysis, the problem of insufficient accuracy in identifying key factors of dissolved oxygen in traditional methods was solved, and high-precision identification and dynamic relationship analysis of factors affecting river dissolved oxygen were achieved.
Patent Information
- Application Number
- CN202511099790.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-08-07
AI Technical Summary
Traditional methods have difficulty in accurately identifying the key factors of dissolved oxygen in rivers, especially due to the nonlinear relationship and time-varying characteristics between dissolved oxygen and influencing factors, which leads to insufficient accuracy of correlation analysis.
A method based on nonlinear and time-varying characteristics was used to screen out significant influencing factors using the maximum information coefficient method. The time-frequency domain correlation between dissolved oxygen and influencing factors was analyzed using cross-wavelet transform, and the degree of influence was quantified using principal component analysis.
The accuracy of identifying key factors of dissolved oxygen has been improved, and the key influencing factors of dissolved oxygen concentration can be identified, providing more fine-grained analysis results, and revealing the complex nonlinear relationship and dynamic changes between dissolved oxygen and environmental factors.
Smart Images

Figure CN120596880A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of water quality monitoring and data analysis, and in particular relates to a method for identifying key factors of river dissolved oxygen based on nonlinear and time-varying characteristics. Background Art
[0002] Dissolved oxygen in water is essential for the survival of aquatic life. Adequate dissolved oxygen is essential for the survival of aquatic organisms and a key indicator of the health of aquatic ecosystems. However, dissolved oxygen concentration is affected by multiple factors, such as water temperature, water quality, and light intensity. These factors can exhibit complex nonlinear relationships and time-varying characteristics, making accurate identification of key factors affecting dissolved oxygen challenging. Changes in dissolved oxygen concentration respond to changes in these factors with a certain delay. To effectively manage and protect aquatic ecosystems, in-depth analysis of the correlations between dissolved oxygen and its influencing factors is necessary. Traditional correlation analysis methods are often limited to linear relationships and struggle to reveal the signal's characteristics in the time-frequency domain. Therefore, a method is needed that can comprehensively analyze the nonlinear relationships between dissolved oxygen and influencing factors and visualize the signal characteristics in the time-frequency domain to identify the key factors influencing dissolved oxygen in rivers. Summary of the Invention
[0003] In order to solve the technical problems existing in the prior art, the present invention proposes a method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics. The method can handle the nonlinear relationship between dissolved oxygen and its influencing factors, analyze the correlation between the two in the time-frequency domain, comprehensively analyze the correlation between dissolved oxygen and influencing factors, and effectively identify the key factors affecting river dissolved oxygen.
[0004] The object of the present invention can be achieved by adopting the following technical solutions: A method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics, the method comprising: S1. Select multiple factors affecting dissolved oxygen in rivers to construct an initial factor set, and use the maximum information coefficient (MIC) method to calculate the MIC value of dissolved oxygen and each factor affecting the initial factor set; S2. Set a target MIC value, select several factors whose MIC values are greater than the target MIC value, and arrange the several influencing factors in descending order of MIC values to form a second factor set; S3. Using cross wavelet transform (XWT), the cross wavelet power spectrum, cross wavelet phase spectrum and cross wavelet coherence condensation spectrum of dissolved oxygen and each influencing factor of the second factor set are calculated respectively; S4. Draw a cross-wavelet power spectrum and phase spectrum based on the calculated cross-wavelet power spectrum, cross-wavelet phase spectrum, and cross-wavelet coherence coefficient. According to the wavelet power spectrum and phase spectrum, analyze the dissolved oxygen and obtain influencing factors that are significantly correlated with dissolved oxygen at different scales and frequencies. S5. Quantify the degree of influence of each influencing factor that is significantly correlated with dissolved oxygen on dissolved oxygen through principal component analysis, identify the key factors affecting dissolved oxygen based on the degree of influence, and output the key factors affecting dissolved oxygen.
[0005] Specifically, the step S1 includes the following steps: S11. Select multiple factors affecting dissolved oxygen in rivers from meteorological indicators, hydrological indicators, and water quality indicators to form an initial factor set. Use the initial factor set as the independent variable X and the dissolved oxygen concentration as the dependent variable Y to construct a data set D. S12, gridding the scatter plot of the data set D by x rows and y columns along the X-axis and Y-axis to obtain a grid G, calculating the mutual information of different probability distributions of the data set D on the grid G and taking the maximum mutual information to obtain the maximum mutual information value of the different probability distributions; S13. Normalize the maximum mutual information values of different probability distributions to obtain the MIC value between each influencing factor and dissolved oxygen.
[0006] Specifically, the step S2 includes the following steps: The target MIC value was set to 0.3, and several influencing factors with MIC values ≥ 0.3 were screened out. The influencing factors were arranged in descending order according to the MIC values to form the second factor set.
[0007] Specifically, the step S3 includes the following steps: S31, performing continuous wavelet transform on the influencing factor time series and the dissolved oxygen time series of the second factor set, respectively, to obtain continuous wavelet transform results of the influencing factor time series and the dissolved oxygen time series, and calculating the cross wavelet power spectrum according to the continuous wavelet transform results; S32. Calculating a cross-wavelet phase spectrum of the influencing factor time series and the dissolved oxygen time series based on the continuous wavelet transform results of the influencing factor time series and the dissolved oxygen time series; S33. Calculate the cross-wavelet coherence coefficient of the influencing factor time series and the dissolved oxygen time series based on the continuous wavelet transform results and the cross-wavelet power spectrum.
[0008] Specifically, the step S4 includes the following steps: S41, plotting a cross wavelet power spectrum according to the calculated cross wavelet power spectrum, analyzing the interaction strength between dissolved oxygen and various influencing factors at different time and frequency scales according to the cross wavelet power spectrum, and obtaining a cross wavelet power spectrum analysis result; S42. Draw a cross-wavelet phase spectrum according to the calculated cross-wavelet phase spectrum and cross-wavelet coherence coefficient, analyze the time-frequency correlation between dissolved oxygen and each influencing factor according to the wavelet coherence coefficient value displayed on the cross-wavelet phase spectrum, analyze the positive and negative correlation between dissolved oxygen and each influencing factor in the time-frequency domain according to the phase relationship displayed on the cross-wavelet phase spectrum, and obtain the cross-wavelet phase spectrum analysis result; S43. Based on the results of cross-wavelet power spectrum analysis and cross-wavelet phase spectrum analysis, the correlation and changes between dissolved oxygen and influencing factors at different scales and frequencies were analyzed. The short-term changes of the correlation were reflected by the high-frequency scale, and the long-term changes of the correlation were reflected by the low-frequency scale. The influencing factors with significant correlation with dissolved oxygen at different scales and frequencies were obtained.
[0009] Specifically, step S41 includes the steps of: drawing the cross-wavelet power spectrum in the form of a two-dimensional image to obtain a cross-wavelet power spectrum diagram, with time as the horizontal axis and scale or frequency as the vertical axis, and the color depth represents the size of the cross-wavelet power; the darker the color, the greater the cross-wavelet power, indicating that the correlation between the two variables at this time and scale is stronger.
[0010] Specifically, step S42 includes the steps of: plotting the wavelet coherence in the form of a two-dimensional image based on the calculated cross-wavelet phase spectrum and cross-wavelet coherence coefficient to obtain a cross-wavelet phase spectrum, with time as the horizontal axis and scale or frequency as the vertical axis, and the color depth represents the magnitude of the wavelet coherence. The darker the color, the greater the wavelet coherence, indicating that the linear correlation between the two variables at this time and scale is stronger; using color or arrows to represent phase differences, revealing the lead or lag relationship between the two variables, the direction of the arrow represents the lead or lag of one variable relative to the other variable, and the angle of the arrow represents the magnitude of the phase difference.
[0011] Specifically, step S5 includes the following steps: S51. The influencing factors that are significantly correlated with dissolved oxygen are grouped into a significant factor set, and the data of the significant factor set are standardized to construct a variable matrix; S52, calculating the covariance matrix of the variable matrix, calculating the eigenvalues of the covariance matrix, and calculating the corresponding eigenvectors according to the eigenvalues; S53, calculating and obtaining a plurality of principal components according to the eigenvector and the variable matrix; S54. Calculate the contribution rate and cumulative contribution rate of each principal component, set a preset range for the cumulative contribution rate, select p principal components whose cumulative contribution rate is within the preset range, and obtain the key influencing factors that ultimately affect dissolved oxygen based on the p principal components.
[0012] Compared with the prior art, the present invention has the following advantages and beneficial effects: The present invention provides a method for identifying key factors of dissolved oxygen based on nonlinear and time-varying characteristics. By combining the maximum information coefficient method and cross wavelet transform to analyze the correlation between dissolved oxygen and environmental influencing factors, the maximum information coefficient method is used to calculate the MIC value of dissolved oxygen and each influencing factor in the initial factor set. The nonlinear relationship between variables can be captured through the MIC value, which makes up for the shortcomings of traditional linear analysis methods, reveals the complex nonlinear relationship between dissolved oxygen and environmental influencing factors, and improves the accuracy of correlation analysis. Cross wavelet transform is used for analysis in the time-frequency domain, which can capture the correlation between time series in different time periods and different frequencies, identify the dynamic relationship between dissolved oxygen and environmental factors that changes over time, distinguish short-term disturbances from long-term trends, quantify the degree of influence of each influencing factor that has a significant correlation with dissolved oxygen on dissolved oxygen through principal component analysis, identify the key factors affecting dissolved oxygen according to the degree of influence, effectively identify the key influencing factors of dissolved oxygen concentration, and provide more fine-grained analysis results. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0014] Figure 1 4 is a flow chart of a method for identifying key factors of river dissolved oxygen based on nonlinear and time-varying characteristics in an embodiment of the present invention; Figure 2 1 is a comparative relationship diagram of dissolved oxygen and water temperature data changing over time in an embodiment of the present invention; Figure 3 Schematic diagram of the maximum information coefficient (MIC) value between dissolved oxygen concentration and various factors in the embodiment of the present invention; Figure 4 is a cross wavelet power spectrum of dissolved oxygen and water temperature in an embodiment of the present invention; Figure 5 3 is a cross-wavelet phase spectrum of dissolved oxygen and water temperature in an embodiment of the present invention. DETAILED DESCRIPTION
[0015] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is obvious that the embodiments described are only some embodiments of the present invention, not all embodiments, and the implementation of the present invention is not limited to these. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0016] Example 1: like Figure 1 As shown, the method for identifying key factors of river dissolved oxygen based on nonlinear and time-varying characteristics of the present invention includes the following steps: S1. Select multiple factors affecting dissolved oxygen in rivers to construct an initial factor set, and use the maximum information coefficient method to calculate the MIC values of dissolved oxygen and each influencing factor in the initial factor set.
[0017] Specifically, the maximum information coefficient (MIC) method is a statistical method for measuring the correlation between variables. Through dynamic grid division, the maximum mutual information value of variables at different resolutions is calculated. The maximum mutual information value, namely the MIC value, is used to describe the nonlinear relationship between dissolved oxygen and different influencing factors, but it is difficult to characterize the mutual relationship and localization characteristics between different signals in the time and frequency domains.
[0018] S11. Select multiple factors affecting dissolved oxygen in rivers from meteorological indicators, hydrological indicators, and water quality indicators to form an initial factor set. Use the initial factor set as the independent variable X and the dissolved oxygen concentration as the dependent variable Y to construct the data set D(X,Y). Let the initial factor set be .
[0019] In this embodiment, meteorological, hydrological and water quality data are used as independent variable indicators. In order to comprehensively analyze the influencing factors of river dissolved oxygen, 20 influencing factors of river dissolved oxygen are selected from meteorological indicators, hydrological indicators and water quality indicators to form an initial factor set, wherein meteorological indicators include precipitation, temperature, water vapor pressure, sea level pressure, 2-minute average wind speed, 2-minute average wind direction, relative humidity and horizontal visibility. Hydrological indicators include water temperature, conductivity, pH, water level, flow rate, flow velocity and turbidity. Water quality indicators include total nitrogen, ammonia nitrogen, total phosphorus, permanganate index and dissolved oxygen 25 days ago. Assume that the initial factor set is , let dissolved oxygen concentration be Y. Since the individual variable indicators are different, their dimensions and time intervals are also different. Therefore, it is necessary to preprocess the data related to the individual variable indicators, smooth the data, eliminate noise, fill missing values in the data through interpolation, and standardize the data to eliminate the influence of dimension. In this example, a river basin in a certain province was selected as the experimental area. Based on the 2018-2020 data of five long-term series of meteorological stations and hydrological and water quality monitoring stations in the river basin of the province, a dataset D(X,Y) was constructed. Specifically, it includes meteorological data and hydrological and water quality data. The meteorological station data includes precipitation, temperature, water vapor pressure, sea level pressure, 2-minute average wind speed, 2-minute average wind direction, relative humidity, and horizontal visibility; the hydrological data includes water temperature, conductivity, pH, water level, flow rate, flow velocity, and turbidity; and the water quality data includes total nitrogen, ammonia nitrogen, total phosphorus, permanganate index, and dissolved oxygen 25 days ago.
[0020] like Figure 2 The figure below shows a comparison of dissolved oxygen and water temperature data over time. This graph shows the relationship between dissolved oxygen concentration (DO) and water temperature over time. The horizontal axis is the time series, the primary vertical axis is dissolved oxygen concentration (mg / L), and the secondary vertical axis is water temperature. By comparing the two, it can be seen that, in general, as water temperature increases, dissolved oxygen decreases.
[0021] In this embodiment, the independent variable X and the dependent variable Y in the data set D(X,Y) are standardized to eliminate the influence of the variable dimensions so that they have the same scale. The calculation formula is as follows: ; in: is the standardized value of the independent variable, which represents the standardized value of the jth factor on the i-th day; is the original data value, which represents the observed value of the jth factor on the i-th day; is the mean of the jth variable; is the standard deviation of the jth variable.
[0022] Based on water temperature, DO 25 Taking the 5-day monitoring data of the variables as an example, the dataset D is formed. After the dataset D is standardized, the data matrix Z is obtained. The dataset D and the matrix Z are as follows: D ; ; S12. Grid the scatter plot of the data set D(X,Y) by x rows and y columns along the X and Y axes to obtain x x yGrid G, calculate the mutual information of different probability distributions of data set D(X,Y)D on grid G and take the maximum mutual information to obtain the maximum mutual information value of different probability distributions.
[0023] The scatter plot of the finite data set D(X,Y) is gridded along the X-axis and Y-axis to obtain x rows and y columns. y The grid G, with The distribution (i.e., probability density) of the data set D on the grid G can be obtained by the proportion of points falling into the grid G in the data set D. Different grid G division methods will result in different Probability distribution, calculate different The mutual information of probability distribution, the mutual information calculation formula is: ; Where I(X,Y) is the mutual information between variables X and Y; P(x,y) is the joint density function of variables X and Y; P(x) and P(y) are the marginal density functions of X and Y, respectively. Mutual information is a useful measure of information in information theory, representing the amount of information one random variable contains about another. It can also be understood as the reduction of the uncertainty of one random variable due to the certainty of the other.
[0024] Take the maximum mutual information and get the maximum mutual information value for different probability distributions: ; Where: To press xx y The maximum mutual information value of the partitioned grid G.
[0025] S13. Normalize the maximum mutual information values on grids G of different sizes to obtain the MIC value between each influencing factor and dissolved oxygen.
[0026] In order to facilitate comparison and analysis between data of different units or magnitudes, the maximum information value is normalized: ; Where: is the maximum mutual information value after normalization.
[0027] Different xx y The value is divided into grids The maximum value is the maximum information coefficient (MIC value) between variables X and Y. The MIC value is within (0, 1), 1 indicates complete correlation, and 0 indicates independence.
[0028] The MIC value between each influencing factor and dissolved oxygen is expressed as , Expressed as: ; Where: is the upper limit of the number of grids, n is the number of variable samples in the data set, is the maximum mutual information value after normalization.
[0029] like Figure 3 As shown in the figure, the maximum information coefficient (MIC) value results between dissolved oxygen concentration and various factors are shown. The figure shows the maximum information coefficient (MIC) values between dissolved oxygen concentration (DO) and other environmental factors, which are displayed on two time scales of 1 hour and 12 hours respectively. Each small circle represents the relationship between a factor. The size and color of the circle indicate the strength of the correlation. The darker the color, the larger the circle, and the stronger the correlation. In the 1-hour graph, DO and dissolved oxygen concentration 25 days ago (DO 25 ), the MIC values of electrical conductivity (EC) were 0.64 and 0.44 respectively, and the color was very dark, indicating that DO 25、 There is a strong correlation between EC and dissolved oxygen concentration. This result is also seen in the 12-hour graph.
[0030] S2. Set a target MIC value, screen several influencing factors whose MIC values are greater than the target MIC value, and arrange the several influencing factors in descending order of MIC values to form a second factor set.
[0031] Specifically, the maximum mutual information coefficient value between the factor and dissolved oxygen, that is, the MIC value, is between 0 and 1. The larger the MIC value, the greater the nonlinear correlation strength between DO and the environmental factor. The target MIC value can be set to 0.3, and several influencing factors with MIC values ≥ 0.3 are screened and arranged in order from large to small to form the second factor set. ={X1, X2…, X m}, m≤n. In this example, ={water temperature, conductivity, pH value, vapor pressure, ammonia nitrogen, total nitrogen, DO 25}.
[0032] S3. Use cross wavelet transform (XWT) to calculate the cross wavelet power spectrum, cross wavelet phase spectrum and cross wavelet coherence condensation spectrum of dissolved oxygen and each influencing factor of the second factor set respectively.
[0033] Cross-wavelet transform is a time-frequency domain analysis tool. It can overcome some of the applicability limitations of conventional correlation analysis methods, analyze the time domain and frequency domain of two time series from multiple time scales, and study their mutual relationship. From the perspective of multiple time scales, the study reveals the correlation between two related variables in different periods, as well as the synchronization problem between factors, reflecting their synchronization in the time domain. The combination of the two can more comprehensively analyze the correlation between dissolved oxygen and influencing factors.
[0034] S31. Calculate the cross wavelet power spectrum, perform continuous wavelet transform on the influencing factor time series and dissolved oxygen time series of the second factor set respectively, obtain the continuous wavelet transform results of the influencing factor time series and dissolved oxygen time series, and calculate the cross wavelet power spectrum based on the continuous wavelet transform results.
[0035] This example uses water temperature as an example to collect water temperature time series data X(t) and dissolved oxygen time series data Y(t). The two series data are equally spaced, continuous, and have the same time range. Continuous wavelet transform is performed on the time series X(t) (water temperature) and Y(t) (dissolved oxygen), and the continuous wavelet transform results are obtained respectively. and , the formula is: ; ; Where: s is the scale parameter (the inverse of the frequency), is the translation parameter (time), is the selected wavelet basis function (Morlet wavelet is usually selected), and * is the complex conjugate.
[0036] According to the continuous wavelet transform results and Calculate the cross wavelet power spectrum, which can be expressed as: ; In the formula, * represents complex conjugate, represents the cross wavelet power spectrum, It represents the power spectrum density of the cross wavelet transform. The larger the power spectrum density value is, the higher the energy value of the two time series of dissolved oxygen and water temperature is, and the stronger the correlation between the two series in the specific time-frequency domain is. The complex value part of can show the local correlation phase of the two time series in time and frequency.
[0037] S32. Calculate the cross-wavelet phase spectrum of the influencing factor time series and the dissolved oxygen time series according to the continuous wavelet transform results of the influencing factor time series and the dissolved oxygen time series.
[0038] The cross-wavelet phase spectrum can reflect the lag time characteristics of two time series in different time domains. According to the phase, the positive and negative correlation between the two series in the time-frequency domain can be analyzed. The phase angle is represented by arrows pointing in different directions, proving that the two time series have different lag correlations at different scales. The formula for calculating the phase angle between two time series is: ; Phase angle is used to reflect the synchronization of dissolved oxygen and water temperature. Phase angle 0°: reflects the same phase (positive correlation). Phase angle ±180°: reflects the opposite phase (negative correlation). Phase angle ±90°: reflects the leading or lagging relationship.
[0039] S33. Calculate the cross-wavelet coherence coefficient of the influencing factor time series and the dissolved oxygen time series based on the continuous wavelet transform results and the cross-wavelet power spectrum.
[0040] The correlation between the two wavelet transforms in the time-frequency domain indicates how the signal changes over time. Even if it corresponds to a low energy value area in the cross-wavelet power spectrum, it may be very significant in the wavelet coherence condensation spectrum. Wavelet coherence coefficient of the two time series of dissolved oxygen and water temperature The calculation formula is: ; in, and is the wavelet transform result in S31, is the cross wavelet power spectrum, is the smoothing operator, , the closer the coherence value is to 1, the stronger the correlation is.
[0041] Specifically, it is also possible to test and analyze whether the correlation between the cross wavelet spectrum and the phase spectrum is significant. In this embodiment, the Monte Carlo method is used to test whether the correlation between the time series X(t) (water temperature) and Y(t) (dissolved oxygen) is significant. According to the wavelet coherence coefficient of the two time series of dissolved oxygen and water temperature, Calculate the results, record the maximum coherence value, and compare these maximum coherence values with the wavelet coherence values of the original time series. If the wavelet coherence value of the original time series is greater than the 95% or 99% maximum coherence value in the Monte Carlo simulation, the coherence is considered significant.
[0042] S4. Draw the cross-wavelet power spectrum and phase spectrum according to the calculated cross-wavelet power spectrum, cross-wavelet phase spectrum and cross-wavelet coherence coefficient. According to the wavelet power spectrum and phase spectrum, the dissolved oxygen analysis is judged to obtain the influencing factors that are significantly correlated with dissolved oxygen at different scales and frequencies.
[0043] Cross-wavelet transform not only satisfies the correlation analysis between dissolved oxygen and various influencing factors, but also can show the areas of common change between the two series (including low-energy spectrum segments). Cross-wavelet transform is performed on the dissolved oxygen time series data and the water temperature, conductivity, pH value, water vapor pressure, ammonia nitrogen, total nitrogen, and dissolved oxygen 25 days ago at the same time. This example takes dissolved oxygen and water temperature as an example to analyze the resonance period, significant time period, and phase relationship between the dissolved oxygen level and water temperature in the time-frequency domain of the river. Figure 4-5 shown.
[0044] S41. Draw a cross wavelet power spectrum according to the calculated cross wavelet power spectrum, analyze the interaction intensity between dissolved oxygen and various influencing factors at different time and frequency scales according to the cross wavelet power spectrum, and obtain the cross wavelet power spectrum analysis results.
[0045] Specifically, the cross-wavelet power spectrum is plotted in the form of a two-dimensional image to obtain a cross-wavelet power spectrum diagram, with time as the horizontal axis and scale or frequency as the vertical axis. The color depth represents the size of the cross-wavelet power; the darker the color, the greater the cross-wavelet power, indicating that the correlation between the two variables at this time and scale is stronger.
[0046] like Figure 4 The figure shows the cross-wavelet power spectrum of dissolved oxygen and water temperature, revealing the strength of the interaction between dissolved oxygen and water temperature at different time-frequency scales. The horizontal axis represents time, indicating the temporal variation of the analyzed signal, while the vertical axis represents scale, indicating the periodic characteristics of the signal (high scale corresponds to low frequency, low scale corresponds to high frequency). The color bar in the figure represents the magnitude of the cross-wavelet power; darker colors indicate stronger interaction between the signals. The thin solid line in the figure represents the boundary of the wavelet cone of influence (COD), and the inner part represents the region of significant spectral values. Color represents correlation, with darker colors indicating stronger correlation. The area enclosed by the thick solid line indicates the region where the energy density passes the red noise test at a 95% confidence level, indicating strong correlation. The short- and long-cycle changes in dissolved oxygen and water temperature are unevenly distributed and have local characteristics. Within the main cycle of 180 days, or about half a year, a band-shaped significant high-energy area appeared and passed the significance test. The correlation between dissolved oxygen and water temperature is stable, showing a negative correlation, and dissolved oxygen has obvious seasonal changes; in the secondary cycle of about 16-32 days (2019 / 05-2019 / 09), the correlation between dissolved oxygen and water temperature is unstable.
[0047] S42. Draw a cross-wavelet phase spectrum according to the calculated cross-wavelet phase spectrum and cross-wavelet coherence coefficient, analyze the time-frequency correlation between dissolved oxygen and each influencing factor according to the wavelet coherence coefficient value displayed on the cross-wavelet phase spectrum, analyze the positive and negative correlation between dissolved oxygen and each influencing factor in the time-frequency domain according to the phase relationship displayed on the cross-wavelet phase spectrum, and obtain the cross-wavelet phase spectrum analysis results.
[0048] Specifically, based on the calculated cross-wavelet phase spectrum and cross-wavelet coherence coefficient, the wavelet coherence is plotted in the form of a two-dimensional image to obtain a cross-wavelet phase spectrum, with time as the horizontal axis and scale or frequency as the vertical axis. The color depth represents the magnitude of the wavelet coherence. The darker the color, the greater the wavelet coherence, indicating that the linear correlation between the two variables at this time and scale is stronger. Color or arrows are used to represent phase differences, revealing the lead or lag relationship between the two variables. The direction of the arrow indicates the lead or lag of one variable relative to the other variable, and the angle of the arrow indicates the magnitude of the phase difference. The specific method for interpreting the phase difference is as follows: The phase difference is close to 0: the two variables change essentially synchronously at this time and scale.
[0049] The phase difference is close to +π / 2: the first variable leads the second variable by a quarter of a period in time and scale.
[0050] The phase difference is close to -π / 2: the first variable lags the second variable by a quarter of a period in that time and scale.
[0051] The phase difference is close to +π or -π: the two variables are anticorrelated (one increases as the other decreases) at that time and scale.
[0052] like Figure 5 The cross-wavelet phase spectrum of dissolved oxygen and water temperature is shown in Figure 2, revealing the time-frequency correlation between dissolved oxygen and water temperature. The color bar represents the wavelet coherence coefficient, ranging from 0 to 1. Values close to 1 indicate a high correlation between dissolved oxygen and water temperature at that scale and time point, with darker colors indicating stronger correlation. The thin solid line in the figure represents the boundary of the wavelet cone of influence (COD), while the inner region represents the effective spectral value area. Color represents correlation, with darker colors indicating stronger correlation. The area enclosed by the thick solid line indicates that the energy density passes the 95% red noise test, indicating strong correlation. The short- and long-term variations in dissolved oxygen and water temperature are unevenly distributed and exhibit localized characteristics. Significant correlation is observed within periods of approximately 16-32 days.
[0053] According to the phase relationship shown in the cross wavelet phase spectrum, the positive and negative correlation between dissolved oxygen and various influencing factors in the time and frequency domain is analyzed. Figure 5As shown in the figure, the direction of the arrows reflects the phase relationship between dissolved oxygen and water temperature. Arrows from left to right (→) indicate that the two changes are in phase, indicating a positive correlation; arrows from right to left (←) indicate that they are out of phase, indicating a negative correlation. Arrows pointing vertically downward (↓) and upward (↑) indicate that the wavelet transform of water temperature leads and lags by 1 / 4 cycle, respectively, indicating a nonlinear relationship. Fluctuations in dissolved oxygen and water temperature show a significant negative correlation in opposite directions over a period of approximately 16-32 days. The correlation between dissolved oxygen and water temperature is unstable, with dissolved oxygen sometimes leading water temperature by a phase ranging from 90° to 180°. Dissolved oxygen changes occur 1 / 4 to 1 / 2 cycle (i.e., 4 to 8 days) before water temperature changes, and this trend is concentrated in summer and winter.
[0054] S43. Based on the results of cross-wavelet power spectrum analysis and cross-wavelet phase spectrum analysis, the correlation and changes between dissolved oxygen and influencing factors at different scales and frequencies were analyzed. The short-term changes of the correlation were reflected by the high-frequency scale, and the long-term changes of the correlation were reflected by the low-frequency scale. The influencing factors with significant correlation at different scales and frequencies were obtained.
[0055] From the results of cross-wavelet power spectrum analysis and cross-wavelet phase spectrum analysis, the correlation between dissolved oxygen and influencing factors at different scales and frequencies was analyzed. Short-term changes (such as intraday changes, hourly changes, etc.) were reflected by high-frequency scales. Long-term changes (such as seasonal changes) were reflected by low-frequency scales, and factors with significant correlations at key time scales were obtained. The results are shown in Table 1. The influencing factors with significant correlations at the annual, monthly, and daily time scales are not exactly the same. On the annual scale, the dissolved oxygen concentration fluctuates with a cycle of 200 days and is negatively correlated with total nitrogen; on the monthly scale, the dissolved oxygen concentration fluctuates with a cycle of 20 days and is negatively correlated with water temperature and water vapor pressure, and is negatively correlated with pH and DO. 25 There is a positive correlation; on a daily scale, the dissolved oxygen concentration fluctuates with a 7-day cycle and has a negative correlation with ammonia nitrogen and conductivity.
[0056] Table 1 Analysis results of factors with significant correlations at key time scales
[0057] S5. Quantify the influence of each influencing factor that is significantly correlated with dissolved oxygen on dissolved oxygen through principal component analysis (PCA), identify the key factors affecting dissolved oxygen based on the influence, and output the key factors affecting dissolved oxygen.
[0058] S51. The influencing factors that have a significant correlation with dissolved oxygen are grouped into a significant factor set, the data of the significant factor set is standardized and a variable matrix is constructed; the variable matrix contains a data set of j influencing factors, and each influencing factor contains i monitoring values.
[0059] The significant factor set is formed based on the influencing factors with significant correlation at different scales and frequencies ={water temperature, conductivity, pH value, vapor pressure, ammonia nitrogen, total nitrogen, DO 25}, for the factor set The data is standardized, and the standardized data is used to construct a variable matrix. For a data set containing j influencing factors, each influencing factor contains i monitoring values. The size of the variable matrix in this embodiment is 7×1095, and the variable matrix Z is as follows.
[0060] ; Where, It represents the normalized value of the j-th impact factor on the i-th day.
[0061] S52. Calculate the covariance matrix of the variable matrix, calculate the eigenvalues of the covariance matrix, and calculate the corresponding eigenvectors based on the eigenvalues.
[0062] The covariance matrix is used to describe the linear correlation between variables. The elements on the diagonal are the variance of the variable itself, and the off-diagonal elements represent the covariance between two variables. The size of the covariance matrix is i×j, and each element represents the covariance between two features. The covariance matrix calculation formula is as follows: Z; Where, represents the covariance matrix, is the transpose of the variable matrix Z.
[0063] Based on water temperature, DO 25 Take the 5-day monitoring data of 2 variables as an example to calculate Z: ; ; The covariance matrix is: ; Calculate the eigenvalues of the covariance matrix and calculate the corresponding eigenvectors based on the eigenvalues.
[0064] The eigenvector represents the direction of the "principal component", and the eigenvalue represents the variance after projection in that direction. The eigenvalue calculation formula is as follows: ; Where, are eigenvalues (each corresponding to the variance of a principal component), is the determinant (used to solve the characteristic equation), is the identity matrix (same dimensions as C).
[0065] The formula for calculating the eigenvector is as follows: ; Where, is the eigenvalue, is the determinant, is the identity matrix, is the eigenvector (direction vector, used for linear combination variables) corresponding to the eigenvalue For matrices: ; Substitute: ; Solving for two eigenvalues: , .
[0066] S53. Calculate several principal components based on the eigenvector and variable matrix. The principal component calculation formula is as follows: ; Where, is the kth principal component (linear combination result), is the kth eigenvector, and Z is the variable matrix. For example, substitute the main eigenvalue , solving the linear equation yields: ; Then the first principal component is: PC1= *Water temperature + 0.720 * DO 25 The linear combination result of .
[0067] S54. Calculate the contribution rate and cumulative contribution rate of each principal component, set a preset range for the cumulative contribution rate, select p principal components whose cumulative contribution rate is within the preset range, and obtain the key influencing factors that ultimately affect dissolved oxygen based on the p principal components.
[0068] Calculate the contribution rate of each principal component. The contribution rate calculation formula is as follows: ; In the formula, k is the contribution rate, which indicates how much variance (information) of the original data is explained by the kth principal component. is the eigenvalue (i.e., variance) of the kth principal component, and n is the total number of variables.
[0069] Cumulative contribution rate equation: ; Where t is the cumulative contribution rate, and the preset range of the contribution rate can be set to 85%~95%. The p principal components corresponding to the p eigenvalues with cumulative contribution rates of 85%~95% are taken to obtain the final set of key influencing factors. ={X1, X2…, X P}.
[0070] In this embodiment, the principal component analysis (PCA) method is used to quantify the influence of various parameters on the dissolved oxygen content by combining the results of nonlinear correlation coefficient and time-varying characteristic analysis, so as to identify the key factors of dissolved oxygen and output the key factors. = {total nitrogen, ammonia nitrogen, water temperature}, and the PCA calculation results of the key influencing factors of dissolved oxygen concentration are shown in Table 2.
[0071] Table 2 PCA calculation results of key influencing factors of dissolved oxygen concentration
[0072] In summary, the present invention analyzes the correlation between dissolved oxygen and environmental influencing factors by combining the maximum information coefficient method and the cross wavelet transform. The maximum information coefficient MIC can capture the nonlinear relationship between variables, make up for the shortcomings of traditional linear analysis methods, reveal the complex nonlinear relationship between dissolved oxygen and environmental influencing factors, and improve the accuracy of correlation analysis. The cross wavelet transform XWT is used for analysis in the time-frequency domain, which can capture the correlation between time series in different time periods and different frequencies, identify the dynamic relationship between dissolved oxygen and environmental factors that changes over time, distinguish short-term disturbances from long-term trends, and quantify the degree of influence of each influencing factor that has a significant correlation with dissolved oxygen on dissolved oxygen through principal component analysis. According to the degree of influence, the key factors affecting dissolved oxygen are identified, the key influencing factors of dissolved oxygen concentration are accurately identified, and a more fine-grained analysis result is provided.
[0073] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.
Claims
1. A method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics, characterized by: The following steps are involved: S1. Select multiple factors affecting dissolved oxygen in rivers to construct an initial factor set, and use the maximum information coefficient method to calculate the MIC values of dissolved oxygen and each factor in the initial factor set; S2. Set a target MIC value, select several factors whose MIC values are greater than the target MIC value, and arrange the several influencing factors in descending order of MIC values to form a second factor set; S3, using cross wavelet transform to calculate the cross wavelet power spectrum, cross wavelet phase spectrum and cross wavelet coherence condensation spectrum of dissolved oxygen and each influencing factor of the second factor set respectively; S4. Draw a cross-wavelet power spectrum and phase spectrum based on the calculated cross-wavelet power spectrum, cross-wavelet phase spectrum, and cross-wavelet coherence coefficient. According to the wavelet power spectrum and phase spectrum, analyze the dissolved oxygen and obtain influencing factors that are significantly correlated with dissolved oxygen at different scales and frequencies. S5. Quantify the degree of influence of each influencing factor that is significantly correlated with dissolved oxygen on dissolved oxygen through principal component analysis, identify the key factors affecting dissolved oxygen based on the degree of influence, and output the key factors affecting dissolved oxygen.
2. The method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics according to claim 1, characterized in that: The step S1 comprises the following steps: S11. Select multiple factors affecting dissolved oxygen in rivers from meteorological indicators, hydrological indicators, and water quality indicators to form an initial factor set. Use the initial factor set as the independent variable X and the dissolved oxygen concentration as the dependent variable Y to construct a data set D. S12, gridding the scatter plot of the data set D by x rows and y columns along the X-axis and Y-axis to obtain a grid G, calculating the mutual information of different probability distributions of the data set D on the grid G and taking the maximum mutual information to obtain the maximum mutual information value of the different probability distributions; S13. Normalize the maximum mutual information values of different probability distributions to obtain the MIC value between each influencing factor and dissolved oxygen.
3. The method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics according to claim 2, characterized in that: The calculation formula of the mutual information is: ; Where I(X,Y) is the mutual information of variables X and Y; P(x,y) is the joint density function of variables X and Y; P(x) and P(y) are the marginal density functions of variables X and Y respectively; The MIC value between each influencing factor and dissolved oxygen is expressed as , Expressed as: ; Where, is the upper limit of the number of grids, n is the number of variable samples in the data set, is the maximum mutual information value after normalization.
4. The method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics according to claim 2, characterized in that: The step S2 comprises the following steps: The target MIC value was set to 0.3, and several influencing factors with MIC values ≥ 0.3 were screened out. The influencing factors were arranged in descending order according to the MIC values to form the second factor set.
5. The method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics according to claim 1, characterized in that: The step S3 comprises the following steps: S31, performing continuous wavelet transform on the influencing factor time series and the dissolved oxygen time series of the second factor set, respectively, to obtain continuous wavelet transform results of the influencing factor time series and the dissolved oxygen time series, and calculating the cross wavelet power spectrum according to the continuous wavelet transform results; S32. Calculating a cross-wavelet phase spectrum of the influencing factor time series and the dissolved oxygen time series based on the continuous wavelet transform results of the influencing factor time series and the dissolved oxygen time series; S33. Calculate the cross-wavelet coherence coefficient of the influencing factor time series and the dissolved oxygen time series based on the continuous wavelet transform results and the cross-wavelet power spectrum.
6. The method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics according to claim 1, characterized in that: The step S4 comprises the following steps: S41, plotting a cross wavelet power spectrum according to the calculated cross wavelet power spectrum, analyzing the interaction strength between dissolved oxygen and various influencing factors at different time and frequency scales according to the cross wavelet power spectrum, and obtaining a cross wavelet power spectrum analysis result; S42. Draw a cross-wavelet phase spectrum according to the calculated cross-wavelet phase spectrum and cross-wavelet coherence coefficient, analyze the time-frequency correlation between dissolved oxygen and each influencing factor according to the wavelet coherence coefficient value displayed on the cross-wavelet phase spectrum, analyze the positive and negative correlation between dissolved oxygen and each influencing factor in the time-frequency domain according to the phase relationship displayed on the cross-wavelet phase spectrum, and obtain the cross-wavelet phase spectrum analysis result; S43. Based on the results of cross-wavelet power spectrum analysis and cross-wavelet phase spectrum analysis, the correlation and changes between dissolved oxygen and influencing factors at different scales and frequencies were analyzed. The short-term changes of the correlation were reflected by the high-frequency scale, and the long-term changes of the correlation were reflected by the low-frequency scale. The influencing factors with significant correlation with dissolved oxygen at different scales and frequencies were obtained.
7. The method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics according to claim 6, characterized in that: The step S41 includes the steps of: plotting the cross-wavelet power spectrum in the form of a two-dimensional image to obtain a cross-wavelet power spectrum diagram, with time as the horizontal axis and scale or frequency as the vertical axis, and the color depth represents the size of the cross-wavelet power; the darker the color, the greater the cross-wavelet power, indicating that the correlation between the two variables at this time and scale is stronger.
8. The method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics according to claim 6, characterized in that: The step S42 includes the steps of: plotting the wavelet coherence in the form of a two-dimensional image based on the calculated cross-wavelet phase spectrum and cross-wavelet coherence coefficient to obtain a cross-wavelet phase spectrum, with time as the horizontal axis and scale or frequency as the vertical axis, and the color depth represents the magnitude of the wavelet coherence, the darker the color, the greater the wavelet coherence, and the stronger the linear correlation between the two variables at this time and scale; using arrows to represent phase differences, revealing the lead or lag relationship between the two variables, the direction of the arrow represents the lead or lag of one variable relative to the other variable, and the angle of the arrow represents the magnitude of the phase difference.
9. The method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics according to claim 1, characterized in that: The step S5 comprises the following steps: S51. The influencing factors that are significantly correlated with dissolved oxygen are grouped into a significant factor set, and the data of the significant factor set are standardized to construct a variable matrix; S52, calculating the covariance matrix of the variable matrix, calculating the eigenvalues of the covariance matrix, and calculating the corresponding eigenvectors according to the eigenvalues; S53, calculating and obtaining a plurality of principal components according to the eigenvector and the variable matrix; S54. Calculate the contribution rate and cumulative contribution rate of each principal component, set a preset range for the cumulative contribution rate, select p principal components whose cumulative contribution rate is within the preset range, and obtain the key influencing factors that ultimately affect dissolved oxygen based on the p principal components.
10. The method for identifying key factors of dissolved oxygen in rivers based on nonlinear and time-varying characteristics according to claim 9, characterized in that: The preset range of the cumulative contribution rate is 85% to 95%.
Citation Information
Patent Citations
Analysis method for identifying dependency relationship between underground water level and influence factor scale
CN115081197A
Method for predicting dissolved oxygen in tidal river network area
CN115456245A
Water quality prediction method and system applied to river drainage basin monitoring system
CN118277731A
Cited By
River hypoxia phenomenon classification system construction and cause analysis method
CN121580185A