Water level prediction method and equipment

By combining hydrological models, machine learning models and deep learning models, the timing and spatial characteristics of water levels are extracted, and the existing water level prediction methods are solved, and more accurate and efficient water level prediction is achieved.

CN118760956BActive Publication Date: 2024-12-03HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411256213.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-03
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

The existing water level prediction methods have problems such as poor prediction effect and low prediction efficiency. Especially in the case of heavy rain, sharp ice melting, reservoir dam collapse, storm surge, etc., it is difficult to accurately predict the formation of floods.

Method used

Using coupled hydrological models, machine learning models and deep learning models, the water volume changes in the basin is calculated and generated convergence data is generated by obtaining raw hydrological data, thereby extracting timing and spatial characteristics, performing water level prediction, and outputting machine learning and deep learning models. The results are fused.

Benefits of technology

It improves the accuracy and stability of water level prediction, while improving prediction efficiency, ensuring real-time and reliability in flood monitoring and prevention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760956B_ABST
    Figure CN118760956B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and discloses a water level prediction method and device, the method comprising: in response to a water level prediction request, obtaining original hydrological data of a basin to be predicted, generating runoff data of the basin to be predicted through a hydrological model according to the original hydrological data, intercepting time series data from the original hydrological data and the runoff data, extracting time series features that affect the predicted water level of the basin to be predicted from the time series data, extracting spatial features that affect the predicted water level of the basin to be predicted from the basin information of the target basin, inputting the time series features and the spatial features into a machine learning model, and inputting the original hydrological data and the runoff data into a deep learning model, to obtain the predicted water level of the basin to be predicted; since the present application performs water level prediction by coupling multiple models, and can extract the time series features and spatial features that affect the water level, the accuracy and efficiency of water level prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a water level prediction method and device. Background Art

[0002] Due to heavy rain, rapid melting of ice and snow, dam collapse, storm surge and other reasons, the water flow of rivers, lakes and oceans increases or the water level rises beyond a certain limit, which easily leads to the formation of floods. The water conservancy industry uses water level prediction methods to predict water levels in real time, improve flood monitoring and enhance flood prevention capabilities. However, the relevant water level prediction methods have the defects of poor prediction effect and low prediction efficiency. Summary of the invention

[0003] The main purpose of this application is to provide a water level prediction method and device, aiming to solve the technical problems of poor prediction effect and low prediction efficiency of related water level prediction methods.

[0004] To achieve the above object, the present application provides a water level prediction method, which comprises:

[0005] In response to a water level prediction request, obtaining original hydrological data of a watershed to be predicted;

[0006] Calculating the change in water volume of the watershed to be predicted through a hydrological model according to the original hydrological data, and generating runoff data of the watershed to be predicted according to the change in water volume, wherein the hydrological model is used to calculate the change in water volume of the watershed to be predicted by simulating the water cycle process of the watershed to be predicted, and the data granularity of the runoff data is smaller than the data granularity of the original hydrological data;

[0007] respectively intercepting time series data from the original hydrological data and the runoff data, and extracting time series features affecting the predicted water level of the basin to be predicted from the time series data;

[0008] Extracting spatial features that affect the predicted water level of the to-be-predicted watershed from watershed information of a target watershed, wherein the target watershed is a watershed associated with the to-be-predicted watershed;

[0009] Inputting the time series features and the spatial features into a machine learning model to obtain a water level prediction result output by the machine learning model, and inputting the original hydrological data and the runoff data into a deep learning model to obtain a water level prediction result output by the deep learning model;

[0010] The water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model are integrated to obtain the predicted water level of the basin to be predicted.

[0011] Optionally, the time series features include hysteresis features, window features, timestamp-derived features, seasonal features, and trend features, and extracting the time series features that affect the predicted water level of the basin to be predicted from the time series data includes:

[0012] Acquire multiple sub-periods of the time series data, and extract hysteresis features within the sub-periods, wherein the hysteresis features are used to represent the relationship between the water level at a certain moment and the water level at a certain moment in the past;

[0013] Calculating a time window according to the sub-period, and performing aggregation calculation on the time series data within the time window to obtain window features within the time window;

[0014] Extracting a timestamp-derived feature that affects the water level from the time series data, wherein the timestamp-derived feature is additional information extracted from a timestamp field of the time series data;

[0015] The seasonal characteristics and trend characteristics that affect the water level are extracted from the time series data, wherein the seasonal characteristics are used to represent the seasonal periodic variation law of the time series data, and the trend characteristics are used to represent the trend variation law of the time series data.

[0016] Optionally, extracting seasonal characteristics and trend characteristics affecting the water level from the time series data according to the time window includes:

[0017] A time series data interception window is set according to the time window, and the time series data is intercepted according to the time series data interception window to obtain a time subsequence, wherein the time series data interception window is larger than the time window;

[0018] Decomposing the time subseries to obtain trend time subseries and seasonal time subseries;

[0019] The trend characteristics affecting the water level are extracted from the trend time subseries, and the seasonal characteristics affecting the water level are extracted from the season time subseries.

[0020] Optionally, decomposing the time subsequences to obtain trend time subsequences and season time subsequences includes:

[0021] Analyze the interaction type between trend and seasonality in the time subseries, the interaction type includes additive type and multiplicative type, when the interaction type is additive type, the time subseries is the sum of trend time subseries, seasonal time subseries and random noise; when the interaction type is multiplicative type, the time subseries is the product of trend time subseries, seasonal time subseries and random noise;

[0022] Decomposing the time subsequence based on the mutual influence type to obtain an initial trend time subsequence;

[0023] Performing smoothing processing on the initial trend time subsequence to obtain a trend time subsequence;

[0024] Obtaining the remaining data after removing the initial trend time subsequence from the time subsequence;

[0025] When the interaction type is an additive type, calculating the average value of the remaining data to obtain a seasonal time subseries;

[0026] When the interaction type is a multiplicative type, the geometric mean of the remaining data is calculated to obtain a seasonal time subseries.

[0027] Optionally, the window features include statistical domain features and frequency domain features within the time window, and calculating the time window according to the sub-periods and performing aggregation calculation on the time series data within the time window to obtain the window features within the time window includes:

[0028] Acquire at least two consecutive sub-cycles in the sub-cycle, where the at least two consecutive sub-cycles include a first consecutive sub-cycle and a second consecutive sub-cycle, and a maximum period value of the first consecutive sub-cycle is smaller than a minimum period value of the second consecutive sub-cycle;

[0029] Determine whether the maximum period value of the first continuous sub-period is greater than a preset period value, wherein the preset period value is preset according to the water level prediction requirement of the basin to be predicted;

[0030] When the maximum period value of the first continuous sub-period is greater than the preset period value, taking the maximum period value of the first continuous sub-period as the time window;

[0031] When the maximum period value of the first continuous sub-period is not greater than the preset period value, taking the maximum period value of the second continuous sub-period as the time window;

[0032] The statistical domain features of the sub-cycle in the time window are extracted by a statistical domain operator, and the frequency domain features of the sub-cycle in the time window are extracted by a frequency domain operator.

[0033] Optionally, acquiring multiple sub-periods of the time series data and extracting hysteresis features within the sub-periods includes:

[0034] The time series data is offset by a preset period to obtain offset data;

[0035] Calculating the time series correlation between the offset data and the time series data;

[0036] When the time series correlation is greater than a preset threshold, the preset period is used as a sub-period of the time series data, and the hysteresis feature within the sub-period is extracted.

[0037] Optionally, fusing the water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model to obtain the predicted water level of the basin to be predicted includes:

[0038] Determining a water level prediction time according to the water level prediction request, and judging whether the water level prediction time is less than a preset short-term prediction threshold;

[0039] According to the judgment result, weight values ​​are set for the machine learning model and the deep learning model respectively, wherein when the water level prediction moment is less than a preset short-term prediction threshold, the weight value of the machine learning model is set to be greater than the weight value of the deep learning model; when the water level prediction moment is not less than the preset short-term prediction threshold, the weight value of the machine learning model is set to be less than the weight value of the deep learning model;

[0040] According to the weight value of the machine learning model and the weight value of the deep learning model, the water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model are weightedly fused to obtain the predicted water level of the basin to be predicted.

[0041] Optionally, the runoff data include basin evaporation, permeable area runoff, surface runoff, subsoil flow, underground runoff and basin outlet section runoff. The water volume change of the basin to be predicted is calculated by a hydrological model based on the original hydrological data, and the runoff data of the basin to be predicted is generated based on the water volume change, including:

[0042] Calculate the evaporation of the watershed to be predicted by a hydrological model according to the original hydrological data;

[0043] Calculate the flow generation of the permeable area of ​​the watershed to be predicted through the hydrological model according to the original hydrological data and the evaporation of the watershed;

[0044] Calculate the surface runoff, subsoil runoff and underground runoff of the basin to be predicted by the hydrological model according to the runoff generated by the permeable area;

[0045] The runoff volume at the outlet section of the watershed to be predicted is calculated through the hydrological model according to the surface runoff, the subsoil runoff and the underground runoff.

[0046] Optionally, the calculating the evaporation of the watershed to be predicted by a hydrological model according to the original hydrological data includes:

[0047] Obtaining the rainfall and water surface evaporation of the basin to be predicted from the original hydrological data;

[0048] Obtaining the upper soil moisture content, the basin evapotranspiration conversion coefficient, the lower water storage capacity, the lower soil moisture content and the deep evapotranspiration coefficient of the watershed to be predicted;

[0049] Calculate the upper evaporation, lower evaporation and deep evaporation of the basin to be predicted according to the rainfall, the water surface evaporation, the upper soil moisture content, the basin evaporation conversion coefficient, the lower water storage capacity, the lower soil moisture content and the deep evaporation coefficient;

