Water quality prediction method and device, computer equipment and storage medium

By hysteresis treatment and model training on the water quality monitoring time series, a water quality prediction model is constructed, which solves the inaccuracy problem of water quality prediction in the middle and lower reaches of the existing technology, and improves the stability and accuracy of water quality prediction.

CN120105053APending Publication Date: 2025-06-06GUANGDONG UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510116510.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

Existing water quality prediction methods are difficult to accurately predict downstream water quality pollution. Due to the limitations of the natural flow characteristics of surface water and local environmental factors, the randomness and unpredictability of water quality changes are increased.

Method used

By analyzing the water quality monitoring time series and upstream and downstream relationships of several sites, lag processing and model training are carried out, and a water quality prediction model with the lag water quality monitoring time series and environmental factors as inputs and the downstream water quality prediction time series as outputs.

Benefits of technology

It improves the stability, accuracy and reliability of water quality prediction, and can more accurately identify the characteristic information of upstream water quality changes and surrounding environment changes, thereby improving the downstream water quality prediction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120105053A_ABST
    Figure CN120105053A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of water quality prediction, in particular to a water quality prediction method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining a water quality monitoring time sequence and an environment element time sequence of a plurality of stations of a target river in a preset time period; lagging processing is conducted according to the water quality monitoring time sequences of the multiple stations and the upstream and downstream relation among the multiple stations, and lagging water quality monitoring time sequences of the multiple stations are obtained; performing model training on a preset water quality prediction model according to the water quality monitoring time sequences, the lagged water quality monitoring time sequences and the environmental element time sequences of the plurality of stations to obtain a target water quality prediction model, and inputting the water quality monitoring time sequence of the target station and the environment element time sequence into a target water quality prediction model for water quality prediction, and obtaining a water quality prediction time sequence of a downstream station corresponding to the target station.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water quality prediction, and in particular to a water quality prediction method, device, computer equipment and storage medium. Background Art

[0002] With the acceleration of population growth, industrialization and urbanization, surface water faces more and more pollution threats, which may come from industrial emissions, agricultural activities, domestic sewage discharge and other sources. These pollutants have a serious impact on water quality, reduce the use value of water bodies, and even pose a threat to ecosystems and human health. By predicting surface water quality, potential pollution sources and pollution trends can be identified, providing a scientific basis for environmental protection. Accurate water quality prediction can also help water resource managers better plan and allocate water resources and ensure the sustainable use of water resources. In the event of sudden pollution incidents, rapid water quality prediction can help emergency response teams take timely and effective response measures to mitigate the impact of pollution incidents.

[0003] However, the increasing human activities have aggravated the frequency and degree of water pollution, and increased the randomness and unpredictability of water quality changes. Existing water quality prediction methods usually predict pollutant concentrations based on a single section. However, the natural flow characteristics of surface water cause upstream pollution to be transmitted to downstream areas, resulting in the inability to accurately predict downstream water quality pollution through local environmental factors and their own changing laws. Summary of the invention

[0004] Based on this, the purpose of the present invention is to provide a water quality prediction method, device, computer equipment and storage medium. According to the water quality monitoring time series of several stations and the upstream and downstream relationships between several stations, the characteristic information of the upstream water quality changes and the surrounding environment changes of each station is analyzed, and the water quality prediction model is trained in combination with the model learning method to perform water quality prediction for downstream stations, thereby improving the stability, accuracy and reliability of water quality prediction.

[0005] In a first aspect, an embodiment of the present application provides a water quality prediction method, comprising the following steps:

[0006] Obtain the water quality monitoring time series and environmental factor time series of several stations in the target river within a preset time period;

[0007] According to the water quality monitoring time series of the plurality of stations and the upstream and downstream relationships between the plurality of stations, the water quality monitoring time series are subjected to hysteresis processing to obtain the lagged water quality monitoring time series of the plurality of stations;

[0008] According to the water quality monitoring time series, the lagged water quality monitoring time series and the environmental factor time series of the several stations, the preset water quality prediction model is trained to obtain the target water quality prediction model, wherein the target water quality prediction model is a model that takes the lagged water quality monitoring time series and the environmental factor time series of the station as input and the water quality prediction time series of the downstream station corresponding to the station as output;

