Method for constructing hydrological data intelligent storage database management system based on digital twinborn technology
By adopting digital twin technology and distributed storage systems in the hydrological database, the pressure problem of existing technology when processing massive real-time observation data is solved, efficient and stable hydrological data storage and dynamic display are achieved, and data reliability and scalability are improved.
Patent Information
- Application Number
- CN202411919603.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
AI Technical Summary
The existing hydrological database and hydrological data storage and search systems are under great pressure when processing massive real-time observation data, and the support performance of non-structural data is insufficient, which cannot effectively meet the complex storage and display needs of hydrological data.
The construction method of the intelligent storage database management system for hydrological data based on digital twin technology is adopted, combined with the distributed storage systems of Ceph and Cassandra, to achieve efficient, stable and reliable massive data storage, and to display the relationship between hydrological data through a digital twin model, providing a visual interface for dynamic demonstration.
It realizes efficient storage and dynamic display of massive hydrological data, improves the reliability and scalability of data, and can better understand and display the relationship between hydrological data.
Smart Images

Figure CN119849151A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hydrological data management database, and in particular to a method for constructing a hydrological data intelligent storage database management system based on digital twin technology. Background Art
[0002] Hydrological data refers to the measured data of hydrology, that is, the original records of various hydrological elements collected by hydrological stations, such as precipitation, evaporation, water level, flow, sediment content and other hydrological information, meteorological data, and the maximum, minimum, average, total, process line and contour lines obtained from the original record data within a certain period of time. Hydrological data records the observation data of rivers, lakes, reservoirs and other water bodies within the basin. It includes not only text and tabular records, but also images, audio, excerpts, route analysis and other data. The data volume is huge and complex. There are 9 major river basins in my country, namely the Southeast Rivers Area, Inland Rivers Area, Songliao River Area, Haihe River Basin Area, Huaihe River Basin Area, Pearl River Basin Area, Southwest River Area, Yangtze River Basin Area and Yellow River Basin Area. There are thousands of hydrological stations (including basic stations and special stations). The regional differences and real-time nature of hydrological data are very obvious. With the advancement of computer and storage technology, it is now basically possible to collect and store data through digital means, establish a hydrological data acquisition library, and realize a hydrological data storage and retrieval system based on electronic computers, providing hydrological information retrieval, information exchange, hydrological intelligence, etc., and explore hydrological laws through statistical analysis to provide data support for water resources evaluation, hydrological calculation, forecasting and scientific research.
[0003] The hydrological database and hydrological data storage and retrieval system currently established are basically based on data storage and retrieval functions. The nine major river basins are divided into several small river basins according to the water system level. For example, the Songliaohe River Basin includes the Songhua River Basin, the Liaohe River Basin, and international rivers such as the Heilongjiang River, the Wusuri River, the Suifen River, the Tumen River, and the Yalu River. The Yangtze River Basin includes the Yangtze River mainstream, the Minjiang River, the Tuojiang River, the Jialing River, the Wujiang River, the Hanjiang River and other tributaries. The total basin area is more than 1.8 million square kilometers. The basin is complex and the amount of hydrological monitoring data is huge. According to the traditional index and retrieval system designed and established based on the Oracle database system, the processing and storage of massive real-time observation data access show great pressure. Although it has good support and scalability for structural data describing relationships in hydrological data (such as precipitation, evaporation, water level, flow, sediment content and other basic information and meteorological data, etc.), it has poor scalability for a large amount of non-structured data in non-hydrological data, such as audio and video, and insufficient support for large files.
[0004] The hydrological database and hydrological data storage and retrieval system currently established mainly provide basic data storage and retrieval functions, and support data call, retrieval and intelligence functions in subsequent analysis and applications. They do not have the current popular science education function for the public, colleges and students. Summary of the invention
[0005] In view of the defects and shortcomings of the prior art, based on the huge, complex and growing characteristics of hydrological data and the needs of data reliability and scalability, the purpose of the present invention is to provide a method for constructing a hydrological data intelligent storage database management system based on digital twin technology. On the one hand, a distributed storage system based on Ceph and Cassandra is established to achieve efficient, stable and reliable storage of massive data, and storage optimization is performed for different data types such as geographic information data, hydrological process data, and physical entity model data. On the other hand, digital twin technology is used to create a virtual model for the hydrological system, and the digital twin model is used to better understand, explain and display the relationship between hydrological data. A visual interface can be provided to realize dynamic demonstration driven by historical hydrological data in the virtual watershed model, interact with the digital twin model, dynamically demonstrate the relationship between runoff and watershed characteristics, rainfall, and the movement of water in the water body, and simulate the dynamic changes of water level and flow.
[0006] According to the first aspect of the present invention, a method for constructing a hydrological data intelligent storage database management system based on digital twin technology comprises the following steps:
[0007] Step 1: Collect basin topographic data, water system distribution data and land use data;
[0008] Step 2: Obtain water conservancy project facility data, hydrological station data and hydrological observation data;
[0009] Step 3: Describe the relationship between the hydrological station entity and the hydrological observation data based on the entity-relationship model, and design a database table to store the hydrological observation data;
[0010] Step 4: construct a geographic information model based on the basin's terrain data, water system distribution data, and land use data to describe the distribution of water body models in different basins on the terrain model;
[0011] Step 5: construct a physical entity model based on the hydrological station data and water conservancy project facility data;
[0012] Step 6: Model the hydrological process based on the geographic information model, the physical entity model and the historical hydrological observation data, construct a rainfall-runoff model to dynamically describe the relationship between runoff and basin characteristics and rainfall, and construct a hydrodynamic model to dynamically describe the movement of water in the water body and simulate the dynamic changes of water level and flow;
[0013] Step 7: Based on historical hydrological observation data, the dynamic calculation of the rainfall-runoff model and the hydrodynamic model is realized by using a time-driven and event-driven approach, and the visual representation of the water body model on the terrain model is dynamically updated according to the calculation results;
[0014] Step 8: Configure a hybrid distributed storage strategy for data, including: using the HDFS system to store terrain data, water system distribution data, and land use data; using the Ceph system to store physical entity models and hydrological process data;
[0015] Step 9: Partitioning and storing different types of data, including: partitioning and storing terrain data, water system distribution data and land use data according to the watershed range; partitioning and storing physical model data according to hydrological stations and water conservancy project facilities; partitioning and storing hydrological process data according to time and space dimensions;
[0016] Step 10: Use a distributed database to establish a distributed metadata management system for storing descriptive information about the data.
[0017] In a further embodiment, in step 4, constructing a geographic information model based on the terrain data, water system distribution data, and land use data of the watershed includes:
[0018] Step 4.1, import the collected digital elevation model data into the geographic information system software, use the terrain analysis tool of the software to process the digital elevation model data, perform depression filling operation to remove local depressions in the terrain data, and ensure the accuracy of the water flow direction; then, generate a three-dimensional terrain surface model based on the processed digital elevation model data, connect discrete elevation points to form triangular patches based on the triangulation algorithm, construct a continuous terrain surface, and obtain a terrain model;
[0019] Step 4.2: Import the water system distribution vector data into the geographic information system software, and draw the water system network model on the terrain model according to the attribute information of the three types of water bodies, namely rivers, lakes and reservoirs in the data;
[0020] Step 4.3: Based on the land use data, overlay it with the terrain model and water network model to assign corresponding attribute values to areas of different land use types.
[0021] In a further embodiment, in step 5, based on the parameter information of the hydrological station monitoring equipment and the design drawings and structural parameter information of the water conservancy project facilities, a solid modeling method is adopted to set corresponding structural and material properties for different structures to distinguish them.
[0022] In a further embodiment, in step 6, the process of constructing a rainfall-runoff model includes:
[0023] Step 61a, determining a rainfall-runoff model according to watershed characteristics;
[0024] Step 61b, obtaining historical rainfall data from hydrological observation data of each hydrological station in the basin, and forming a data sequence according to a preset time resolution;
[0025] Step 61c, obtaining evaporation data of the basin, wherein the time scale of the evaporation data matches the time resolution of the rainfall data;
[0026] Step 61d, determining the watershed characteristic data according to the watershed topographic data and land use data;
[0027] Step 61e, initializing the rainfall-runoff model;
[0028] Step 61f, using an optimization algorithm to iterate and calibrate the model parameters of the rainfall-runoff model to obtain an optimal model parameter combination that meets the convergence standard;
[0029] Step 61g: Apply the calibrated optimal model parameter combination to an independent validation data set to calculate the model's runoff prediction results, and perform validation evaluation with the runoff observation data in the validation data set to evaluate the model performance.
[0030] In a further embodiment, in step 6, the process of constructing the hydrodynamic model includes:
[0031] Step 62a, establishing Saint-Venant equations for describing water flow motion; the Saint-Venant equations include a water flow motion continuity equation and a momentum equation;
[0032] Step 62b, discretizing the Saint-Venant equations for numerical solution;
[0033] Step 62c: Based on the channel parameters, channel roughness parameters, hydrological boundary condition parameters and initial conditions in the watershed, the discretized Saint-Venant equations are solved to obtain the water level and flow of the channel, thereby simulating the water flow movement.
[0034] In a further embodiment, in step 9, it further includes indexing different types of data, wherein:
[0035] For geographic information data, a spatial index based on R-tree index is established;
[0036] For physical entity data, create an index based on the equipment number and facility name attributes;
[0037] For hydrological process data, a time-space index combination based on B-tree index is established to realize fast query of time dimension index, and the spatial index is combined to efficiently retrieve hydrological data in a specific time and area.
[0038] In a further embodiment, in step 10, a distributed metadata management system is established using an Apache Cassandra distributed database, including:
[0039] In the Apache Cassandra distributed database, a corresponding metadata table is created according to the metadata information of the design record, for storing description information about geographic information data, physical entity data and hydrological process data; the metadata table includes a geographic information metadata table, a physical entity metadata table and a hydrological process metadata table;
[0040] Through the data acquisition interface between the Apache Cassandra distributed database and the HDFS system, the system interacts with the HDFS system to obtain relevant information about terrain data, water system distribution data, and land use data in the database and converts them into metadata;
[0041] Through the data acquisition interface of the Apache Cassandra distributed database and the Ceph system, it interacts with the HDFS system to obtain information related to the physical entity model and hydrological process data in the database and converts it into metadata;
[0042] The collected metadata is distributed and stored on multiple nodes.
[0043] In a further embodiment, in step 10, a metadata query service based on a RESTful architecture is created, different query endpoints are provided, and corresponding query operations can be performed in the Cassandra metadata database according to the incoming query parameters, and metadata records that meet the conditions are returned, including data storage location and data source information.
[0044] In a further embodiment, in step 10, the metadata information of the design record includes:
[0045] For geographic information data, metadata includes data block number, data type, data storage location, data update time, data resolution, and geographic scope;
[0046] For physical entity data, metadata includes device number, device name, device type, device parameters, region, and data update time;
[0047] For hydrological process data, metadata includes data identification, time range, spatial area, data source, and data storage location.
[0048] In a further embodiment, the use of metadata information to locate, retrieve and verify data includes:
[0049] When the model needs to obtain data in a certain area, it first queries the metadata to obtain the data storage location, and then reads the data from the HDFS system or Ceph system based on the data storage location to improve data access efficiency.
[0050] It should be understood that all combinations of the aforementioned concepts and the additional concepts described in more detail below can be considered as part of the inventive subject matter of the present disclosure as long as such concepts are not mutually inconsistent. In addition, all combinations of the claimed subject matter are considered as part of the inventive subject matter of the present disclosure.
[0051] The foregoing and other aspects, embodiments and features of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of the exemplary embodiments, will be apparent from the following description or learned from the practice of the specific embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings are not intended to be drawn to scale. In the accompanying drawings, each identical or nearly identical component shown in each figure may be represented by the same reference numeral. For clarity, not every component is labeled in each figure. Embodiments of various aspects of the present invention will now be described by way of example and with reference to the accompanying drawings.
[0053] Figure 1 It is a flow chart of a method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to an embodiment of the present invention.
[0054] Figure 2 It is a schematic diagram of the process of constructing a geographic information model according to an embodiment of the present invention.
[0055] Figure 3 4 is a schematic diagram of a process of constructing a rainfall-runoff model according to an embodiment of the present invention.
[0056] Figure 4 Schematic diagram of the process of constructing a hydrodynamic model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to better understand the technical content of the present invention, specific embodiments are described below in conjunction with the accompanying drawings.
[0058] Various aspects of the present invention are described in this disclosure with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the present disclosure are not necessarily intended to include all aspects of the present invention. It should be understood that the various concepts and embodiments introduced above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed by the present invention are not limited to any implementation. In addition, some aspects disclosed by the present invention can be used alone or in any appropriate combination with other aspects disclosed by the present invention.
[0059] Combined with Figure 1 As shown, a method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to an embodiment of the present invention includes the following steps:
[0060] Step 1: Collect basin topographic data, water system distribution data and land use data;
[0061] Step 2: Obtain water conservancy project facility data, hydrological station data and hydrological observation data;
[0062] Step 3: Describe the relationship between the hydrological station entity and the hydrological observation data based on the entity-relationship model, and design a database table to store the hydrological observation data: design a structured database table to record the relationship between the hydrological station entity and the observation data; design an unstructured database table to store hydrological images, hydrological videos and hydrological audio data; design a semi-structured database table to store measured results excerpt data, precipitation statistics and alignment relationship curve data;
[0063] Step 4: construct a geographic information model based on the basin's terrain data, water system distribution data, and land use data to describe the distribution of water body models in different basins on the terrain model;
[0064] Step 5: construct a physical entity model based on the hydrological station data and water conservancy project facility data;
[0065] Step 6: Model the hydrological process based on the geographic information model, the physical entity model and the historical hydrological observation data, construct a rainfall-runoff model to dynamically describe the relationship between runoff and basin characteristics and rainfall, and construct a hydrodynamic model to dynamically describe the movement of water in the water body and simulate the dynamic changes of water level and flow;
[0066] Step 7: Based on historical hydrological observation data, the dynamic calculation of the rainfall-runoff model and the hydrodynamic model is realized by using a time-driven and event-driven approach, and the visual representation of the water body model on the terrain model is dynamically updated according to the calculation results;
[0067] Step 8: Configure a hybrid distributed storage strategy for data, including: using the HDFS system to store terrain data, water system distribution data, and land use data; using the Ceph system to store physical entity models and hydrological process data;
[0068] Step 9: Partitioning and storing different types of data, including: partitioning and storing terrain data, water system distribution data and land use data according to the watershed range; partitioning and storing physical model data according to hydrological stations and water conservancy project facilities; partitioning and storing hydrological process data according to time and space dimensions;
[0069] Step 10: Use a distributed database to establish a distributed metadata management system for storing descriptive information about the data.
[0070] Below we further elaborate and illustrate the above construction process in conjunction with the accompanying drawings.
[0071] {Construction of digital twin model of hydrological data}
[0072] In an embodiment of the present invention, the terrain data of the watershed is digital elevation model data, and its format is raster data; the water system distribution data includes the location, shape and boundary information of water bodies such as rivers, lakes and reservoirs, and its format is vector data; the land use data includes land use type data within the watershed, and its format is vector data.
[0073] In step 1, high-precision terrain data of the basin can be obtained from the geographic information department, such as digital elevation model (DEM) data, which is in raster data format (such as GeoTIFF format). Collect water system distribution data, including the location, shape and boundary information of water bodies such as rivers, lakes and reservoirs, and store them in vector data (such as Shapefile format). Obtain land use type data in the basin to determine the distribution of vegetation cover, urban areas, farmland, etc. in different regions, and store them in raster or vector format.
[0074] For hydrological station data, detailed parameter information of each device can be collected, such as the model of the rain gauge, measurement range (e.g. 0-500 mm), accuracy (e.g. ±0.2 mm), manufacturer, etc., and organized into an equipment list table. For water conservancy facilities, such as dams and sluices, their design drawings, structural parameters (e.g. dam height, dam length, gate hole size, etc.), construction years, etc. are collected and converted into digital format through CAD software or scanned drawings.
[0075] As an optional embodiment, in step 2, the hydrological observation data include observed water level, flow, sediment, water temperature, water quality, groundwater, precipitation data collected by the hydrological station, as well as daily data, hourly data, extreme value data obtained based on the original basic hydrological data, and also include hydrological images, hydrological videos, hydrological audio data, measured results excerpt data, precipitation statistics and route relationship curve data.
[0076] As an optional embodiment, the hydrological observation data also includes meteorological data collected and recorded by hydrological stations.
[0077] As an optional embodiment, in combination with the attached Figure 2 As shown, in step 4, a geographic information model is constructed based on the terrain data, water system distribution data, and land use data of the basin, including:
[0078] Step 4.1, import the collected digital elevation model data into geographic information system software, such as ArcGIS, and use the terrain analysis tool of the software to process the digital elevation model data, perform a depression-filling operation to remove local depressions in the terrain data, and ensure the accuracy of the water flow direction; then, generate a three-dimensional terrain surface model based on the processed digital elevation model data, connect discrete elevation points to form triangular patches based on the Delaunay triangulation algorithm, construct a continuous terrain surface, and obtain a terrain model;
[0079] Step 4.2, import the water system distribution vector data into ArcGIS geographic information system software, and draw the water system network model on the terrain model according to the attribute information of three types of water bodies: rivers, lakes and reservoirs in the data;
[0080] Step 4.3: Based on the land use data, the terrain model and the water network model are overlaid and analyzed to assign corresponding attribute values to different land use types. For example, a higher roughness coefficient is set for vegetation-covered areas to reflect the resistance to water flow, and a lower infiltration rate is set for urban areas.
[0081] As an optional embodiment, in step 5, based on the parameter information of the hydrological station monitoring equipment and the design drawings and structural parameter information of the water conservancy project facilities, a solid modeling method is adopted to set corresponding structural and material properties for different structures to distinguish them.
[0082] As an optional embodiment, as the key to establishing the digital twin model, the construction of the rainfall-runoff model and the hydrodynamic model is implemented in step 6.
[0083] like Figure 3 In the illustrated embodiment, the process of constructing a rainfall-runoff model includes:
[0084] Step 61a, determining a rainfall-runoff model according to watershed characteristics;
[0085] Step 61b, obtaining historical rainfall data from hydrological observation data of each hydrological station in the basin, and forming a data sequence according to a preset time resolution;
[0086] Step 61c, obtaining evaporation data of the basin, wherein the time scale of the evaporation data matches the time resolution of the rainfall data;
[0087] Step 61d, determining the watershed characteristic data according to the watershed topographic data and land use data;
[0088] Step 61e, initializing the rainfall-runoff model;
[0089] Step 61f, using an optimization algorithm to iterate and calibrate the model parameters of the rainfall-runoff model to obtain an optimal model parameter combination that meets the convergence standard;
[0090] Step 61g: Apply the calibrated optimal model parameter combination to an independent validation data set to calculate the model's runoff prediction results, and perform validation evaluation with the runoff observation data in the validation data set to evaluate the model performance.
[0091] In the embodiment of the present invention, a suitable rainfall-runoff model may be selected according to the characteristics of the watershed and the data conditions, such as the typical Xin'anjiang model and the SCS model.
[0092] In this embodiment, based on the principle of full storage and runoff generation, the Xin'an River model is used as an example for explanation. The watershed is divided into multiple units, and multiple hydrological processes such as rainfall, evaporation, soil water storage, and runoff are considered. When the rainfall deducts losses (including interception, filling, infiltration, etc.), if the remaining water makes the soil moisture content reach the field water holding capacity, runoff begins to be generated, and the runoff generation is related to the rainfall and the previous soil moisture content.
[0093] Taking the Xin'anjiang model as an example, the evapotranspiration calculation of the three-layer evapotranspiration model first determines the water storage capacity parameters of the upper, lower and deep layers, which are obtained by analyzing the historical hydrological data of the basin. For example, using many years of rainfall, evaporation and runoff observation data, an optimization algorithm (such as a genetic algorithm) is used to adjust the parameter values so that the error between the runoff results calculated by the model and the actual observed values is minimized, and the optimal parameter values are obtained.
[0094] The following model is defined to calculate evapotranspiration:
[0095]
[0096] Where E p is the potential evapotranspiration, W u1 is the moisture content of the upper soil layer;
[0097] Calculate the upper layer E separately m1 , Lower E m2 and deep evapotranspiration E m3 , and then calculate the total evapotranspiration E: E = E m1 +E m2 +E m3 .
[0098] Next, the runoff volume is calculated based on the model's runoff generation mechanism (such as full flow generation).
[0099] In the full-storage runoff mode, when the sum of the rainfall P and the previous soil moisture content W0 exceeds the basin water storage capacity W m When the runoff R=P-(W m -W0).
[0100] The above models and algorithm processes are encapsulated into independent modules and stored and called in the digital twin system.
[0101] In an embodiment of the present invention, parameter determination and calibration in the model may be optimized using a genetic algorithm.
[0102] First, the parameters in the Xin'anjiang model were preliminarily estimated based on the basin characteristics and empirical values. For example, the soil water storage capacity parameter is roughly determined according to the soil type and land use type. For soils with high clay content, the water storage capacity is relatively large; for forested areas, the infiltration capacity is strong, and the relevant parameters are adjusted accordingly;
[0103] Then, the genetic algorithm optimization algorithm is used for parameter calibration, and the model parameters are encoded into chromosomes, each chromosome represents a set of parameter combinations. The fitness function is constructed based on the error (such as root mean square error RMSE) between the runoff results calculated by the model and the actual observed runoff data. The smaller the error, the higher the fitness.
[0104] As an example the calibration process is as follows:
[0105] (1) First, generate the initial population, that is, randomly generate a certain number (e.g., 100 groups) of parameter combinations as the first generation of chromosomes;
[0106] (2) For each set of parameters, data on rainfall, evaporation, and watershed characteristics are input into the Xinanjiang model to calculate the runoff process;
[0107] (3) Calculate the fitness value of each chromosome based on the error between the calculated runoff and the actual observed runoff;
[0108] (4) Generate the next generation of chromosome population through selection (selecting chromosomes with high fitness), crossover (exchanging some genes of chromosomes) and mutation (randomly changing some genes of chromosomes);
[0109] (5) Repeat the above calculation, evaluation and genetic operation process for multiple generations (such as 100-500 generations) until the fitness of the population reaches the convergence standard (such as the fitness change for several consecutive generations is less than the set threshold), at which time the optimal parameter combination is obtained.
[0110] It should be understood that each set of parameters mentioned above is obtained by collecting historical rainfall data from each rain gauge station in the basin, including information such as rainfall time and rainfall amount, and ensuring that the time resolution of the data meets the model requirements, such as hours, days, etc. For example, for a small or medium-sized basin, if there are 10 rain gauges, hourly rainfall data for the past 10 years are collected, and after sorting and screening, data points with obvious errors or missing are removed. The evaporation data of the basin can be obtained through evaporator observation data or estimated based on meteorological data. The time scale of evaporation data matches that of rainfall data. For example, daily evaporation data can be used for daily rainfall-runoff model calculations.
[0111] The aforementioned watershed characteristic data include characteristic parameters such as watershed area, terrain slope, soil type, and land use type, which can be obtained through geographic information data analysis. For example, the terrain slope is calculated using the digital elevation model (DEM) of the watershed, and the land use types (such as forests, farmland, cities, etc.) in different areas are determined through land use maps. Different land use types correspond to different infiltration and evaporation characteristics.
[0112] As an optional embodiment, Figure 4 As shown in Figure 2, the process of building a hydrodynamic model includes:
[0113] Step 62a, establishing Saint-Venant equations for describing water flow motion; the Saint-Venant equations include the water flow motion continuity equation and momentum equation;
[0114] Step 62b, discretizing the Saint-Venant equations for numerical solution;
[0115] Step 62c: Based on the channel parameters, channel roughness parameters, hydrological boundary condition parameters and initial conditions in the watershed, the discretized Saint-Venant equations are solved to obtain the water level and flow of the channel, thereby simulating the water flow movement.
[0116] In the embodiment of the present invention, the Saint-Venant equations are taken as an example to describe the flow of water.
[0117] The continuity equation for water flow is expressed as follows:
[0118]
[0119] In the formula, Q is the flow rate, A is the cross-sectional area of the water flow, x is the distance, t is the time, and q is the lateral inflow;
[0120] The momentum equation for water flow is expressed as follows:
[0121]
[0122] Where h is the water level, g is the acceleration due to gravity, and K is the flow modulus.
[0123] The Saint-Venant equations are discretized for numerical solution.
[0124] In the embodiment of the present invention, the finite difference method is used to discretize space and time.
[0125] For example, the continuous equation is discretized in space using the central difference scheme:
[0126]
[0127] In the formula, i represents the calculation unit number, Δx is the calculation unit length, and n represents the time step number. is the cross-sectional area of the water flow of the ith unit at the nth time step, q i is the lateral inflow of the ith unit.
[0128] For the momentum equation, the convection term The upwind discretization method is used to ensure the stability of numerical calculation. The other items are discretized by central difference or appropriate difference format to obtain the discretized algebraic equation system.
[0129] In this embodiment, the longitudinal and cross-sectional shapes of the river channel are determined by using the high-precision digital elevation model (DEM) data of the watershed, thereby calculating parameters such as the cross-sectional area and flow modulus. In this embodiment, DEM data with a resolution of 10 meters is used to balance the accuracy of the description of the river channel topography and the amount of data processing.
[0130] The river roughness data is used to characterize the resistance of the river to the water flow. The river roughness data is determined by field measurement, empirical formula or according to the characteristics of the river (such as riverbed material, vegetation coverage, etc.). For example, for a smooth concrete riverbed, the roughness coefficient is small, with a value of 0.01-0.02; for a natural river with weeds and stones, the roughness coefficient is large, with a value of 0.03-0.1. Collect the roughness data of different river sections and organize them into a format corresponding to the model calculation unit.
[0131] Determine the hydrological boundary conditions of the model, including the flow process or water level process in the upstream, and the water level process or flow process in the downstream, by obtaining observation data from the upstream and downstream hydrological stations, and collecting historical observation data as the boundary condition input of the model. For example, for a flood simulation, it is necessary to obtain the flow process line of the upstream flood (such as peak flow, flow fluctuation duration, etc.) and the water level-flow relationship curve of the downstream river channel to accurately simulate the movement and propagation of water in the river channel.
[0132] Initial condition data include initial water level and flow distribution, which can be determined based on hydrological observation data or steady-state water flow calculation results. For example, before the start of flood simulation, the initial state is set according to the daily water level and flow observation values of the river, or the initial water level and flow field are obtained by solving the steady-state Saint-Venant equations, so that the model starts calculation from a reasonable initial state.
[0133] Furthermore, the discretized algebraic equations can be solved by an explicit numerical solution algorithm. The present invention uses an explicit forward difference time marching algorithm for digital solution.
[0134] The water level at the initial time (n=0) and flow Under the condition of , the water level and flow value of the next time step (n = 1) are calculated in sequence according to the discretized equations:
[0135]
[0136] Then calculate the flow rate according to the momentum equation
[0137] The calculation is continued in this way until the end of the simulation time is reached.
[0138] In an optional embodiment, the water level, flow rate, cross-sectional area and other data of each calculation unit can be stored in an array or matrix. Then determine the functional modules such as equation discretization, boundary conditions and initial conditions, and numerical solution algorithms. For example, in Python, use the NumPy library to create arrays to store data, write functions to implement discretization calculations in finite difference format, implement time advancement and space iteration calculation processes through loop structures, build the calculation core module of the hydrodynamic model, and interact with other modules in the digital twin system to simulate water flow movement.
[0139] In an embodiment of the present invention, the above-mentioned hydrodynamic model and algorithm process are encapsulated into independent modules and stored and called in the digital twin system.
[0140] {Driver of the digital twin model}
[0141] In an embodiment of the present invention, on the basis of the established digital twin model, based on historical hydrological data, event-driven and time-driven mechanisms are designed to realize dynamic calculation and interaction of the digital twin model, realize dynamic demonstration driven by historical hydrological data, dynamically demonstrate the relationship between runoff and watershed characteristics, rainfall, and the movement of water in the water body, and simulate the dynamic changes of water level and flow.
[0142] Taking the dynamic interaction of the digital twin model of the time-driven mechanism as an example, it includes the following process designs:
[0143] First, set the time step according to the time resolution of the hydrological data and the accuracy requirements of the model. For example, if the time resolution of the historical hydrological data is 1 hour and the model can accurately simulate the hydrological process at this time scale, set the time step to 1 hour. At the beginning of each time step, the hydrological data (such as water level, flow, rainfall, etc.) at the corresponding time point is input into the digital twin model. For example, when the time advances to the next hour, read the hydrological data of that hour and assign them to the corresponding variables or data interfaces in the model, such as inputting rainfall data into the rainfall input module of the rainfall-runoff model, and inputting water level and flow data into the boundary condition module of the hydrodynamic model;
[0144] The model then calculates based on the input hydrological data and its own physical equations. In the rainfall-runoff model, the runoff is calculated based on the rainfall data and current soil moisture and other state variables, and the established runoff and confluence calculation methods are followed to update the soil moisture and other state variables. For example, the Xin'anjiang model or the SCS-CN model is used to calculate the runoff, and the soil moisture is adjusted based on the calculation results. In the hydrodynamic model, based on the Saint-Venant equations and the input water level and flow boundary conditions, variables such as water flow velocity and water level change are solved; the finite difference method is used for numerical solution to obtain the new water level and flow values of each calculation unit at the current time step, thereby updating the water flow state inside the model.
[0145] It is best to store the results calculated by the model (such as updated water level, flow, soil moisture, etc.) for subsequent analysis and visualization. At the same time, the calculation results are also used as part of the input data for the next time step model calculation (the runoff calculated this time is used as one of the inputs for the river flow calculation in the next time step) to achieve the dynamic evolution of the model. For example, the water level data of each river section calculated in the current time step is saved in a special result array or data file for subsequent query and drawing of water level change curves, and when entering the next time step calculation, these water level data are passed to the corresponding model module for further processing.
[0146] Taking the dynamic interaction of the digital twin model of the event-driven mechanism as an example, it includes the following process designs:
[0147] Check whether the event triggering conditions are met according to the historical hydrological data (predefine the event type, such as defining a rainstorm event as the cumulative rainfall exceeding a threshold (such as 100 mm) within a certain period of time (such as 6 hours); a flood event as the water level exceeding the warning water level (such as determining the warning water level of a certain river section to be 5 meters based on historical flood water level statistics); a drought event as very little rainfall (such as cumulative rainfall less than 10 mm) and soil moisture content below a certain level (such as 10%) within a continuous period of time (such as 30 days), etc.); in the process of historical data processing, calculate the cumulative value of rainfall, real-time changes in water level and dynamic conditions of soil moisture content, such as when processing rainfall data, accumulate the rainfall per hour, and when the cumulative rainfall exceeds the threshold of the rainstorm event, determine that the rainstorm event is triggered; for water level data, every time new water level data is input, compare it with the warning water level, and if it exceeds, a flood event is triggered;
[0148] When an event is triggered, the corresponding model is started or the model parameters are adjusted according to the event type. For example, after a rainstorm event is triggered, the rainfall-runoff model is activated, and the current rainfall data, soil moisture content and other relevant data are input into the model to calculate the change in runoff volume, and the calculation results are passed to the subsequent hydrodynamic model to simulate the impact of runoff caused by rainstorms on river flow and water level. When a flood event is triggered, parameters such as boundary conditions and resistance coefficients in the hydrodynamic model are adjusted to better simulate the evolution of floods in the river channel. For example, according to the rise in flood water levels, the water resistance coefficient of the river channel in the hydrodynamic model is increased to reflect the impact of floods on the surrounding environment of the river channel.
[0149] After the model runs and updates the model data and calculation results under event-driven conditions, the results are fed back to the data storage and visualization module. For example, the water level changes and inundation range calculated by the hydrodynamic model during the evolution of the flood are used as hydrological process data storage on the one hand, and on the other hand, the visualization interface of the digital twin model is updated to display the dynamic changes of river flow and water level in real time when the event occurs.
[0150] {Distributed Storage System}
[0151] In an embodiment of the present invention, a distributed storage system for hydrological data is established by combining Ceph and Cassandra for geographic information data, physical entity data and hydrological process data, so as to achieve efficient, stable and reliable storage of massive data, and perform storage optimization for different data types such as geographic information data, hydrological process data and physical entity model data.
[0152] Among them, a hybrid distributed storage strategy is designed for different types of data, including: terrain data, water system distribution data and land use data are stored using the HDFS system; physical entity models and hydrological process data are stored using the Ceph system.
[0153] Partition storage of different types of data, including: partition storage of terrain data, water system distribution data and land use data according to the watershed range; partition storage of physical model data according to hydrological stations and water conservancy project facilities; partition storage of hydrological process data according to time and space dimensions.
[0154] During partition storage, indexes are created for different types of data, including:
[0155] For geographic information data, a spatial index based on R-tree index is established;
[0156] For physical entity data, create an index based on the equipment number and facility name attributes;
[0157] For hydrological process data, a time-space index combination based on B-tree index is established to realize fast query of time dimension index, and the spatial index is combined to efficiently retrieve hydrological data in a specific time and area.
[0158] For geographic information data, first determine the spatial objects in the geographic information data, such as terrain area, water system range, etc. For terrain data, each grid unit or grid unit combination of the digital elevation model DEM is used as the basic spatial object; for water system data, the polygonal outlines of water bodies such as rivers and lakes are used as spatial objects.
[0159] Then the minimum bounding rectangle (MBB) of each spatial object is calculated. For a terrain grid cell, its MBB is the minimum rectangle containing the grid cell; for a water system polygon, the MBB is determined by calculating the minimum and maximum longitude and latitude coordinates of the polygon vertices. Finally, these spatial objects and their corresponding MBB information are organized into an R-tree index structure. Starting from the bottom-level leaf node, the MBBs of spatial objects with similar spatial positions are combined to form a node. For example, the MBBs of adjacent terrain grid cells are merged into a leaf node. If the number of MBBs in the leaf node exceeds a preset threshold (such as 50-100), these leaf nodes are further merged into non-leaf nodes of the upper layer, and so on, to construct a complete R-tree index.
[0160] During the construction process, further optimization can be performed based on the geographical distribution characteristics of spatial objects, such as grouping and constructing them according to river basins or administrative regions, so that index nodes of related areas can be quickly located in subsequent queries.
[0161] As an optional embodiment, for physical entity data, based on key attributes of the physical entity data, such as the equipment number, model, installation location, etc. of hydrological monitoring equipment, the facility name, type, geographical location, etc. of water conservancy project facilities, taking the equipment number as an example, a database table is created to store the mapping relationship between the equipment number and the corresponding equipment data storage location.
[0162] Use each device number as the primary key of the index table. When inserting new device data, insert the device number and its corresponding storage location information (such as file path or object identifier) into the index table. For other key attributes, such as model, installation location, etc., you can create auxiliary indexes to quickly locate device data according to different query requirements.
[0163] As an optional embodiment, for hydrological process data, a B-tree index structure is selected, and the timestamp in the hydrological process data is used as the key value of the B-tree index. Data records are inserted into the B-tree index in chronological order. For example, for water level data recorded by the hour, the timestamp of each hour and its corresponding water level data storage location information are inserted into the B-tree index. Thus, when querying hydrological process data within a specific time period, the B-tree index can be used to quickly locate the index node corresponding to the start time and end time, and then the data storage location information within the time period can be obtained.
[0164] For the spatial dimension of hydrological process data, a grid index structure or a quadtree index structure is used for indexing. In the present invention, a grid index is used to divide the watershed into a number of grid cells of equal size, and the grid cell to which each hydrological data record belongs is determined. For example, based on the geographic location coordinates (such as longitude and latitude) in the data record, it is determined in which grid cell it falls, and a mapping relationship is established between the grid cell number and the data storage location information. These grid cell information and their corresponding hydrological data storage locations are organized into a grid index structure, so that when querying hydrological process data in a specific area, the relevant grid cells can be quickly located, and then the specific data can be obtained in combination with the time index.
[0165] Furthermore, the present invention establishes a distributed metadata management system based on a distributed database for storing descriptive information about data.
[0166] Specifically, in step 10, a distributed metadata management system is established using the Apache Cassandra distributed database, including:
[0167] In the Apache Cassandra distributed database, corresponding metadata tables are created according to the metadata information of the design record to store description information about geographic information data, physical entity data and hydrological process data; the metadata tables include geographic information metadata tables, physical entity metadata tables and hydrological process metadata tables;
[0168] Through the data acquisition interface between the Apache Cassandra distributed database and the HDFS system, the system interacts with the HDFS system to obtain relevant information about terrain data, water system distribution data, and land use data in the database and converts them into metadata;
[0169] Through the data acquisition interface of the Apache Cassandra distributed database and the Ceph system, it interacts with the HDFS system to obtain information related to the physical entity model and hydrological process data in the database and converts it into metadata;
[0170] The collected metadata is distributed and stored on multiple nodes.
[0171] The metadata information of the design record includes:
[0172] For geographic information data, metadata includes data block number, data type, data storage location, data update time, data resolution, and geographic scope;
[0173] For physical entity data, metadata includes device number, device name, device type, device parameters, region, and data update time;
[0174] For hydrological process data, metadata includes data identification, time range, spatial area, data source, and data storage location.
[0175] Design the database table structure according to the determined metadata structure. For example, create a geographic information metadata table that contains the metadata fields of the above-mentioned geographic information data; create a physical entity metadata table and a hydrological process metadata table that correspond to their respective metadata structures. In the database table design, select the appropriate data type to store metadata, such as the data block number can use the string type, the data update time can use the date and time type, etc.
[0176] By deploying the Apache Cassandra distributed database, configure the cluster parameters of Cassandra, such as the number of nodes, data replication factor, network communication settings, etc. Create the corresponding metadata tables in Cassandra according to the designed database table structure. For example, use the Cassandra command line interface or client tool to create geographic information metadata tables, physical entity metadata tables, and hydrological process metadata tables, and set primary keys and indexes. Initialize the newly created metadata tables, such as setting default metadata values or inserting initial metadata records, so that subsequent data management operations can proceed smoothly.
[0177] In an optional embodiment, in step 10, a metadata query service based on a RESTful architecture is also created, providing different query endpoints, and being able to perform corresponding query operations in the Cassandra metadata database based on the incoming query parameters, such as querying by data type, querying by time range, querying by geographic area, etc. After the query, metadata records that meet the conditions are returned, including data storage location and data source information.
[0178] For example, if you query the metadata of hydrological process data for a certain area within a certain time period, the query interface will filter and query in the hydrological process metadata table based on the time range and geographic area parameters, and return metadata records that meet the conditions, including data storage location, data source and other information.
[0179] In an optional embodiment, in the data management of the digital twin model, metadata information is used to locate, retrieve and verify data, including:
[0180] When the model needs to obtain data in a certain area, it first queries the metadata to obtain the data storage location, and then reads the data from the HDFS system or Ceph system based on the data storage location to improve data access efficiency.
[0181] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. A person with ordinary knowledge in the technical field to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.
Claims
1. A method for constructing a hydrological data intelligent storage database management system based on digital twin technology, characterized in that: The following steps are involved: Step 1: Collect basin topographic data, water system distribution data and land use data; Step 2: Obtain water conservancy project facility data, hydrological station data and hydrological observation data; Step 3: Describe the relationship between the hydrological station entity and the hydrological observation data based on the entity-relationship model, and design a database table to store the hydrological observation data; Step 4: construct a geographic information model based on the basin's terrain data, water system distribution data, and land use data to describe the distribution of water body models in different basins on the terrain model; Step 5: construct a physical entity model based on the hydrological station data and water conservancy project facility data; Step 6: Model the hydrological process based on the geographic information model, the physical entity model and the historical hydrological observation data, construct a rainfall-runoff model to dynamically describe the relationship between runoff and basin characteristics and rainfall, and construct a hydrodynamic model to dynamically describe the movement of water in the water body and simulate the dynamic changes of water level and flow; Step 7: Based on historical hydrological observation data, the dynamic calculation of the rainfall-runoff model and the hydrodynamic model is realized by using a time-driven and event-driven approach, and the visual representation of the water body model on the terrain model is dynamically updated according to the calculation results; Step 8: Configure a hybrid distributed storage strategy for data, including: using the HDFS system to store terrain data, water system distribution data, and land use data; using the Ceph system to store physical entity models and hydrological process data; Step 9: Partitioning and storing different types of data, including: partitioning and storing terrain data, water system distribution data and land use data according to the watershed range; partitioning and storing physical model data according to hydrological stations and water conservancy project facilities; partitioning and storing hydrological process data according to time and space dimensions; Step 10: Use a distributed database to establish a distributed metadata management system for storing descriptive information about the data.
2. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 1 is characterized in that: In step 2, the hydrological observation data includes observed water level, flow, sediment, water temperature, water quality, groundwater, precipitation data, daily data, extreme value data, as well as hydrological images, hydrological videos, hydrological audio data, measured results excerpt data, precipitation statistics data and alignment relationship curve data.
3. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 2 is characterized in that: In step 3, a database table is designed to store hydrological observation data, including: Design structured database tables to record the relationship between hydrological station entities and observation data; Design unstructured database tables to store hydrological images, hydrological videos and hydrological audio data; A semi-structured database table is designed to store measured results extract data, precipitation statistics, and alignment relationship curve data.
4. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 1 is characterized in that: The terrain data of the watershed is digital elevation model data, and its format is raster data; The water system distribution data includes the location, shape and boundary information of water bodies such as rivers, lakes and reservoirs, and its format is vector data; The land use data includes land use type data within the watershed, and the format of the land use data is vector data.
5. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 1 is characterized in that: In step 4, a geographic information model is constructed based on the topographic data, water system distribution data, and land use data of the watershed, including: Step 4.1, import the collected digital elevation model data into the geographic information system software, use the terrain analysis tool of the software to process the digital elevation model data, perform depression filling operation to remove local depressions in the terrain data, and ensure the accuracy of the water flow direction; then, generate a three-dimensional terrain surface model based on the processed digital elevation model data, connect discrete elevation points to form triangular patches based on the triangulation algorithm, construct a continuous terrain surface, and obtain a terrain model; Step 4.2: Import the water system distribution vector data into the geographic information system software, and draw the water system network model on the terrain model according to the attribute information of the three types of water bodies, namely rivers, lakes and reservoirs in the data; Step 4.3: Based on the land use data, overlay it with the terrain model and water network model to assign corresponding attribute values to areas of different land use types.
6. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 1 is characterized in that: In step 5, based on the parameter information of the hydrological station monitoring equipment and the design drawings and structural parameter information of the water conservancy project facilities, a solid modeling method is adopted to set corresponding structural and material properties for different structures to distinguish them.
7. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 1 is characterized in that: In step 6, the process of constructing a rainfall-runoff model includes: Step 61a, determining a rainfall-runoff model according to watershed characteristics; Step 61b, obtaining historical rainfall data from hydrological observation data of each hydrological station in the basin, and forming a data sequence according to a preset time resolution; Step 61c, obtaining evaporation data of the basin, wherein the time scale of the evaporation data matches the time resolution of the rainfall data; Step 61d, determining the watershed characteristic data according to the watershed topographic data and land use data; Step 61e, initializing the rainfall-runoff model; Step 61f, using an optimization algorithm to iterate and calibrate the model parameters of the rainfall-runoff model to obtain an optimal model parameter combination that meets the convergence standard; Step 61g: Apply the calibrated optimal model parameter combination to an independent validation data set to calculate the runoff prediction result of the model, and perform validation evaluation with the runoff observation data in the validation data set to evaluate the model performance.
8. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 1 is characterized in that: In step 6, the process of constructing the hydrodynamic model includes: Step 62a, establishing Saint-Venant equations for describing water flow motion; the Saint-Venant equations include a water flow motion continuity equation and a momentum equation; Step 62b, discretizing the Saint-Venant equations for numerical solution; Step 62c: Based on the channel parameters, channel roughness parameters, hydrological boundary condition parameters and initial conditions in the basin, the discretized Saint-Venant equations are solved to obtain the water level and flow of the channel, thereby simulating the water flow movement.
9. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to any one of claims 1 to 8, characterized in that: In step 9, it also includes indexing different types of data, wherein: For geographic information data, a spatial index based on R-tree index is established; For physical entity data, create an index based on the equipment number and facility name attributes; For hydrological process data, a time-space index combination based on B-tree index is established to realize fast query of time dimension index, and the spatial index is combined to efficiently retrieve hydrological data in a specific time and area.
10. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 9 is characterized in that: In step 10, a distributed metadata management system is established using the Apache Cassandra distributed database, including: In the Apache Cassandra distributed database, a corresponding metadata table is created according to the metadata information of the design record, for storing description information about geographic information data, physical entity data and hydrological process data; the metadata table includes a geographic information metadata table, a physical entity metadata table and a hydrological process metadata table; Through the data acquisition interface between the Apache Cassandra distributed database and the HDFS system, the system interacts with the HDFS system to obtain relevant information about terrain data, water system distribution data, and land use data in the database and converts them into metadata; Through the data acquisition interface of the Apache Cassandra distributed database and the Ceph system, it interacts with the HDFS system to obtain information related to the physical entity model and hydrological process data in the database and converts it into metadata; The collected metadata is distributed and stored on multiple nodes.
11. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 10 is characterized in that: In step 10, a metadata query service based on the RESTful architecture is created, which provides different query endpoints and can perform corresponding query operations in the Cassandra metadata database according to the incoming query parameters, and return metadata records that meet the conditions, including data storage location and data source information.
12. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 10, characterized in that: In step 10, the metadata information of the design record includes: For geographic information data, metadata includes data block number, data type, data storage location, data update time, data resolution, and geographic scope; For physical entity data, metadata includes device number, device name, device type, device parameters, region, and data update time; For hydrological process data, metadata includes data identification, time range, spatial area, data source, and data storage location.
13. The method for constructing a hydrological data intelligent storage database management system based on digital twin technology according to claim 10, characterized in that: Use metadata information to locate, retrieve and verify data, including: When the model needs to obtain data in a certain area, it first queries the metadata to obtain the data storage location, and then reads the data from the HDFS system or Ceph system based on the data storage location to improve data access efficiency.