[0050] The evaporation of the watershed to be predicted is calculated according to the upper layer evaporation, the lower layer evaporation and the deep layer evaporation.

[0051] Optionally, the calculating the runoff generation of the permeable area of ​​the to-be-predicted watershed through the hydrological model according to the original hydrological data and the watershed evaporation includes:

[0052] Obtaining the initial average water storage capacity of the watershed to be predicted, the maximum water storage capacity in the watershed, the average water storage capacity of the watershed, the initial average water storage capacity of the watershed, and the power of the water storage capacity curve of the watershed to be predicted, wherein the average water storage capacity of the watershed is calculated based on the watershed area when the water storage capacity is less than or equal to the maximum water storage capacity in the watershed and the watershed area of ​​the watershed to be predicted;

[0053] Calculate the runoff value of the watershed to be predicted according to the rainfall and the evaporation of the watershed;

[0054] When the sum of the runoff value and the initial average water storage capacity of the basin is less than the maximum water storage capacity in the basin, the runoff of the permeable area of ​​the basin to be predicted is calculated according to the runoff value, the average water storage capacity of the basin, the initial average water storage of the basin and the power of the water storage capacity curve;

[0055] When the sum of the runoff value and the initial average water storage capacity of the basin is not less than the maximum water storage capacity in the basin, the runoff of the permeable area of ​​the basin to be predicted is calculated according to the runoff value, the average water storage capacity of the basin and the initial average water storage of the basin.

[0056] Optionally, the calculating the surface runoff, subsoil runoff and underground runoff of the basin to be predicted by the hydrological model according to the runoff generated by the permeable area includes:

[0057] Calculate the runoff area at the current moment according to the runoff generation of the permeable area and the runoff generation value;

[0058] Calculate the average free water depth at the current moment based on the runoff area at the previous moment and the average free water depth on the runoff area;

[0059] Calculate the free water storage capacity and average water storage capacity depth of the largest point on the runoff area according to the average free water capacity of the basin to be predicted and the index of the free water storage capacity curve of the basin;

[0060] The surface runoff, subsoil flow and underground runoff of the watershed to be predicted are calculated according to the runoff-generating area at the current moment, the average free water depth at the current moment, the free water storage capacity and the average storage capacity depth.

[0061] Optionally, the calculating the runoff volume of a watershed outlet section of the watershed to be predicted by the hydrological model according to the surface runoff, the subsoil runoff and the underground runoff includes:

[0062] Calculate the total inflow of the watershed to be predicted according to the surface runoff, the subsoil flow and the underground runoff;

[0063] According to the total inflow, the river network confluence of the water body from entering the river channel to the unit outlet is simulated based on the unit line model to obtain the runoff volume of the watershed outlet section of the watershed to be predicted.

[0064] In addition, to achieve the above-mentioned purpose, the present application also proposes a water level prediction device, which comprises:

[0065] A hydrological data acquisition module, used to obtain original hydrological data of the basin to be predicted in response to a water level prediction request;

[0066] A runoff generation and confluence data generation module, used to calculate the water volume change of the watershed to be predicted by a hydrological model according to the original hydrological data, and generate the runoff generation and confluence data of the watershed to be predicted according to the water volume change of the watershed, wherein the hydrological model is used to calculate the water volume change of the watershed to be predicted by simulating the water cycle process of the watershed to be predicted, and the data granularity of the runoff generation and confluence data is smaller than the data granularity of the original hydrological data;

[0067] A time series feature extraction module, used to intercept time series data from the original hydrological data and the runoff data, and extract time series features that affect the predicted water level of the basin to be predicted from the time series data;

[0068] A spatial feature extraction module, used for extracting spatial features affecting the predicted water level of the to-be-predicted watershed from the watershed information of the target watershed, wherein the target watershed is a watershed having a water level correlation with the to-be-predicted watershed;

[0069] A watershed water level prediction module, used for inputting the time series characteristics and the spatial characteristics into a machine learning model to obtain a water level prediction result output by the machine learning model, and inputting the original hydrological data and the runoff data into a deep learning model to obtain a water level prediction result output by the deep learning model;

[0070] The prediction result fusion module is used to fuse the water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model to obtain the predicted water level of the basin to be predicted.

[0071] In addition, to achieve the above-mentioned purpose, the present application also proposes a water level prediction device, which includes a memory, a processor, and a water level prediction program stored in the memory and executable on the processor, and the water level prediction program is configured to implement the water level prediction method described above.

[0072] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which a water level prediction program is stored. When the water level prediction program is executed by a processor, the water level prediction method as described above is implemented.

[0073] One or more technical solutions proposed in this application have at least the following technical effects:

[0074] In the present application, a method for obtaining original hydrological data of a watershed to be predicted in response to a water level prediction request, calculating the change in water volume of the watershed to be predicted through a hydrological model based on the original hydrological data, generating runoff data of the watershed to be predicted based on the change in water volume, intercepting time series data from the original hydrological data and the runoff data, extracting time series features that affect the predicted water level of the watershed to be predicted from the time series data, extracting spatial features that affect the predicted water level of the watershed to be predicted from the watershed information of the target watershed, inputting the time series features and the spatial features into a machine learning model to obtain a water level prediction result output by the machine learning model, and inputting the original hydrological data and the runoff data into a deep learning model to obtain a water level prediction result output by the deep learning model. The water level prediction results of the machine learning model and the water level prediction results of the deep learning model are integrated to obtain the predicted water level of the basin to be predicted; since the present application performs water level prediction by coupling the hydrological model, the machine learning model and the deep learning model, and obtains finer-grained hydrological data for water level prediction through the hydrological model, the accuracy of water level prediction can be improved; and water level prediction is performed simultaneously through the machine learning model and the deep learning model, so that the advantages of the machine learning model and the deep learning model can be combined to ensure the accuracy and stability of water level prediction; and by automatically extracting the temporal features and spatial features that affect the water level, the efficiency can be greatly improved while ensuring the effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0077] Figure 1 This is a flow chart of the first embodiment of the water level prediction method of the present application;

[0078] Figure 2 A schematic diagram of a water level model of an embodiment of a water level prediction method of the present application;

[0079] Figure 3 This is a flow chart of an embodiment of a water level prediction method of the present application;

[0080] Figure 4 This is a flow chart of a second embodiment of the water level prediction method of the present application;

[0081] Figure 5 This is a flow chart of a third embodiment of the water level prediction method of the present application;

[0082] Figure 6 This is a flow chart of a fourth embodiment of the water level prediction method of the present application;

[0083] Figure 7 This is a schematic diagram of the module structure of the water level prediction device according to an embodiment of the present application;

[0084] Figure 8 Schematic diagram of the device structure of the hardware operating environment involved in the water level prediction method in the embodiment of the present application.

[0085] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0086] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0087] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0088] At present, with the rapid development of artificial intelligence, the application of artificial intelligence is increasing. All walks of life have begun to introduce machine learning methods to solve practical problems. The water conservancy industry has also begun to introduce AI methods to predict water levels and improve flood prevention capabilities. Due to heavy rains, rapid ice and snow melting, reservoir dam collapse, storm surges and other reasons, the flow of rivers, lakes and oceans increases or the water level rises beyond a certain limit, which can easily lead to the formation of floods. The water conservancy industry uses water level prediction methods to predict water levels in real time, improve flood monitoring, and improve flood prevention capabilities.

[0089] The development of water level prediction technology has experienced an evolution from process-driven models to data-driven models. Process-driven models are mainly based on various hydrological models. The hydrological models fine-tuned by experts have high accuracy in water level prediction, but directly using hydrological models for water level prediction will be limited by many situations. For example, when affected by tides, the accuracy of water level prediction will be particularly poor; data-driven models include mathematical and statistical models, machine learning models, and deep learning models. Mathematical and statistical models are simple to use and require less hydrological data, but require the stability of time series data, otherwise the prediction accuracy will be particularly poor; machine learning models can ensure the accuracy of water level prediction by manually constructing features that affect water levels, but manual feature construction is time-consuming and labor-intensive and relies on expert experience; deep learning models can ensure the accuracy of water level prediction by automatically learning the temporal and spatial dependencies of water levels, but deep learning models require a large amount of hydrological data to ensure that the model is fully trained, thereby ensuring the accuracy of water level prediction.

[0090] Therefore, in order to overcome the above-mentioned defects, the present application provides a solution, which includes: in response to a water level prediction request, obtaining the original hydrological data of the basin to be predicted, calculating the water volume change of the basin to be predicted through a hydrological model based on the original hydrological data, and generating the runoff data of the basin to be predicted based on the water volume change, intercepting time series data from the original hydrological data and the runoff data, and extracting the time series features that affect the predicted water level of the basin to be predicted from the time series data, extracting the spatial features that affect the predicted water level of the basin to be predicted from the basin information of the target basin, inputting the time series features and the spatial features into a machine learning model to obtain a water level prediction result output by the machine learning model, and inputting the original hydrological data and the runoff data into a deep learning model to obtain The water level prediction result output by the deep learning model is obtained, and the water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model are integrated to obtain the predicted water level of the basin to be predicted; since the present application performs water level prediction by coupling the hydrological model, the machine learning model and the deep learning model, and obtains finer-grained hydrological data through the hydrological model for water level prediction, the accuracy of water level prediction can be improved; and water level prediction is performed simultaneously through the machine learning model and the deep learning model, so that the advantages of the machine learning model and the deep learning model can be combined to ensure the accuracy and stability of the water level prediction; and by automatically extracting the temporal features and spatial features that affect the water level, the efficiency can be greatly improved while ensuring the effect.

[0091] It should be noted that the executor of the embodiment of the present application may be a water level prediction device with data processing, network communication and program running functions, such as a computer, or other electronic devices that can achieve the same or similar functions, and this embodiment does not impose any restrictions on this.