[0009] Obtain the water quality monitoring time series and environmental factor time series of the target site of the target river within the target time period, input the water quality monitoring time series and environmental factor time series of the target site into the target water quality prediction model for water quality prediction, and obtain the water quality prediction time series of the downstream site corresponding to the target site.

[0010] In a second aspect, an embodiment of the present application provides a water quality prediction device, comprising:

[0011] A data acquisition module is used to obtain the water quality monitoring time series and environmental factor time series of several stations in the target river within a preset time period;

[0012] A hysteresis processing module, used for performing hysteresis processing on the water quality monitoring time series according to the water quality monitoring time series of the plurality of stations and the upstream and downstream relationship between the plurality of stations, so as to obtain the hysteresis water quality monitoring time series of the plurality of stations;

[0013] A model training module is used to perform model training on a preset water quality prediction model according to the water quality monitoring time series, the lagged water quality monitoring time series and the environmental factor time series of the plurality of said sites, so as to obtain a target water quality prediction model, wherein the target water quality prediction model is a model that takes the lagged water quality monitoring time series and the environmental factor time series of the site as input and the water quality prediction time series of the downstream site corresponding to the site as output;

[0014] The water quality prediction module is used to obtain the water quality monitoring time series and environmental factor time series of the target site of the target river within the target time period, input the water quality monitoring time series and environmental factor time series of the target site into the target water quality prediction model for water quality prediction, and obtain the water quality prediction time series of the downstream site corresponding to the target site.

[0015] In a third aspect, an embodiment of the present application provides a computer device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the water quality prediction method described in the first aspect are implemented.

[0016] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the water quality prediction method as described in the first aspect are implemented.

[0017] In an embodiment of the present application, a water quality prediction method, apparatus, computer equipment and storage medium are provided. According to the water quality monitoring time series of several stations and the upstream and downstream relationships between the several stations, the characteristic information of the upstream water quality changes and the surrounding environment changes of each station are analyzed, and the water quality prediction model is trained in combination with the model learning method to perform water quality prediction for downstream stations, thereby improving the stability, accuracy and reliability of water quality prediction.

[0018] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of a water quality prediction method provided in accordance with an embodiment of the present application;

[0020] Figure 2 A schematic diagram of the process of S2 in the water quality prediction method provided in one embodiment of the present application;

[0021] Figure 3 A schematic diagram of the process of S22 in the water quality prediction method provided in one embodiment of the present application;

[0022] Figure 4 A schematic diagram of the process of S23 in the water quality prediction method provided in one embodiment of the present application;

[0023] Figure 5 A schematic flow chart of a water quality prediction method provided in another embodiment of the present application;

[0024] Figure 6 A schematic diagram of the process of S3 in the water quality prediction method provided in one embodiment of the present application;

[0025] Figure 7 A schematic diagram of the structure of a water quality prediction device provided in one embodiment of the present application;

[0026] Figure 8 A schematic diagram of the structure of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0028] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0029] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" / "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".

[0030] See also Figure 1 , Figure 1 A schematic flow chart of a water quality prediction method provided in one embodiment of the present application, the method comprising the following steps:

[0031] S1: Obtain the water quality monitoring time series and environmental factor time series of several stations in the target river within a preset time period.

[0032] The execution subject of the water quality prediction method is a prediction device of the water quality prediction method (hereinafter referred to as prediction device). In an optional embodiment, the prediction device can be a computer device, a server, or a server cluster formed by a combination of multiple computer devices.

[0033] In this embodiment, the prediction device obtains the water quality monitoring time series and the environmental factor time series of several stations of the target river within a preset time period, wherein the water quality monitoring time series includes water quality monitoring data of several time steps, and the water quality monitoring data includes several types of water quality parameters, and the water quality parameters include but are not limited to total nitrogen, total phosphorus, ammonia nitrogen, potassium permanganate index and other parameters; the environmental factor time series includes environmental factor data of several time steps, and the environmental factor data includes several environmental factors, and the environmental factors include but are not limited to hydrological factors water temperature, flow rate, pH, conductivity and turbidity, and the air temperature, humidity, wind speed and rainfall of the atmospheric environment.

[0034] S2: According to the water quality monitoring time series of the plurality of stations and the upstream and downstream relationships between the plurality of stations, the water quality monitoring time series are subjected to hysteresis processing to obtain the lagged water quality monitoring time series of the plurality of stations.

[0035] In this embodiment, the prediction device performs lag processing on the water quality monitoring time series of the several sites and the upstream and downstream relationships between the several sites to obtain the lagged water quality monitoring time series of the several sites.

[0036] See also Figure 2 , Figure 2 The schematic flow diagram of S2 in the water quality prediction method provided in one embodiment of the present application includes steps S21 to S24, which are specifically as follows:

[0037] S21: According to the upstream and downstream relationship between several stations, the water quality monitoring time series of the first station and the corresponding downstream stations of the target river are confirmed, and the water quality monitoring time series is decomposed by the empirical mode decomposition method to obtain the water quality monitoring time subsequences of the first station and the corresponding downstream stations at several time frequencies.

[0038] In this embodiment, the prediction device confirms the water quality monitoring time series of the first station of the target river and the corresponding downstream stations based on the upstream and downstream relationships between several stations. Specifically, the prediction device takes the downstream station closest to the station as the corresponding downstream station, and confirms the water quality monitoring time series of the first station of the target river and the corresponding downstream station.

[0039] The prediction device uses an empirical mode decomposition method to decompose the water quality monitoring time series to obtain water quality monitoring time subsequences of the first site and the corresponding downstream sites at several time frequencies, wherein the empirical mode decomposition method includes but is not limited to optimized versions such as traditional empirical mode decomposition and ensemble mode decomposition, and can be replaced by related time-frequency analysis methods such as wavelet decomposition and variational mode decomposition.

[0040] S22: Extract short-term fluctuation rule time subsequences from the water quality monitoring time subsequences respectively to obtain several short-term fluctuation rule time subsequences of the first site and the corresponding downstream sites, reconstruct and select several short-term fluctuation rule time subsequences to obtain target short-term fluctuation rule time subsequences of the first site and the corresponding downstream sites.

[0041] In this embodiment, the prediction device extracts the short-term fluctuation regularity time subsequences from the water quality monitoring time subsequences respectively to obtain several short-term fluctuation regularity time subsequences of the first site and the corresponding downstream sites.

[0042] The prediction device reconstructs and selects several of the short-term fluctuation law time subsequences to obtain the target short-term fluctuation law time subsequences of the first site and the corresponding downstream sites, so as to extract time information that better reflects the short-term change law of water quality at the site, so as to train the water quality prediction model and improve the timeliness and accuracy of water quality prediction.

[0043] See also Figure 3 , Figure 3 The schematic flow diagram of S22 in the water quality prediction method provided in one embodiment of the present application includes steps S221 to S223, which are specifically as follows:

[0044] S221: Obtain the variation characteristics of the water quality monitoring time subsequences of the station and the corresponding downstream stations at several time frequencies.

[0045] In this embodiment, the prediction device obtains the change characteristics of the water quality monitoring time subsequences of the site and the corresponding downstream site at several time frequencies, wherein the change characteristics include kurtosis, skewness, standard deviation and period;

[0046] S222: using a cluster analysis method to classify the corresponding water quality monitoring time subsequences according to the change characteristics, and obtaining a plurality of classified subsequence sets of the site and the corresponding downstream sites.

[0047] In this embodiment, the prediction device uses a cluster analysis method to classify the corresponding water quality monitoring time subsequences according to the change characteristics, and obtains a plurality of classified subsequence sets of the site and the corresponding downstream site, wherein the classified subsequence set includes a plurality of water quality monitoring time subsequences. The cluster analysis method includes but is not limited to K-means clustering.

[0048] S223: Obtain average periodic frequencies of several classification subsequence sets, select a target classification subsequence set with the smallest average periodic frequency, and select several water quality monitoring time subsequences in the target classification subsequence set as short-term fluctuation regularity time subsequences.

[0049] In this embodiment, the prediction device obtains the average periodic frequency of several classification subsequence sets, takes the target classification subsequence set with the smallest average periodic frequency, and uses several water quality monitoring time subsequences in the target classification subsequence set as short-term fluctuation law time subsequences to extract the local area's own change law information, so as to improve the accuracy of water quality prediction.