[0092] Based on this, the present application embodiment provides a water level prediction method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the water level prediction method of the present application.

[0093] In a first embodiment, the water level prediction method includes:

[0094] Step S10: In response to a water level prediction request, original hydrological data of the basin to be predicted is obtained.

[0095] It should be understood that the application scenario of the embodiment of the present application may be to predict the water level of a certain river basin (i.e., the river basin to be predicted) within a certain time period in the future (such as within 24 hours), wherein the original hydrological data used for the prediction may include the observed meteorological data, observed water level data and forecast meteorological data of the river basin to be predicted, the observed meteorological data may be the meteorological data such as rainfall, temperature, wind speed, wind direction of the river basin to be predicted within a certain time period before (such as within the previous 7 days), the observed water level data may include the water level data of the river basin to be predicted within a certain time period before (such as within the previous 7 days), and the forecast meteorological data may be the meteorological data such as rainfall, temperature, wind speed, wind direction of the river basin to be predicted within a certain time period in the future (such as within the next 24 hours).

[0096] In a specific implementation, a water level prediction request may be initiated by a user, or may be automatically initiated based on water level prediction requirements (e.g., automatically predicting the water level within the next 24 hours at 0:00 every day), and this embodiment does not limit this. The original hydrological data of the basin to be predicted may be obtained from a preset server, or may be obtained through a preset sensor, wherein the preset server may be a server for storing the above-mentioned original hydrological data, and the preset sensor may be a water level sensor, a rainfall sensor, etc. pre-set in the basin to be predicted, and this embodiment does not limit this.

[0097] Step S20: Calculating the water volume change of the watershed to be predicted through a hydrological model according to the original hydrological data, and generating runoff data of the watershed to be predicted according to the water volume change of the watershed;

[0098] The hydrological model is used to calculate the water volume changes in the basin to be predicted by simulating the water cycle process of the basin to be predicted, and the data granularity of the runoff data is smaller than the data granularity of the original hydrological data.

[0099] It is understandable that the finer the data granularity, the more detailed the data storage and the more information it contains; conversely, the coarser the data granularity, the coarser the data storage and the less information it contains. Therefore, in this embodiment, a hydrological model is used to obtain finer-grained hydrological data (i.e., runoff data), and the original hydrological data and runoff data are used as model inputs and simultaneously input into the machine learning model and the deep learning model, so that the hydrological model can be used to obtain finer-grained hydrological data, so that the machine learning model and the deep learning model can learn more rules from the rich hydrological data to predict the water level, thereby improving the accuracy of the water level prediction.

[0100] In specific implementation, changes in water volume in a river basin will directly lead to changes in the water level in the basin. Changes in water volume in a river basin are mainly caused by rainfall and evaporation. The total amount of rainfall is not completely equivalent to the total amount of water level change. In the complete water cycle of a river basin, multiple activities are involved, such as water evaporation, water infiltration, and water inflow. For example, rainfall falling into the basin directly affects the water level of the basin. Rainfall falling into the adjacent area of ​​the basin, precipitation in the adjacent area evaporates, infiltrates, and flows into the basin, thereby affecting the water level of the basin. Climate factors such as temperature and sunshine cause water evaporation in the basin or adjacent areas, affecting the water level of the basin. The amount of water that flows into the basin or from the neighboring areas, the hydrological model approximates the water cycle process of the basin to be predicted, and the water inflow and outflow of the basin to be predicted can be calculated by using a mathematical model to obtain the change of the water volume of the basin to be predicted. Therefore, the runoff data can include the evaporation of the basin, the runoff of the permeable area, the surface runoff, the soil flow, the underground runoff and the runoff of the basin outlet section. These runoff data can measure the change of the water volume in the basin. The change of the water volume in the basin will directly affect the change of the water level, and is the key data for predicting the change of the water level in the basin. Step S20 can specifically include calculating the evaporation of the basin to be predicted through the hydrological model according to the original hydrological data, calculating the permeable area runoff of the basin to be predicted through the hydrological model according to the original hydrological data and the evaporation of the basin, calculating the surface runoff, soil flow and underground runoff of the basin to be predicted through the hydrological model according to the permeable area runoff, and calculating the runoff of the basin outlet section of the basin to be predicted through the hydrological model according to the surface runoff, soil flow and underground runoff.

[0101] Furthermore, in order to improve the accuracy of basin evaporation calculation, the basin evaporation of the basin to be predicted is calculated through a hydrological model based on the original hydrological data, including: obtaining the rainfall and water surface evaporation of the basin to be predicted from the original hydrological data; obtaining the upper soil moisture content, the basin evaporation conversion coefficient, the lower water storage capacity, the lower soil moisture content and the deep evaporation coefficient of the basin to be predicted; calculating the upper evaporation, lower evaporation and deep evaporation of the basin to be predicted according to the rainfall, water surface evaporation, upper soil moisture content, basin evaporation conversion coefficient, lower water storage capacity, lower soil moisture content and deep evaporation coefficient; calculating the basin evaporation of the basin to be predicted according to the upper evaporation, lower evaporation and deep evaporation (the specific calculation formula corresponds to the three-layer evaporation calculation in the hydrological model).

[0102] Furthermore, in order to improve the accuracy of the calculation of runoff generation of the permeable area, the permeable area runoff generation of the basin to be predicted is calculated through the hydrological model based on the original hydrological data and the basin evaporation, including: obtaining the initial average water storage capacity of the basin to be predicted, the maximum water storage capacity in the basin, the average water storage capacity of the basin, the initial average water storage capacity of the basin, and the power of the water storage capacity curve, wherein the average water storage capacity of the basin is calculated based on the basin area when the water storage capacity is less than or equal to the maximum water storage capacity in the basin and the basin area of ​​the basin to be predicted; according to the rainfall and the basin evaporation Calculate the runoff value of the basin to be predicted; when the sum of the runoff value and the initial average water storage capacity of the basin is less than the maximum water storage capacity in the basin, calculate the runoff of the permeable area of ​​the basin to be predicted based on the runoff value, the average water storage capacity of the basin, the initial average water storage of the basin and the power of the water storage capacity curve; when the sum of the runoff value and the initial average water storage capacity of the basin is not less than the maximum water storage capacity in the basin, calculate the runoff of the permeable area of ​​the basin to be predicted based on the runoff value, the average water storage capacity of the basin and the initial average water storage of the basin (the specific calculation formula corresponds to the full storage runoff calculation in the hydrological model).

[0103] Furthermore, in order to improve the accuracy of calculation of surface runoff, subsoil flow and underground runoff, the surface runoff, subsoil flow and underground runoff of the basin to be predicted are calculated through a hydrological model based on the runoff generation of the permeable area, including: calculating the runoff generation area at the current moment based on the runoff generation and the runoff generation value of the permeable area; calculating the average free water depth at the current moment based on the runoff generation area at the previous moment and the average free water depth on the runoff generation area; calculating the free water storage capacity and the average storage capacity depth at the largest point on the runoff generation area based on the average free water capacity of the basin to be predicted and the index of the free water storage capacity curve of the basin; calculating the surface runoff, subsoil flow and underground runoff of the basin to be predicted based on the runoff generation area at the current moment, the average free water depth at the current moment, the free water storage capacity and the average storage capacity depth (the specific calculation formula corresponds to the source division calculation in the hydrological model).

[0104] Furthermore, in order to improve the accuracy of the calculation of the runoff at the outlet section of the basin, the runoff at the outlet section of the basin to be predicted is calculated through a hydrological model based on the surface runoff, subsoil flow and underground runoff, including: calculating the total inflow of the basin to be predicted based on the surface runoff, subsoil flow and underground runoff; simulating the river network confluence of the water body from entering the river channel to the unit outlet based on a unit line model according to the total inflow, to obtain the runoff at the outlet section of the basin to be predicted (the specific calculation formula corresponds to the river network confluence calculation in the hydrological model).

[0105] For ease of understanding, refer to Figure 2 This invention is provided for illustration, but is not intended to limit the present application. Figure 2This is a schematic diagram of a water level model of an embodiment of the water level prediction method of the present application. In the figure, as an example, it is assumed that the observed meteorological data input into the hydrological model include rainfall P and water surface evaporation EM, and the output includes the final output and the intermediate data output. The final output includes the evaporation of the basin E and the runoff of the basin outlet section Q; there are many intermediate data outputs, such as permeable area runoff R, surface runoff RS, soil flow RI, etc. The hydrological model includes four hierarchical structures, as shown in the dotted box in the figure, namely three-layer evapotranspiration, full storage runoff, water source division and river network confluence. In each layer of the structure, the data results can be obtained by the mechanism model (mathematical expression) and data input. The specific calculation formula is as follows:

[0106] a) Three-layer evapotranspiration calculation:

[0107] Inputs include rainfall P, surface evaporation EM, basin evaporation conversion coefficient K and deep evaporation coefficient c; water source: rainfall + soil moisture content of each layer - basin evaporation - surface evaporation. The principle of evaporation is from the upper layer to the lower layer and finally the deep layer, evaporation layer by layer; the upper layer evaporates according to the basin evaporation conversion coefficient K, and the lower layer and deep layer need to consider the deep evaporation coefficient additionally. The output includes the evapotranspiration EU, EL, ED of the upper, lower and deep layers of the basin, so the evaporation of the basin The calculation process is as follows:

[0108] when When ; Where P is rainfall, E is watershed evaporation, WU represents the upper soil moisture content, EM represents water surface evaporation, K is the conversion coefficient of watershed evaporation capacity, EU represents upper evaporation, EL represents lower evaporation, and ED represents deep evaporation;

[0109] when When EU=P – E + WU,

[0110] like ,but , ;

[0111] like and , then EL=C*(EP-EU), ED=0;