[0050] S23: Perform lag analysis on the target short-term fluctuation law time subseries of the first site and the corresponding downstream sites to obtain the lag step number, perform lag processing on the water quality monitoring time series of the first site according to the lag step number, and obtain the lagged water quality monitoring time series of the first site.

[0051] In this embodiment, the prediction device performs a lag analysis on the target short-term fluctuation law time subseries of the first site and the corresponding downstream sites to obtain the lag step number, and performs lag processing on the water quality monitoring time series of the first site according to the lag step number to obtain the lagged water quality monitoring time series of the first site.

[0052] See also Figure 4 , Figure 4 The schematic flow chart of S23 in the water quality prediction method provided in one embodiment of the present application includes step S231, which is as follows:

[0053] S231: According to the target short-term fluctuation law time subsequence of the site and the corresponding downstream site and the preset mutual correlation coefficient calculation algorithm, a mutual correlation coefficient sequence at different lag steps is obtained, the maximum mutual correlation coefficient is extracted from the mutual correlation coefficient sequence, and the lag step number corresponding to the maximum mutual correlation coefficient is obtained.

[0054] In this embodiment, the prediction device obtains a sequence of mutual correlation coefficients at different lag steps according to the target short-term fluctuation law time subsequence of the site, the corresponding downstream site, and a preset mutual correlation coefficient calculation algorithm, extracts the maximum mutual correlation coefficient from the mutual correlation coefficient sequence, and obtains the lag step corresponding to the maximum mutual correlation coefficient, wherein the mutual correlation coefficient sequence includes a plurality of mutual correlation coefficients, wherein the mutual correlation coefficient calculation algorithm is:

[0055]

[0056] In the formula, Cross correlation is the cross correlation coefficient sequence, X[n] is the water quality monitoring data corresponding to the nth time step in the target short-term fluctuation law time subsequence of the station, k is the lag step number, and Y * [n] is the complex conjugate of the water quality monitoring data corresponding to the nth time step in the target short-term fluctuation law time subseries of the corresponding downstream station.

[0057] S24: confirming the water quality monitoring time series of the next station of the target river and the corresponding downstream station, repeating the empirical mode decomposition, cluster analysis and lag processing, and obtaining the lagged water quality monitoring time series of several stations.

[0058] In this embodiment, the prediction device confirms the water quality monitoring time series of the next station of the target river and the corresponding downstream stations, and repeats empirical mode decomposition, cluster analysis and lag processing to obtain the lagged water quality monitoring time series of several of the stations.

[0059] See also Figure 5 , Figure 5 A schematic flow chart of a water quality prediction method provided for another embodiment of the present application includes step S5, which is before step S3 and is specifically as follows:

[0060] S5: performing significance tests on several environmental factors in the environmental factor data of several time steps in the environmental factor time series to obtain significance test results corresponding to the several environmental factors.

[0061] In this embodiment, the prediction device performs a significance test on several environmental factors in the environmental factor data of several time steps in the environmental factor time series, and eliminates several environmental factors in the environmental factor data based on the obtained significance test results to obtain the environmental factor time series of several sites after the elimination process.

[0062] Specifically, the prediction device selects candidate environmental factor variables from the environmental factor data and establishes an explanatory model for water quality changes. Subsequently, under the condition that the independent variable test is significant, other environmental factor variables are introduced one by one; at the same time, a significance test is performed on the variables included in the model, and the insignificant parts are eliminated to obtain the optimal model, thereby eliminating several environmental factors in the environmental factor data and obtaining the environmental factor time series of several sites after the elimination process, wherein the optimal model is:

[0063] y=a+a 1 k 1 +a 2 k 2 +…+a n k n +β

[0064] Among them, y is the time series of water quality changes; k n represents the nth environmental variable with significant influence; a n is the regression coefficient of the nth environmental variable; β represents the error.

[0065] S3: According to the water quality monitoring time series, the lagged water quality monitoring time series and the environmental factor time series of the plurality of stations, a preset water quality prediction model is trained to obtain a target water quality prediction model.

[0066] In this embodiment, the prediction device performs model training on a preset water quality prediction model based on the water quality monitoring time series, the lagged water quality monitoring time series and the environmental factor time series of several of the sites to obtain a target water quality prediction model, wherein the target water quality prediction model is a model that takes the lagged water quality monitoring time series and the environmental factor time series of the site as input and the water quality prediction time series of the downstream site corresponding to the site as output.