[0112] like and , then EL=WL, ED=C*(EP-EU)-WL;

[0113] in, Indicates the water storage capacity of the lower layer, Indicates the moisture content of the lower soil layer. is the deep evapotranspiration coefficient, where .

[0114] b) Calculation of full flow:

[0115] Given , P is rainfall, E is basin evaporation, PE is runoff value;

[0116] If PE>0, runoff occurs, otherwise no runoff occurs, that is, runoff occurs only when rainfall is greater than evaporation, where P represents rainfall and E represents evaporation in the basin;

[0117] like When , where A is the initial average water storage capacity of the basin, B is the power of the water storage capacity curve, is the maximum water storage capacity in the basin, represents the initial average water storage of the basin, WM is the average water storage capacity of the basin, ; The water storage capacity is less than or equal to The drainage area at the value of is the watershed area;

[0118] when hour, , the output is the flow R of the permeable area.

[0119] c) Source partition calculation:

[0120] The input is the runoff R of the permeable area. The runoff R calculated by the full runoff module enters the reservoir. When the reservoir is full, the overflowing water forms surface runoff RS, and the water flowing out of the side outlet of the reservoir is subsoil flow RI. The output includes surface runoff RS, subsoil flow RI, and underground runoff RG.

[0121] According to the runoff R of the permeable area and the difference PE between rainfall and evaporation in the basin, the runoff area FR at the current moment is calculated (FR=R / PE); according to the runoff area FR0 at the previous moment and the average free water depth S0 on the runoff area, the average free water depth S at the current moment is calculated = S0*FR0 / FR; according to the average free water capacity SM of the basin and the index EX of the free water storage capacity curve of the basin, the free water storage capacity SMMF and the average storage capacity depth SMF at the largest point on the runoff area FR are calculated:

[0122]

[0123]

[0124]

[0125]

[0126] like ,but , , ;

[0127] like ,but , , ; Among them, KSS and KG are the daily flow coefficients of subsoil flow and groundflow, respectively.

[0128] d) River network confluence calculation:

[0129] The input includes surface runoff RS, subsoil flow RI, underground runoff RG. In the slope confluence stage, RS, RI, and RG are stored in the linear reservoir and then flow into the river network to form the final total inflow TR(t). The calculation process of TR(t) is as follows:

[0130] (U is the unit conversion factor)

[0131] (KKSS represents the recession coefficient of the mid-stream reservoir)

[0132] (KKG represents the recession coefficient of the underground reservoir)

[0133]

[0134] in, represents the surface runoff at time t, represents the total inflow of surface runoff to the river network at time t, represents the total inflow of the Soil Stream to the river network at time t, KKSS represents the recession coefficient of the Soil Stream reservoir, represents the soil flow at time t Through the regulation of linear reservoir, It represents the total inflow of groundwater to the river network at time t. The unit line model is used to simulate the confluence of water from entering the river channel to the unit outlet at the river network confluence stage, and finally the cross-sectional flow of the basin outlet is obtained. ,in is the flow value at the unit outlet at time t, is the dimensionless time period unit line, is the duration period of the unit line; the output is the flow rate Q at the outlet section of the basin.

[0135] The runoff data generated in this embodiment include basin evaporation E, permeable area runoff R, surface runoff RS, subsoil flow RI and underground runoff RG, and basin outlet section runoff Q; these runoff data can measure the change of basin water volume. The change of basin water volume will directly affect the change of water level, and are key data for predicting basin water level change.

[0136] Step S30: respectively extracting time series data from the original hydrological data and the runoff data, and extracting time series features that affect the predicted water level of the basin to be predicted from the time series data.

[0137] It should be understood that in the related art, when the machine learning model is used to predict water levels, it is necessary to rely on experts to construct features, which is time-consuming, labor-intensive, and inefficient. Therefore, in order to overcome the above defects, in this embodiment, the temporal features and spatial features that affect the water level are automatically extracted, and the water level is predicted through the machine learning model based on the temporal features and spatial features.

[0138] It should be noted that time series data can be data arranged in chronological order, which is used to describe the changes of data over time. In the specific implementation, time series data are respectively extracted from observed meteorological data, observed water level data, forecast meteorological data and runoff data, and then the time series characteristics that affect the predicted water level of the basin to be predicted are extracted from the time series data.

[0139] It can be understood that the time series feature includes but is not limited to at least one of a timestamp derived feature, a time series value derived feature, and an attribute variable derived feature, and this embodiment does not impose any limitation on this.

[0140] Among them, timestamp derived features refer to additional information extracted from the timestamp (such as date and time) in the time series data, which is used to enhance the prediction ability of the model. Timestamp derived features include but are not limited to at least one of time features, Boolean features, and time difference features. Time features refer to time-related attributes directly extracted from time series data. In water level prediction, time features can include years, months, days, hours, etc. These basic time units can help identify seasonal patterns and periodic changes in water level changes (such as the water level in the rainy season is generally higher than that in the dry season). Boolean features are binary features whose values ​​can only be True or False. In water level prediction, Boolean features can be used to mark whether certain special events or conditions have occurred, such as whether it is a holiday (the water level during holidays may vary due to changes in human activities (such as increased tourism and reduced agricultural water use)), whether extreme weather events have occurred (such as heavy rains, droughts, etc., which have a significant impact on water levels). Time difference features refer to features obtained by calculating the difference between two time points. In water level forecasting, time lag features can include the number of days since the last flood or drought (which helps capture the speed and pattern of water level recovery from extreme events), the number of days since the start of a particular season (e.g., spring snowmelt may cause water levels to rise, while autumn may cause them to fall due to less rainfall), etc.

[0141] Time series value derived features refer to features calculated based on actual observations in time series data (such as historical water levels), which are used to capture the autocorrelation, trend and periodicity of time series data. Time series value derived features include but are not limited to lag features, window features, etc. Lag features refer to the relationship between an observation at a certain moment in time series data and its observation at a certain point in the past. Lag features can include the water level of the previous day (the current water level may be highly correlated with the water level of the previous day) and the water level of the same period in history (such as water level data at the same time point in the past few years, which can be used to identify seasonal patterns). Window features refer to features obtained by aggregating time series data within a certain time window. Window features can include sliding window statistics (such as the average water level, highest water level, lowest water level, etc. in the past week or month, which are used to smooth data and capture short-term water level change trends) and extended window statistics (considering water level data over a longer time range to capture long-term trends and periodic changes).

[0142] Attribute variable derived features refer to features calculated based on specific attributes of the basin (such as geographical location, topography, soil type, etc.). These features also have an important impact on water level prediction. Attribute variable derived features include but are not limited to continuous variable derivation and categorical variable encoding. Continuous variable derivation refers to the mathematical transformation or combination based on the original continuous variables (such as rainfall, soil moisture, etc.) to generate new continuous variable features. In water level prediction, continuous variable derivation can include rainfall (recent rainfall directly affects the amount of water in the basin, which in turn affects the water level) and soil moisture (soil moisture affects the infiltration and storage of surface water, thereby affecting the water level). Categorical variable encoding refers to the process of converting categorical data (such as basin type, soil type, etc.) into numerical data that the model can process. In water level prediction, since the model usually cannot directly process text or category labels, categorical variables need to be encoded. Encoding methods include One-Hot Encoding, Label Encoding, and Target Encoding. The above encoding methods are used to convert categorical variables into numerical features so that the model can learn the relationship between categorical variables and water levels.

[0143] Step S40: extracting spatial features affecting the predicted water level of the to-be-predicted watershed from the watershed information of the target watershed;

[0144] The target watershed is a watershed having a water level correlation with the watershed to be predicted.

[0145] It should be understood that the spatial feature may be a feature used to reflect the physical characteristics of the basin and the law of water flow movement, and this embodiment does not limit this. For example, as an example, assuming that the target basin is upstream of the basin to be predicted, and it takes 3 hours for the water flow from the target basin to reach the basin to be predicted, the spatial feature may be the water level of the target basin 3 hours ago, and this embodiment does not limit this.

[0146] Of course, in order to increase the amount of information of spatial characteristics, in this embodiment, the watershed area, terrain characteristics, soil type, vegetation coverage and climate characteristics of the target watershed can be first extracted from the watershed information of the target watershed, and then the impact of the target watershed on the watershed to be predicted in space can be analyzed based on the watershed area, terrain characteristics, soil type, vegetation coverage and climate characteristics, and then the spatial characteristics affecting the predicted water level of the watershed to be predicted can be extracted from the impact information.

[0147] It should be noted that the basin area refers to the area surrounded by the watershed, which affects the total amount of water resources and the confluence time in the basin. In this embodiment, the basin area of ​​the target basin can be calculated by the watershed data of the target basin. The terrain features may include slope and elevation distribution, wherein the slope of the target basin determines the speed and energy of the water flow, thereby affecting the rapid change of the water level. In this embodiment, the slope of each point in the target basin can be calculated by DEM (Digital Elevation Model); the elevation distribution of the target basin determines the flow direction and confluence path of the water flow. In this embodiment, the elevation distribution in the target basin can be calculated by DEM. Different soil types have a significant impact on water permeability, water retention and runoff generation capacity. In this embodiment, the soil type of the target basin can be extracted using the soil map or the soil type data layer in GIS (Geographic Information System). The degree of vegetation coverage affects the evaporation and infiltration of surface water, thereby indirectly affecting the water level. In this embodiment, the vegetation coverage can be analyzed by remote sensing satellite images (such as Landsat, MODIS, etc.), and the vegetation coverage of the target basin can be quantified using indicators such as the Normalized Difference Vegetation Index (NDVI). The spatial distribution of rainfall determines the water resource replenishment in different areas of the basin. Therefore, in this embodiment, the climate characteristics of the target basin are also obtained.