[0067] See also Figure 6 , Figure 6 The schematic flow chart of S3 in the water quality prediction method provided in one embodiment of the present application includes steps S31 to S32, which are specifically as follows:

[0068] S31: construct a matrix based on the water quality monitoring time series, the lagged water quality monitoring time series and the time series of environmental factors after elimination at the same site to obtain input matrices of several sites, input the input matrices of several sites into a preset convolutional neural network, and obtain convolution feature maps of several sites according to a preset convolution algorithm.

[0069] In this embodiment, the prediction device constructs a matrix based on the water quality monitoring time series, the lagged water quality monitoring time series and the time series of environmental factors after elimination processing at the same site to obtain input matrices of several sites.

[0070] Specifically, the water quality monitoring data with a time step of iq to i in the water quality monitoring time series of the downstream site corresponding to the site is taken as the first input part, the environmental element data with a time step of iq to i in the environmental element time series after elimination is taken as the second input part, and the water quality monitoring data with a time step of iq to i in the lagged water quality monitoring time series is taken as the third input part. The input matrix is ​​constructed based on the first input part, the second input part and the third input part to obtain the input matrices of several sites, wherein i is the moment of the last historical value of the input; q is the time step of the input, which is at least 5; and p is the prediction step, which is at least 1.

[0071] The prediction device inputs the input matrices of several sites into a preset convolutional neural network, and obtains the convolution feature maps of several sites according to a preset convolution algorithm, wherein the convolution algorithm is:

[0072]

[0073] Where Y i,j is the element at position (i, j) in the convolution feature map, X i+m,j+n,d is the element at position (i+m,k+n) in the input matrix that belongs to channel d; K m,n,d is the weight at position (m,n) in the convolution kernel corresponding to channel d; is the bias term of the convolution layer; i and j are the indices in the convolution feature map, F is the convolution kernel size, and D is the total number of channels.

[0074] S32: Input the convolution feature maps of several stations and the water quality monitoring time series of corresponding downstream stations into the water quality prediction model, perform water quality prediction based on the convolution feature maps of several stations, and obtain the water quality prediction time series of several stations; perform model training based on the water quality prediction time series of several stations and the water quality monitoring time series of corresponding downstream stations to obtain the target water quality prediction model.

[0075] The water quality prediction model is a long short-term memory neural network model, and the long short-term memory neural network model is as follows:

[0076]

[0077] In the formula, i t is the vector output by the input gate corresponding to the tth time step, x t is the input vector corresponding to the tth time step, f t is the vector output by the forget gate corresponding to the tth time step, o t is the vector output by the memory unit corresponding to the t-th time step, is the intermediate vector of the output gate corresponding to the tth time step, c t is the vector output by the output gate corresponding to the tth time step, W i , W f , W o and W c are the first, second, third, and fourth trainable weight matrices, respectively, and b i , b f , b o and b c are the first, second, third and fourth bias vectors respectively, h t is the hidden layer state vector corresponding to the tth time step, y t is the prediction vector corresponding to the tth time step, that is, the prediction data output by the long short-term memory neural network model, σ() is the activation function, and ⊙ is the Hadamard product.

[0078] In this embodiment, the prediction device inputs the convolution feature graphs of several stations and the water quality monitoring time series of the corresponding downstream stations into the water quality prediction model, performs water quality prediction according to the convolution feature graphs of several stations, and obtains the water quality prediction time series of several stations;

[0079] The prediction device performs model training based on the water quality prediction time series of several stations and the water quality monitoring time series of corresponding downstream stations to obtain a target water quality prediction model. Specifically, the prediction device performs model training on the water quality prediction model based on the water quality monitoring data of several time steps in the water quality prediction time series of several stations and the water quality monitoring data of time steps i+1 to i+p in the water quality monitoring time series of several stations corresponding downstream stations to obtain a target water quality prediction model.

[0080] S4: Obtain the water quality monitoring time series and environmental factor time series of the target site of the target river within the target time period, input the water quality monitoring time series and environmental factor time series of the target site into the target water quality prediction model for water quality prediction, and obtain the water quality prediction time series of the downstream site corresponding to the target site.

[0081] In this embodiment, the prediction device obtains the water quality monitoring time series and environmental factor time series of the target station of the target river within the target time period, inputs the water quality monitoring time series and environmental factor time series of the target station into the target water quality prediction model for water quality prediction, and obtains the water quality prediction time series of the downstream station corresponding to the target station.

[0082] Based on the water quality monitoring time series of several stations and the upstream and downstream relationships between several stations, the characteristic information of upstream water quality changes and surrounding environmental changes of each station is analyzed. Combined with the model learning method, the water quality prediction model is trained to predict the water quality of downstream stations, which improves the stability, accuracy and reliability of water quality prediction.

[0083] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of a water quality prediction device provided by an embodiment of the present application. The device can implement all or part of the water quality prediction device through software, hardware, or a combination of both. The device 7 includes:

[0084] The data acquisition module 71 is used to obtain the water quality monitoring time series and environmental factor time series of a plurality of stations of the target river within a preset time period;

[0085] A hysteresis processing module 72 is used to perform hysteresis processing on the water quality monitoring time series according to the water quality monitoring time series of the plurality of stations and the upstream and downstream relationship between the plurality of stations, so as to obtain the hysteresis water quality monitoring time series of the plurality of stations;

[0086] The model training module 73 is used to perform model training on a preset water quality prediction model according to the water quality monitoring time series, the lagged water quality monitoring time series and the environmental factor time series of the plurality of said sites, so as to obtain a target water quality prediction model, wherein the target water quality prediction model is a model that takes the lagged water quality monitoring time series and the environmental factor time series of the site as input and the water quality prediction time series of the downstream site corresponding to the site as output;

[0087] The water quality prediction module 74 is used to obtain the water quality monitoring time series and environmental factor time series of the target site of the target river within the target time period, input the water quality monitoring time series and environmental factor time series of the target site into the target water quality prediction model for water quality prediction, and obtain the water quality prediction time series of the downstream site corresponding to the target site.

[0088] In an embodiment of the present application, a data acquisition module is used to obtain water quality monitoring time series and environmental factor time series of several stations of a target river within a preset time period; a lag processing module is used to perform lag processing on the water quality monitoring time series according to the water quality monitoring time series of the several stations and the upstream and downstream relationships between the several stations to obtain the lagged water quality monitoring time series of the several stations; a model training module is used to perform model training on a preset water quality prediction model according to the water quality monitoring time series, lagged water quality monitoring time series and environmental factor time series of the several stations to obtain a target water quality prediction model, wherein the target water quality prediction model is a model that takes the lagged water quality monitoring time series and environmental factor time series of the station as input and the water quality prediction time series of the downstream station corresponding to the station as output; a water quality prediction module is used to obtain the water quality monitoring time series and environmental factor time series of the target station of the target river within a target time period, and the water quality monitoring time series and environmental factor time series of the target station are input into the target water quality prediction model for water quality prediction to obtain the water quality prediction time series of the downstream station corresponding to the target station. Based on the water quality monitoring time series of several stations and the upstream and downstream relationships between several stations, the characteristic information of upstream water quality changes and surrounding environmental changes of each station is analyzed. Combined with the model learning method, the water quality prediction model is trained to predict the water quality of downstream stations, which improves the stability, accuracy and reliability of water quality prediction.

[0089] Please refer to Figure 8 , Figure 8 The computer device 8 is a schematic diagram of a structure of a computer device provided in an embodiment of the present application. The computer device 8 includes: a processor 81, a memory 82, and a computer program 83 stored in the memory 82 and executable on the processor 81; the computer device may store multiple instructions, which are suitable for being loaded and executed by the processor 81. Figures 1 to 6 The method steps shown in the figure can be found in the specific execution process. Figures 1 to 6 The specific description shown will not be repeated here.