[0148] It should be understood that the information on the spatial impact of the target basin on the basin to be predicted based on the basin area, terrain characteristics, soil type, vegetation cover and climate characteristics can be analyzed by combining geographic spatial analysis methods and models (such as hydrological models, GIS spatial analysis tools, etc.) to evaluate how the hydrological process of the target basin spatially affects the basin to be predicted through mechanisms such as surface runoff, groundwater flow, evaporation and loss. This impact may involve multiple aspects such as water volume transmission, water quality changes, and flood propagation.

[0149] In specific implementation, for example, spatial features directly related to the water level changes in the basin to be predicted are screened out from the influencing information. These features may include: precipitation conditions in the upstream basin: the amount and intensity of precipitation in the upstream basin directly affect the water level changes in the downstream basin; terrain slope and flow direction: determine the direction and speed of water flow, and affect the time and range of flood propagation; soil saturation state: when the soil saturation is high, the infiltration capacity of the basin is reduced, and it is easier to form surface runoff, thereby pushing up the downstream water level; vegetation changes: vegetation changes may change the surface interception and evaporation, indirectly affecting the runoff generation and convergence process of the basin.

[0150] Step S50: Input the time series features and the spatial features into the machine learning model to obtain the water level prediction results output by the machine learning model, and input the original hydrological data and the runoff data into the deep learning model to obtain the water level prediction results output by the deep learning model.

[0151] It should be noted that the machine learning model and the deep learning model can be obtained by pre-training. For example, before step S10, it also includes: obtaining hydrological data samples of the basin to be predicted, generating runoff data samples of the basin to be predicted through a hydrological model based on the hydrological data samples, intercepting time series data samples from the hydrological data samples and the runoff data samples, and extracting time series feature samples that affect the predicted water level of the basin to be predicted from the time series data samples, extracting spatial feature samples that affect the predicted water level of the basin to be predicted from the basin information of the target basin, training the machine learning model based on the time series feature samples and the spatial feature samples, and training the deep learning model based on the hydrological data samples and the runoff data samples. The specific implementation method of obtaining each data and feature during model training is the same as the specific implementation method during water level prediction, and will not be repeated here.

[0152] For ease of understanding, the following examples are given, but this application is not limited. As an example, assuming that the water level prediction task is to predict the water level of the river basin at the next 24 moments, the training of the machine learning model can be to obtain the time series feature samples and the spatial feature samples, and initialize multiple machine learning models according to the water level prediction task (such as predicting the water level of the river basin at the next 24 moments) (1 prediction moment corresponds to 1 machine learning model, such as predicting the water level of the river basin at the next 24 moments, then 24 machine learning models need to be initialized), and train each machine learning model based on the time series feature samples, spatial feature samples and the water level samples at the previous moment, that is, train 24 models, each model predicts the predicted water level at one moment; training a deep learning model can be based on hydrological data samples (such as observed meteorological data samples, observed water level data samples, forecast meteorological data samples and runoff data samples) to train a deep learning model (such as a time series Transformer model), and the deep learning model can obtain the predicted water level at the next 24 moments through one prediction.

[0153] Therefore, when using a machine learning model to predict water levels, you only need to input the time series characteristics, spatial characteristics, and the water level at the previous moment into the machine learning model to obtain the water level prediction results output by the machine learning model (such as the predicted watershed water level at the next 24 moments); when using a deep learning model to predict water levels, you only need to input the original hydrological data (which may include observed meteorological data, observed water level data, and forecast meteorological data) and runoff data into the deep learning model to obtain the water level prediction results output by the deep learning model.

[0154] In the specific implementation, data from multiple months or years are used to train machine learning models and deep learning models, which have strong robustness and accuracy. Usually, the latest data is used to construct time series feature samples and spatial feature samples at the beginning of the month, and model training and model updating are performed once. Then, the same machine learning model and deep learning model are used for water level prediction throughout the month.

[0155] Step S60: Fusing the water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model to obtain the predicted water level of the basin to be predicted.

[0156] It should be understood that in order to improve the accuracy of the water level prediction results, in this embodiment, the machine learning model and the deep learning model are integrated, that is, the water level prediction results output by the machine learning model and the water level prediction results output by the deep learning model are fused to obtain the predicted water level of the basin to be predicted. Among them, the fusion of the water level prediction results output by the machine learning model and the water level prediction results output by the deep learning model can be a weighted fusion of the water level prediction results output by the machine learning model and the water level prediction results output by the deep learning model, that is, setting weight values ​​for the machine learning model and the deep learning model, and weighted fusion of the water level prediction results output by the machine learning model and the water level prediction results output by the deep learning model according to the weight values ​​of the machine learning model and the weight values ​​of the deep learning model to obtain the predicted water level of the basin to be predicted.

[0157] For ease of understanding, refer to Figure 3 This invention is provided for illustration, but is not intended to limit the present application. Figure 3 This is a flow chart of an embodiment of the water level prediction method of the present application. In the figure, as an example, the original hydrological data used include observed meteorological data, observed water level data and forecast meteorological data; using a hydrological model, the observed meteorological data is received as input to obtain runoff data, which is a more fine-grained hydrological data and can help improve the accuracy of water level prediction. Then, the observed meteorological data, observed water level data, observed meteorological data and runoff data can be used as inputs of an AI model (a machine learning model (i.e., the model used for regression prediction in the figure) and a deep learning model (i.e., the Transformer model used for time series prediction in the figure)), and the two AI models are integrated to provide stable and accurate water level prediction results. The machine learning model requires manual feature construction. This embodiment proposes a method for automatically extracting time series features and spatial features to improve the efficiency of implementing the machine learning model.

[0158] This embodiment predicts water level by coupling a hydrological model, a machine learning model and a deep learning model. The hydrological model is used to obtain more fine-grained hydrological data for water level prediction, thereby improving the accuracy of water level prediction. Water level prediction is performed simultaneously through machine learning models and deep learning models, thereby combining the advantages of machine learning models and deep learning models to ensure the accuracy and stability of water level prediction. And by automatically extracting the temporal and spatial features that affect the water level, efficiency can be greatly improved while ensuring the effect.

[0159] Reference Figure 4 , Figure 4 This is a flow chart of the second embodiment of the water level prediction method of the present application. Figure 1 The first embodiment shown is a second embodiment of the water level prediction method of the present application.

[0160] In the second embodiment, the time series features include lag features, window features, timestamp derivative features, seasonal features, and trend features, and step S30 includes:

[0161] Step S301: extracting time series data from the original hydrological data and the runoff data respectively.

[0162] It should be understood that in order to automatically extract important time series features and improve the accuracy of water level prediction, in this embodiment, the time series features are defined to include lag features, window features, timestamp derived features, seasonal features and trend features, and the extraction method of each feature is specifically defined.

[0163] It should be noted that the time series data may be water level data collected at different time points, and the time series data intercepted from the original hydrological data and runoff data may be composed of water level data at different time points intercepted from the original hydrological data and runoff data.

[0164] Step S302: acquiring multiple sub-periods of the time series data, and extracting hysteresis features within the sub-periods;

[0165] The hysteresis characteristic is used to represent the relationship between the water level at a certain moment and the water level at a certain moment in the past.

[0166] It can be understood that a sub-period may refer to a time period between data having time series correlation in the time series data. In this embodiment, multiple sub-periods of the time series data may be obtained by autocorrelation analysis, Fourier transform or data offset comparison.

[0167] It should be understood that the hysteresis feature is a feature constructed using the attribute value at a certain time in the past. For example, to predict the water level at time t+1, the water level value at time t-1 can be used as the hysteresis feature.

[0168] Furthermore, in order to improve the accuracy of hysteresis feature extraction, in this embodiment, the sub-period of the timing data is obtained by comparing the offset of the timing data, and the step S302 includes: offsetting the timing data by a preset period to obtain offset data; calculating the timing correlation between the offset data and the timing data; when the timing correlation is greater than a preset threshold, taking the preset period as the sub-period of the timing data, and extracting the hysteresis features within the sub-period.

[0169] It should be understood that time series data includes multiple sub-periods (e.g., river water levels may be more consistent with the water levels 12 hours ago due to the influence of tides).

[0170] For ease of understanding, the following is an explanation, but it does not limit the present application. As an example, assume that the time series data is offset by i steps (i.e., a preset period, which can be set in advance), and the time series correlation between the offset data and the original data is calculated. If the time series correlation is greater than a preset threshold, then i is considered to be a sub-period; through multiple continuous searches, multiple sub-periods are obtained, and the lag features within the sub-periods are extracted and processed. The specific formula is as follows:

[0171]

[0172]

[0173]

[0174]

[0175]

[0176]

[0177] in, Used to store sub-periods, is time series data, Indicates that the time series data is offset by i steps. represents a function that measures temporal correlation, where is the threshold value (default value, which can also be pre-specified by the user), Represents a function for extracting time series features.

[0178] Step S303: Calculate a time window according to the sub-period, and perform aggregation calculation on the time series data within the time window to obtain window features within the time window.

[0179] It should be understood that when extracting lag features, multiple continuous sub-periods will be obtained based on the time series correlation. Multiple continuous sub-periods can be merged to obtain a time window. Aggregation calculation of the time series data within the time window can be to calculate the average water level, maximum water level, water level fluctuation variance, etc. of the time series data in the time window. This embodiment does not limit this.

[0180] Further, in order to improve the accuracy of window feature extraction, in this embodiment, the time window is first determined by the period value of the continuous sub-period, and then the window feature is extracted by the statistical domain operator and the frequency domain operator, the window feature includes the statistical domain feature and the frequency domain feature in the time window, and the step S303 includes: obtaining at least two continuous sub-periods in the sub-period, the at least two continuous sub-periods include a first continuous sub-period and a second continuous sub-period, the maximum period value of the first continuous sub-period is less than the minimum period value of the second continuous sub-period; judging whether the maximum period value of the first continuous sub-period is greater than a preset period value, wherein the preset period value is pre-set according to the water level prediction requirement of the basin to be predicted; when the maximum period value of the first continuous sub-period is greater than the preset period value, the maximum period value of the first continuous sub-period is used as the time window; when the maximum period value of the first continuous sub-period is not greater than the preset period value, the maximum period value of the second continuous sub-period is used as the time window; extracting the statistical domain feature of the sub-period in the time window by the statistical domain operator, and extracting the frequency domain feature of the sub-period in the time window by the frequency domain operator.

[0181] For ease of understanding, the following is an explanation, but it does not limit the present application. As an example, when extracting hysteresis features, multiple continuous sub-periods are obtained based on the time series correlation, and multiple continuous sub-periods are merged to obtain a large time window (each time point in the time window has a strong correlation with the target time), and then the statistical domain features (such as maximum attribute value, minimum attribute value, etc.) and frequency domain features (such as Fourier change attribute value) in the time window are calculated.

[0182]

[0183]

[0184]

[0185] in, To extract the multiple sub-periods found in the process of hysteresis features, represents a function for finding consecutive subperiods, Indicates the maximum period value in the first continuous sub-period sequence (that is, the maximum period value of the first continuous sub-period), Indicates the maximum period value in the second continuous sub-period sequence (the maximum period value of the second continuous sub-period), represents the time window, Indicates the extraction of time window features.

[0186] Specifically, when predicting the water level at 00:00 on January 10, the formula It is found that the water levels at the previous moments 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 25, 29, 30, and 31 (each moment corresponds to a sub-period) have a significant impact on the water level at 00:00 on January 10. The first continuous sub-period is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. is 10, and the second consecutive sub-period is 16, 17, 18, 19, 20, is 20, because 0, therefore, , that is, merging each sub-period into a large time window, the large time window value is 20, and the large time window has multiple continuous sub-periods, through the formula The statistical domain operators (such as the average water level, maximum water level, and water level fluctuation variance within the time window) and frequency domain feature operators (such as the Fourier change of the water level within the time window) are used to calculate the relationship between sub-cycles to learn the law of water level change.

[0187] In general, the time window is determined by using an algorithm, and then the window features that affect the water level can be automatically extracted using defined feature operators (statistical domain operators and frequency domain operators).

[0188] Step S304: extracting timestamp-derived features that affect the water level from the time series data;

[0189] The timestamp-derived feature is additional information extracted from the timestamp field of the time series data.

[0190] It should be noted that the timestamp derived features include but are not limited to at least one of time features, Boolean features, and time difference features. Time features refer to time-related attributes directly extracted from time series data. In water level prediction, time features can include years, months, days, hours, etc. These basic time units can help identify seasonal patterns and periodic changes in water level changes (such as the water level in the rainy season is generally higher than that in the dry season). Boolean features are binary features whose values ​​can only be True or False. In water level prediction, Boolean features can be used to mark whether certain special events or conditions have occurred, such as whether it is a holiday (the water level during holidays may vary due to changes in human activities (such as increased tourism and reduced agricultural water use)), whether extreme weather events have occurred (such as heavy rains, droughts, etc., which have a significant impact on water levels), etc. Time difference features refer to features obtained by calculating the difference between two time points. In water level forecasting, time lag features can include the number of days since the last flood or drought (which helps capture the speed and pattern of water level recovery from extreme events), the number of days since the start of a particular season (e.g., spring snowmelt may cause water levels to rise, while autumn may cause them to fall due to less rainfall), etc.

[0191] For ease of understanding, the following is an explanation, but it does not limit the present application. As an example, the timestamp derived features may include year, month, week, day, year-day (day of the year), month-day (day of the month), Sunday (day of the week), and whether it is a working day, etc., which are not limited in this embodiment.

[0192] Step S305: extracting seasonal characteristics and trend characteristics that affect the water level from the time series data;

[0193] Among them, the seasonal feature is used to represent the seasonal periodic change law of the time series data, and the trend feature is used to represent the trend change law of the time series data.

[0194] It should be understood that the machine learning model cannot automatically learn seasonal laws and trend laws, and seasonal features and trend features need to be manually extracted, which is not only time-consuming and labor-intensive but also extremely dependent on expert experience. Therefore, in order to overcome the above defects, in this embodiment, seasonal features and trend features that affect the water level are automatically extracted from the time series data as time series features. In the specific implementation, the seasonal features that affect the water level are extracted by analyzing the seasonal laws of the time series data, and the trend laws that affect the water level are extracted by analyzing the trend laws of the time series data.

[0195] This embodiment defines time series features to include lag features, window features, timestamp-derived features, seasonal features, and trend features, and specifically defines the method for extracting each feature, so that important time series features can be automatically extracted to improve the accuracy of water level prediction.

[0196] Reference Figure 5 , Figure 5 This is a flow chart of the third embodiment of the water level prediction method of the present application. Based on the above second embodiment, the third embodiment of the water level prediction method of the present application is proposed.

[0197] In the third embodiment, the step S305 includes:

[0198] Step S3051: setting a time series data interception window according to the time window, and intercepting the time series data according to the time series data interception window to obtain a time subsequence;

[0199] Wherein, the time series data capture window is larger than the time window.

[0200] It should be understood that in this embodiment, by setting a time series data interception window to intercept the time series data, time series data with stronger periodicity can be obtained, thereby improving the effect of the machine learning model in learning trend laws and seasonal laws, and further improving the effect of the machine learning model in the time series prediction scenario. In a specific implementation, the time series data interception window can be set according to a 2-fold time window, and the time series data can be intercepted through a 2-fold time window to obtain a time subsequence.

[0201] Step S3052: Decompose the time subsequence to obtain a trend time subsequence and a season time subsequence.

[0202] It can be understood that decomposing the time subsequences to obtain trend time subsequences and seasonal time subsequences can specifically be performed by decomposing the time subsequences into trend time subsequences and seasonal time subsequences according to the decomposition functions of the trend patterns and seasonal patterns, wherein the decomposition functions of the trend patterns and seasonal patterns can be preset.

[0203] Further, in order to improve the accuracy of subsequence decomposition, in this embodiment, the decomposition method of the time subsequence is determined based on the type of mutual influence between the trend and seasonality in the time subsequence, and the step S3052 includes: analyzing the type of mutual influence between the trend and seasonality in the time subsequence, the mutual influence type includes an additive type and a multiplicative type, when the mutual influence type is an additive type, the time subsequence is the sum of the trend time subsequence, the seasonal time subsequence and random noise; when the mutual influence type is a multiplicative type, the time subsequence is the product of the trend time subsequence, the seasonal time subsequence and random noise; decomposing the time subsequence based on the mutual influence type to obtain an initial trend time subsequence; smoothing the initial trend time subsequence to obtain a trend time subsequence; obtaining the remaining data in the time subsequence after removing the initial trend time subsequence; when the mutual influence type is an additive type, calculating the average value of the remaining data to obtain a seasonal time subsequence; when the mutual influence type is a multiplicative type, calculating the geometric mean of the remaining data to obtain a seasonal time subsequence.

[0204] For ease of understanding, the following is an explanation, but does not limit the present application. As an example, the steps of decomposing the time subsequence include:

[0205] 1. Model selection:

[0206] First, you need to decide whether to use an additive model or a multiplicative model for decomposition. The choice between these two models is usually based on the characteristics of the data:

[0207] Additive Model: When the trend, seasonality, and random components are independent and additive, an additive model is used. In this model, the time subseries Considered as trend time subseries , seasonal time subseries and random noise The sum of:

[0208]

[0209] Multiplicative model: When the seasonal variation changes with the trend level (i.e. the seasonal effect is multiplicative), a multiplicative model is used. In this model, the time subseries Considered as trend time subseries , seasonal time subseries and random noise The product of , but for the convenience of calculation, it will be converted into logarithmic form for addition decomposition:

[0210]

[0211] Then, yes Decompose it, and finally get the components on the original scale through exponential transformation.

[0212] 2. Trend time subseries extraction:

[0213] During the decomposition process, the trend time subseries is estimated by smoothing techniques such as moving average (e.g., simple moving average, weighted moving average), exponential smoothing (e.g., simple exponential smoothing, Holt linear trend, Holt-Winters seasonal exponential smoothing), etc. These methods are designed to reduce random fluctuations in the data and thus highlight long-term trends.

[0214] 3. Seasonal time subseries extraction:

[0215] The extraction of seasonal components involves calculating seasonal indices at each time point. These indices are obtained by decomposing the time series into a trend and a residual part (i.e., the time series minus the trend) and then averaging the residual part within each seasonal period, either directly for additive models or by calculating the geometric mean for multiplicative models.

[0216] 4. Residual calculation:

[0217] Residual is a time subsequence Subtract trend time subseries and seasonal time subseries (or their logarithmic forms in the multiplicative model), which represents random fluctuations in the time series and other components that the model fails to capture.

[0218] 5. Output results:

[0219] The final output trend time subseries , seasonal time subseries and random noise .

[0220] Step S3053: extracting trend features that affect the water level from the trend time subsequence, and extracting seasonal features that affect the water level from the season time subsequence.

[0221] For ease of understanding, the following is an explanation, but it does not limit the present application. As an example, when automatically extracting the window features that affect the water level, the time window size is determined, the time series data of the 2-time window is decomposed into a trend time subsequence and a seasonal time subsequence, and the global window features of the trend time subsequence and the seasonal time subsequence are extracted. The specific formula is as follows:

[0222]

[0223]

[0224]

[0225]

[0226] in, Indicates that the time series data is intercepted according to the 2-fold time window to obtain the time subsequence , is the decomposition function of trend pattern and seasonal pattern, T and S are trend time subseries and seasonal time subseries respectively.