[0090] Among them, the processor 81 may include one or more processing cores. The processor 81 uses various interfaces and lines to connect various parts in the server, and executes various functions and processes data of the water quality prediction device 7 by running or executing instructions, programs, code sets or instruction sets stored in the memory 82, and calling the data in the memory 82. Optionally, the processor 81 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programble Logic Array, PLA). The processor 81 can integrate one or more combinations of a central processing unit 81 (Central Processing Unit, CPU), an image processor 81 (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch display; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 81, and it can be implemented by a single chip.

[0091] Among them, the memory 82 may include a random access memory 82 (Random Access Memory, RAM), and may also include a read-only memory 82 (Read-Only Memory). Optionally, the memory 82 includes a non-transitory computer-readable storage medium. The memory 82 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 82 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 82 may also be optionally at least one storage device located away from the aforementioned processor 81.

[0092] The present application also provides a storage medium that can store multiple instructions, which are suitable for the processor to load and execute the above-mentioned Figures 1 to 6 The method steps shown in the figure can be found in the specific execution process. Figures 1 to 6 The specific description shown will not be repeated here.

[0093] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0094] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0095] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraint algorithm of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0096] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0098] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0099] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc.

[0100] The present invention is not limited to the above-mentioned embodiments. If various changes or modifications to the present invention do not depart from the spirit and scope of the present invention, and if these changes and modifications fall within the scope of the claims and equivalent technologies of the present invention, the present invention is also intended to include these changes and modifications.

Claims

1. A water quality prediction method, characterized in that: The following steps are involved: Obtain the water quality monitoring time series and environmental factor time series of several stations in the target river within a preset time period; According to the water quality monitoring time series of the plurality of stations and the upstream and downstream relationships between the plurality of stations, the water quality monitoring time series are subjected to hysteresis processing to obtain the lagged water quality monitoring time series of the plurality of stations; According to the water quality monitoring time series, the lagged water quality monitoring time series and the environmental factor time series of the plurality of the sites, a preset water quality prediction model is trained to obtain a target water quality prediction model, wherein the target water quality prediction model is a model that takes the lagged water quality monitoring time series and the environmental factor time series of the site as input and the water quality prediction time series of the downstream site corresponding to the site as output; Obtain the water quality monitoring time series and environmental factor time series of the target site of the target river within the target time period, input the water quality monitoring time series and environmental factor time series of the target site into the target water quality prediction model for water quality prediction, and obtain the water quality prediction time series of the downstream site corresponding to the target site.

2. The water quality prediction method according to claim 1, characterized in that: The method of performing hysteresis processing on the water quality monitoring time series of the plurality of sites and the upstream and downstream relationships between the plurality of sites to obtain the hysteresis water quality monitoring time series of the plurality of sites comprises the following steps: According to the upstream and downstream relationship between several stations, the water quality monitoring time series of the first station and the corresponding downstream stations of the target river are confirmed, and the water quality monitoring time series is decomposed by using the empirical mode decomposition method to obtain the water quality monitoring time subsequences of the first station and the corresponding downstream stations at several time frequencies; Extracting short-term fluctuation rule time subsequences from the water quality monitoring time subsequences respectively to obtain several short-term fluctuation rule time subsequences of the first station and the corresponding downstream stations, reconstructing and selecting several short-term fluctuation rule time subsequences to obtain target short-term fluctuation rule time subsequences of the first station and the corresponding downstream stations; Performing lag analysis on the target short-term fluctuation law time subseries of the first site and the corresponding downstream sites to obtain the lag step number, and performing lag processing on the water quality monitoring time series of the first site according to the lag step number to obtain the lagged water quality monitoring time series of the first site; Confirm the water quality monitoring time series of the next station of the target river and the corresponding downstream station, repeat the empirical mode decomposition, cluster analysis and lag processing, and obtain the lagged water quality monitoring time series of several stations.

3. The water quality prediction method according to claim 2, characterized in that: The step of extracting short-term fluctuation regularity time subsequences from the water quality monitoring time subsequences to obtain several short-term fluctuation regularity time subsequences of the first site and the corresponding downstream sites includes the following steps: Obtaining the variation characteristics of the water quality monitoring time subsequences of the station and the corresponding downstream station at several time frequencies, wherein the variation characteristics include kurtosis, skewness, standard deviation and period; Using a cluster analysis method, classify the corresponding water quality monitoring time subsequences according to the change characteristics, and obtain a plurality of classified subsequence sets of the site and the corresponding downstream site, wherein the classified subsequence set includes a plurality of water quality monitoring time subsequences; The average periodic frequency of several classification subsequence sets is obtained, and the target classification subsequence set with the smallest average periodic frequency and several water quality monitoring time subsequences in the target classification subsequence set are used as short-term fluctuation regularity time subsequences.