[0227] Specifically, in order to further study the relationship between the various sub-periods that affect the water level change, the formula Obtain the time series data of 2 times the time window; then according to the components of the time series data: trend data, seasonal data, the present invention uses Decompose the time series data; related methods automatically decompose the entire time series data, and use statistical methods or deep learning models to automatically learn trends and seasonal change patterns. However, machine learning models cannot automatically learn such patterns, and seasonal and trend pattern features need to be manually extracted, which is not only time-consuming and labor-intensive but also extremely dependent on expert experience. The present invention focuses on a sub-time series data with stronger periodicity, and finally uses the formula , Automatically extracting seasonal and trend pattern features and providing them to machine learning models can not only improve the machine learning model's learning of trends and seasonal changes, but also improve the effectiveness of the machine learning model in time series forecasting scenarios.

[0228] This embodiment intercepts the time series data by setting a time series data interception window to obtain time series data with stronger periodicity, thereby improving the effect of the machine learning model in learning trend laws and seasonal laws, and further improving the effect of the machine learning model in the time series prediction scenario.

[0229] Reference Figure 6 , Figure 6 This is a flow chart of the fourth embodiment of the water level prediction method of the present application. Based on the above embodiments, the fourth embodiment of the water level prediction method of the present application is proposed.

[0230] In the fourth embodiment, the step S60 includes:

[0231] Step S601: determining a water level prediction time according to the water level prediction request, and judging whether the water level prediction time is less than a preset short-term prediction threshold.

[0232] It should be understood that, considering that the machine learning model is accurate and stable for short-term predictions (such as water level predictions at 1-12 moments in the future), and the deep learning model is highly accurate for long-term predictions (such as water level predictions at 12-24 moments in the future), in order to integrate the advantages of the machine learning model and the deep learning model, in this embodiment, weight values ​​are set for the machine learning model and the deep learning model respectively according to whether the water level prediction moment is less than the preset short-term prediction threshold, and the water level prediction results output by the machine learning model and the water level prediction results output by the deep learning model are weightedly fused according to the weight value of the machine learning model and the weight value of the deep learning model to obtain the predicted water level of the basin to be predicted.

[0233] Step S602: setting weight values ​​for the machine learning model and the deep learning model respectively according to the judgment result, wherein when the water level prediction moment is less than a preset short-term prediction threshold, the weight value of the machine learning model is set to be greater than the weight value of the deep learning model; and when the water level prediction moment is not less than the preset short-term prediction threshold, the weight value of the machine learning model is set to be less than the weight value of the deep learning model.

[0234] For ease of understanding, the following examples are provided, but are not intended to limit the present application. As an example, assuming that the water level prediction moment is 6 moments (i.e., predicting the water level 6 moments in the future), and the preset short-term prediction threshold is 12 moments, since the water level prediction moment is less than the preset short-term prediction threshold, considering that the machine learning model is accurate and highly stable in short-term prediction (such as water level prediction 1-12 moments in the future), the weight value of the machine learning model can be set to be greater than the weight value of the deep learning model (such as setting the weight value of the machine learning model to 0.75 and the weight value of the deep learning model to 0.25);

[0235] As another example, assume that the water level prediction moment is 15 moments (that is, predicting the water level 18 moments in the future), and the preset short-term prediction threshold is 12 moments. Since the water level prediction moment is greater than the preset short-term prediction threshold, considering that the deep learning model has high accuracy for long-term prediction (such as water level prediction in the next 12-24 moments), the weight value of the machine learning model can be set smaller than the weight value of the deep learning model (such as setting the weight value of the machine learning model to 0.4 and the weight value of the deep learning model to 0.6).

[0236] It should be understood that in this embodiment, the water level prediction time can be multiple. For example, when the water level prediction task is to predict the water level of the river basin in the next 24 moments, the water level prediction time can be 1, 2, 3..., 22, 23, 24. This embodiment does not limit this.

[0237] Step S603: Perform weighted fusion on the water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model according to the weight value of the machine learning model and the weight value of the deep learning model to obtain the predicted water level of the basin to be predicted.

[0238] For ease of understanding, the following examples are given, but not limited to this application. As an example, assuming that the weight value of the machine learning model is 0.75, the weight value of the deep learning model is 0.25, the water level prediction result output by the machine learning model is 24m, and the water level prediction result output by the deep learning model is 26m, then the predicted water level of the basin to be predicted = 24*0.75+26*0.25=24.5m.

[0239] This embodiment sets weight values ​​for the machine learning model and the deep learning model respectively according to whether the water level prediction moment is less than a preset short-term prediction threshold, and performs weighted fusion on the water level prediction results output by the machine learning model and the water level prediction results output by the deep learning model according to the weight value of the machine learning model and the weight value of the deep learning model to obtain the predicted water level of the basin to be predicted, thereby integrating the advantages of the machine learning model and the deep learning model and improving the accuracy of water level prediction.

[0240] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the water level prediction method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0241] This application also provides a water level prediction device, please refer to Figure 7 , the water level prediction device comprises:

[0242] The hydrological data acquisition module 10 is used to obtain the original hydrological data of the basin to be predicted in response to the water level prediction request;

[0243] A runoff generation and confluence data generation module 20 is used to calculate the water volume change of the watershed to be predicted by a hydrological model according to the original hydrological data, and generate the runoff generation and confluence data of the watershed to be predicted according to the water volume change of the watershed, wherein the hydrological model is used to calculate the water volume change of the watershed to be predicted by simulating the water cycle process of the watershed to be predicted, and the data granularity of the runoff generation and confluence data is smaller than the data granularity of the original hydrological data;

[0244] A time series feature extraction module 30, for respectively intercepting time series data from the original hydrological data and the runoff data, and extracting time series features affecting the predicted water level of the basin to be predicted from the time series data;

[0245] A spatial feature extraction module 40 is used to extract spatial features that affect the predicted water level of the to-be-predicted watershed from watershed information of a target watershed, wherein the target watershed is a watershed that has a water level correlation with the to-be-predicted watershed;

[0246] A watershed water level prediction module 50 is used to input the time series characteristics and the spatial characteristics into a machine learning model to obtain a water level prediction result output by the machine learning model, and to input the original hydrological data and the runoff data into a deep learning model to obtain a water level prediction result output by the deep learning model;

[0247] The prediction result fusion module 60 is used to fuse the water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model to obtain the predicted water level of the basin to be predicted.

[0248] The water level prediction device provided by the present application adopts the water level prediction method in the above embodiment, which can solve the technical problems of poor prediction effect and low prediction efficiency of the related water level prediction methods. Compared with the related art, the beneficial effects of the water level prediction device provided by the present application are the same as the beneficial effects of the water level prediction method provided by the above embodiment, and the other technical features in the water level prediction device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0249] The present application provides a water level prediction device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the water level prediction method in the above-mentioned embodiment one.

[0250] Reference below Figure 8 , which shows a schematic diagram of the structure of a water level prediction device suitable for implementing the embodiment of the present application. The water level prediction device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The water level prediction device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0251] like Figure 8 As shown, the water level prediction device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to the program stored in the ROM (Read Only Memory) 1002 or the program loaded from the storage device 1003 to the RAM (Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the water level prediction device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, an LCD (Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the water level prediction device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a water level prediction device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0252] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0253] The water level prediction device provided by the present application adopts the water level prediction method in the above embodiment, which can solve the technical problems of poor prediction effect and low prediction efficiency of the related water level prediction methods. Compared with the related technology, the beneficial effects of the water level prediction device provided by the present application are the same as the beneficial effects of the water level prediction method provided by the above embodiment, and the other technical features in the water level prediction device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0254] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0255] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0256] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the water level prediction method in the above-mentioned embodiment.

[0257] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory), optical fiber, CD-ROM (CD-Read Only Memory, portable compact disk read-only memory), optical storage device, magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0258] The computer-readable storage medium may be included in the water level prediction device; or may exist independently without being assembled into the water level prediction device.

[0259] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the water level prediction device, the water level prediction device: responds to a water level prediction request, obtains the original hydrological data of the basin to be predicted, calculates the water volume change of the basin to be predicted through the hydrological model based on the original hydrological data, and generates the runoff data of the basin to be predicted based on the water volume change, intercepts time series data from the original hydrological data and the runoff data, and extracts the time series characteristics that affect the predicted water level of the basin to be predicted from the time series data, extracts the spatial characteristics that affect the predicted water level of the basin to be predicted from the basin information of the target basin, inputs the time series characteristics and the spatial characteristics into the machine learning model to obtain the water level prediction result output by the machine learning model, and inputs the original hydrological data and the runoff data into the deep learning model to obtain the water level prediction result output by the deep learning model, and fuses the water level prediction result output by the machine learning model with the water level prediction result output by the deep learning model to obtain the predicted water level of the basin to be predicted.

[0260] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a LAN (Local Area Network) or a WAN (Wide Area Network), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0261] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0262] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0263] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned water level prediction method, and can solve the technical problems of poor prediction effect and low prediction efficiency of the related water level prediction method. Compared with the related art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the water level prediction method provided in the above-mentioned embodiment, and will not be repeated here.

[0264] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A water level prediction method, It is characterized in that The water level prediction method comprises: In response to a water level prediction request, obtaining original hydrological data of a watershed to be predicted; Calculating the change in water volume of the watershed to be predicted through a hydrological model according to the original hydrological data, and generating runoff data of the watershed to be predicted according to the change in water volume, wherein the hydrological model is used to calculate the change in water volume of the watershed to be predicted by simulating the water cycle process of the watershed to be predicted, and the data granularity of the runoff data is smaller than the data granularity of the original hydrological data; respectively intercepting time series data from the original hydrological data and the runoff data, and extracting time series features affecting the predicted water level of the basin to be predicted from the time series data; Extracting spatial features that affect the predicted water level of the to-be-predicted watershed from watershed information of a target watershed, wherein the target watershed is a watershed associated with the to-be-predicted watershed; Inputting the time series features and the spatial features into a machine learning model to obtain a water level prediction result output by the machine learning model, and inputting the original hydrological data and the runoff data into a deep learning model to obtain a water level prediction result output by the deep learning model; The water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model are integrated to obtain the predicted water level of the basin to be predicted; The time series features include hysteresis features, window features, timestamp-derived features, seasonal features, and trend features. The time series features that affect the predicted water level of the basin to be predicted are extracted from the time series data, including: Acquire multiple sub-periods of the time series data, and extract hysteresis features within the sub-periods, wherein the hysteresis features are used to represent the relationship between the water level at a certain moment and the water level at a certain moment in the past; Calculating a time window according to the sub-period, and performing aggregation calculation on the time series data within the time window to obtain window features within the time window; Extracting a timestamp-derived feature that affects the water level from the time series data, wherein the timestamp-derived feature is additional information extracted from a timestamp field of the time series data; The seasonal characteristics and trend characteristics that affect the water level are extracted from the time series data, wherein the seasonal characteristics are used to represent the seasonal periodic variation law of the time series data, and the trend characteristics are used to represent the trend variation law of the time series data.

2. The water level prediction method according to claim 1, It is characterized in that The step of extracting seasonal characteristics and trend characteristics affecting the water level from the time series data according to the time window includes: A time series data interception window is set according to the time window, and the time series data is intercepted according to the time series data interception window to obtain a time subsequence, wherein the time series data interception window is larger than the time window; Decomposing the time subseries to obtain trend time subseries and seasonal time subseries; The trend characteristics affecting the water level are extracted from the trend time subseries, and the seasonal characteristics affecting the water level are extracted from the season time subseries.

3. The water level prediction method according to claim 2, It is characterized in that Decomposing the time subsequence to obtain a trend time subsequence and a season time subsequence includes: Analyze the interaction type between trend and seasonality in the time subseries, the interaction type includes additive type and multiplicative type, when the interaction type is additive type, the time subseries is the sum of trend time subseries, seasonal time subseries and random noise; when the interaction type is multiplicative type, the time subseries is the product of trend time subseries, seasonal time subseries and random noise; Decomposing the time subsequence based on the mutual influence type to obtain an initial trend time subsequence; Performing smoothing processing on the initial trend time subsequence to obtain a trend time subsequence; Obtaining the remaining data after removing the initial trend time subsequence from the time subsequence; When the interaction type is an additive type, calculating the average value of the remaining data to obtain a seasonal time subseries; When the interaction type is a multiplicative type, the geometric mean of the remaining data is calculated to obtain a seasonal time subseries.

4. The water level prediction method according to claim 1, It is characterized in that The window features include statistical domain features and frequency domain features within the time window. The time window is calculated according to the sub-periods, and the time series data is aggregated and calculated within the time window to obtain the window features within the time window, including: Acquire at least two consecutive sub-cycles in the sub-cycle, where the at least two consecutive sub-cycles include a first consecutive sub-cycle and a second consecutive sub-cycle, and a maximum period value of the first consecutive sub-cycle is smaller than a minimum period value of the second consecutive sub-cycle; Determine whether the maximum period value of the first continuous sub-period is greater than a preset period value, wherein the preset period value is preset according to the water level prediction requirement of the basin to be predicted; When the maximum period value of the first continuous sub-period is greater than the preset period value, taking the maximum period value of the first continuous sub-period as the time window; When the maximum period value of the first continuous sub-period is not greater than the preset period value, taking the maximum period value of the second continuous sub-period as the time window; The statistical domain features of the sub-cycle in the time window are extracted by a statistical domain operator, and the frequency domain features of the sub-cycle in the time window are extracted by a frequency domain operator.

5. The water level prediction method according to claim 1, It is characterized in that The acquiring of multiple sub-periods of the time series data and extracting hysteresis features within the sub-periods includes: The time series data is offset by a preset period to obtain offset data; Calculating the time series correlation between the offset data and the time series data; When the time series correlation is greater than a preset threshold, the preset period is used as a sub-period of the time series data, and the hysteresis feature within the sub-period is extracted.

6. The water level prediction method according to any one of claims 1 to 5, It is characterized in that The step of fusing the water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model to obtain the predicted water level of the basin to be predicted includes: Determining a water level prediction time according to the water level prediction request, and judging whether the water level prediction time is less than a preset short-term prediction threshold; According to the judgment result, weight values ​​are set for the machine learning model and the deep learning model respectively, wherein when the water level prediction moment is less than a preset short-term prediction threshold, the weight value of the machine learning model is set to be greater than the weight value of the deep learning model; when the water level prediction moment is not less than the preset short-term prediction threshold, the weight value of the machine learning model is set to be less than the weight value of the deep learning model; According to the weight value of the machine learning model and the weight value of the deep learning model, the water level prediction result output by the machine learning model and the water level prediction result output by the deep learning model are weightedly fused to obtain the predicted water level of the basin to be predicted.

7. The water level prediction method according to any one of claims 1 to 5, It is characterized in that The runoff data include basin evaporation, permeable area runoff, surface runoff, subsoil flow, underground runoff and basin outlet section runoff. The water volume change of the basin to be predicted is calculated by the hydrological model based on the original hydrological data, and the runoff data of the basin to be predicted is generated according to the water volume change of the basin, including: Calculate the evaporation of the watershed to be predicted by a hydrological model according to the original hydrological data; Calculate the flow generation of the permeable area of ​​the watershed to be predicted through the hydrological model according to the original hydrological data and the evaporation of the watershed; Calculate the surface runoff, subsoil runoff and underground runoff of the basin to be predicted by the hydrological model according to the runoff generated by the permeable area; The runoff volume at the outlet section of the watershed to be predicted is calculated through the hydrological model according to the surface runoff, the subsoil runoff and the underground runoff.

8. The water level prediction method according to claim 7, It is characterized in that The calculating the evaporation of the watershed to be predicted by the hydrological model according to the original hydrological data includes: Obtaining the rainfall and water surface evaporation of the basin to be predicted from the original hydrological data; Obtaining the upper soil moisture content, the basin evapotranspiration conversion coefficient, the lower water storage capacity, the lower soil moisture content and the deep evapotranspiration coefficient of the watershed to be predicted; Calculate the upper evaporation, lower evaporation and deep evaporation of the basin to be predicted according to the rainfall, the water surface evaporation, the upper soil moisture content, the basin evaporation conversion coefficient, the lower water storage capacity, the lower soil moisture content and the deep evaporation coefficient; The evaporation of the watershed to be predicted is calculated according to the upper layer evaporation, the lower layer evaporation and the deep layer evaporation.

9. The water level prediction method according to claim 8, It is characterized in that The method of calculating the flow generation of the permeable area of ​​the to-be-predicted basin through the hydrological model according to the original hydrological data and the evaporation of the basin includes: Obtaining the initial average water storage capacity of the watershed to be predicted, the maximum water storage capacity in the watershed, the average water storage capacity of the watershed, the initial average water storage capacity of the watershed, and the power of the water storage capacity curve of the watershed to be predicted, wherein the average water storage capacity of the watershed is calculated based on the watershed area when the water storage capacity is less than or equal to the maximum water storage capacity in the watershed and the watershed area of ​​the watershed to be predicted; Calculate the runoff value of the watershed to be predicted according to the rainfall and the evaporation of the watershed; When the sum of the runoff value and the initial average water storage capacity of the basin is less than the maximum water storage capacity in the basin, the runoff of the permeable area of ​​the basin to be predicted is calculated according to the runoff value, the average water storage capacity of the basin, the initial average water storage of the basin and the power of the water storage capacity curve; When the sum of the runoff value and the initial average water storage capacity of the basin is not less than the maximum water storage capacity in the basin, the runoff of the permeable area of ​​the basin to be predicted is calculated according to the runoff value, the average water storage capacity of the basin and the initial average water storage of the basin.

10. The water level prediction method according to claim 9, It is characterized in that The method of calculating the surface runoff, subsoil runoff and underground runoff of the basin to be predicted by the hydrological model according to the runoff generated by the permeable area includes: Calculate the runoff area at the current moment according to the runoff generation of the permeable area and the runoff generation value; Calculate the average free water depth at the current moment based on the runoff area at the previous moment and the average free water depth on the runoff area; Calculate the free water storage capacity and average water storage capacity depth of the largest point on the runoff area according to the average free water capacity of the basin to be predicted and the index of the free water storage capacity curve of the basin; The surface runoff, subsoil flow and underground runoff of the watershed to be predicted are calculated according to the runoff-generating area at the current moment, the average free water depth at the current moment, the free water storage capacity and the average storage capacity depth.

11. The water level prediction method according to claim 10, It is characterized in that The step of calculating the runoff volume of the watershed outlet section of the watershed to be predicted by the hydrological model according to the surface runoff, the subsoil runoff and the underground runoff includes: Calculate the total inflow of the watershed to be predicted according to the surface runoff, the subsoil flow and the underground runoff; According to the total inflow, the river network confluence of the water body from entering the river channel to the unit outlet is simulated based on the unit line model to obtain the runoff volume of the watershed outlet section of the watershed to be predicted.

12. A water level prediction device, It is characterized in that The water level prediction device comprises: a memory, a processor, and a water level prediction program stored in the memory and executable on the processor, wherein the water level prediction program implements the water level prediction method according to any one of claims 1 to 11 when executed by the processor.

Citation Information

Patent Citations

  • Mountain torrent forecast real-time correction method based on dynamic system response curve and LSTM

    CN112950062A

  • Runoff prediction method based on space-time diagram convolutional neural network

    CN115169724A