4. The water quality prediction method according to claim 3, characterized in that: The step of performing lag analysis based on the target short-term fluctuation rule time subseries of the first site and the corresponding downstream sites to obtain the lag step number comprises the following steps: According to the target short-term fluctuation law time subsequence of the station, the corresponding downstream station and the preset mutual correlation coefficient calculation algorithm, a mutual correlation coefficient sequence at different lag steps is obtained, the maximum mutual correlation coefficient is extracted from the mutual correlation coefficient sequence, and the lag step number corresponding to the maximum mutual correlation coefficient is obtained, wherein the mutual correlation coefficient sequence includes a plurality of mutual correlation coefficients, wherein the mutual correlation coefficient calculation algorithm is: In the formula, Crosscorrelation is the cross-correlation coefficient sequence, X[n] is the water quality monitoring data corresponding to the nth time step in the target short-term fluctuation law time subsequence of the station, k is the lag step number, and Y * [n] is the complex conjugate of the water quality monitoring data corresponding to the nth time step in the target short-term fluctuation law time subseries of the corresponding downstream station.

5. The water quality prediction method according to claim 4, characterized in that: The method includes the following steps before training a preset water quality prediction model based on the water quality monitoring time series, the lagged water quality monitoring time series and the environmental factor time series of the plurality of stations to obtain a target water quality prediction model: A significance test is performed on several environmental elements in the environmental element data of several time steps in the environmental element time series, and according to the obtained significance test results, several environmental elements in the environmental element data are eliminated to obtain the environmental element time series of several sites after elimination.

6. The water quality prediction method according to claim 5, characterized in that: The method of training a preset water quality prediction model according to the water quality monitoring time series, the lagged water quality monitoring time series and the environmental factor time series of the plurality of stations to obtain a target water quality prediction model comprises the following steps: According to the water quality monitoring time series, the lagged water quality monitoring time series and the time series of environmental factors after elimination processing of the same site, a matrix is ​​constructed to obtain the input matrix of several sites, and the input matrix of several sites is input into a preset convolutional neural network. According to the preset convolution algorithm, the convolution feature map of several sites is obtained, wherein the convolution algorithm is: Where Y i,j is the element at position (i, j) in the convolution feature map, X i+m,j+n,d is the element at position (i+m,j+n) in the input matrix that belongs to channel d; K m,n,d is the weight at position (m,n) in the convolution kernel corresponding to channel d; is the bias term of the convolution layer; i and j are indices in the convolution feature map, F is the convolution kernel size, and D is the total number of channels; The convolution feature maps of several stations and the water quality monitoring time series of corresponding downstream stations are input into the water quality prediction model, and water quality prediction is performed based on the convolution feature maps of several stations to obtain water quality prediction time series of several stations; model training is performed based on the water quality prediction time series of several stations and the water quality monitoring time series of corresponding downstream stations to obtain a target water quality prediction model, wherein the water quality prediction model is a long short-term memory neural network model.

7. A water quality prediction device, characterized in that: include: A data acquisition module is used to obtain the water quality monitoring time series and environmental factor time series of several stations in the target river within a preset time period; A hysteresis processing module, used for performing hysteresis processing on the water quality monitoring time series according to the water quality monitoring time series of the plurality of stations and the upstream and downstream relationship between the plurality of stations, so as to obtain the hysteresis water quality monitoring time series of the plurality of stations; A model training module is used to perform model training on a preset water quality prediction model according to the water quality monitoring time series, the lagged water quality monitoring time series and the environmental factor time series of the plurality of said sites, so as to obtain a target water quality prediction model, wherein the target water quality prediction model is a model that takes the lagged water quality monitoring time series and the environmental factor time series of the site as input and the water quality prediction time series of the downstream site corresponding to the site as output; The water quality prediction module is used to obtain the water quality monitoring time series and environmental factor time series of the target site of the target river within the target time period, input the water quality monitoring time series and environmental factor time series of the target site into the target water quality prediction model for water quality prediction, and obtain the water quality prediction time series of the downstream site corresponding to the target site.

8. A computer device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the water quality prediction method according to any one of claims 1 to 6 are implemented.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the water quality prediction method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • River channel space section water quality prediction method based on physical information neural network

    CN121744953A

  • River space section water quality prediction method based on physical information neural network

    CN121744953B