DEM data filling method and device, storage medium and electronic equipment
By detecting depressions in DEM data and optimizing the filling path using real-time hydrological data, the problem of flow direction calculation errors caused by depressions in DEM data was solved, thus achieving accuracy and consistency in hydrological simulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies have problems with DEM data, such as depressions causing errors in flow direction calculation and inability to determine the direction of water flow. Traditional depression filling algorithms may lead to repeated calculations or broken water flow paths, affecting the accuracy of hydrological simulation.
By acquiring raw DEM data to detect depressions, collecting real-time hydrological data to predict hydrological information, using graph neural networks to optimize depression-filling paths, and combining them with temporal neural networks for dynamic updates, we can ensure that the water flow direction is consistent with the actual runoff and avoid the lag of static depression filling.
It improves the accuracy of hydrological simulation, avoids redundant calculations and breaks in the water flow path, and ensures the consistency and accuracy of the water flow direction.
Smart Images

Figure CN121168284B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, specifically to a DEM data depression filling method, a DEM data depression filling device, a storage medium, and an electronic device. Background Technology
[0002] Digital Elevation Model (DEM) data filling is an important technique in Geographic Information Systems (GIS) used to eliminate local low points, i.e. depressions, in DEMs.
[0003] The appearance of depressions may lead to problems such as incorrect flow direction calculation and inability to determine the direction of water flow. Therefore, it is necessary to fill the depressions to improve the accuracy of flow direction calculation. Thus, depression filling processing of DEM data is an irreplaceable step in DEM data preprocessing.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this disclosure is to provide a method, device, storage medium, and electronic equipment for filling depressions in DEM data, aiming to improve the accuracy of hydrological simulation.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] According to one aspect of this disclosure, a method for filling depressions in DEM data is provided, including:
[0008] Obtain the original DEM data and detect the original DEM data to obtain the depression points and depression point information;
[0009] Collect real-time hydrological data, and predict the hydrological prediction information of the depression point based on the real-time hydrological data and the depression point information;
[0010] The filling path for the depression point is determined based on the hydrological prediction information and the depression point information;
[0011] The target DEM data is obtained by filling the depressions in the original DEM data according to the described depression-filling path.
[0012] Optionally, determining the depression-filling path based on the hydrological prediction information and the depression information includes:
[0013] A concave point graph structure is created based on the concave point information; wherein, the concave point graph structure includes a node feature matrix and a graph structure matrix;
[0014] The depression point map structure and the hydrological prediction information are input into a pre-trained graph neural network (GNN) model to obtain the depression filling path output by the GNN model.
[0015] The filling path is a connected path from the node with the highest priority score to the node with the lowest priority score.
[0016] Optionally, the method further includes: calculating the priority score of the computing node, wherein the priority score of the computing node includes:
[0017] The facility connectivity coefficient of the node is extracted based on the information of the depression point; and
[0018] Based on the hydrological prediction information, the predicted water catchment risk level and predicted water flow arrival time are extracted from the nodes.
[0019] The priority score of a node is calculated based on its facility connectivity coefficient, the predicted catchment risk level, and the predicted water flow arrival time.
[0020] Optionally, creating a depression point map structure based on the depression point information includes:
[0021] The indentation points are set as nodes, and the node feature matrix is extracted based on the indentation point information; and
[0022] Based on the depression point information, the connectivity relationship between adjacent depression points is extracted, and the water flow resistance between adjacent depression points is calculated based on the depression point information; wherein, the water flow resistance is calculated based on the elevation value corresponding to adjacent depression points, the horizontal distance between adjacent depression points, the slope value between adjacent depression points, and the hydrological weight factor.
[0023] The graph structure matrix is created based on the connectivity and the flow resistance.
[0024] Optionally, the method further includes: constructing a target loss function for the GNN model, and training the GNN model based on the target loss function; the target loss function for constructing the GNN model includes:
[0025] Calculate the node priority loss, path smoothing loss, and filling amount loss under the predicted depression-filling path;
[0026] The target loss function is the sum of the node priority loss value, the path smoothing loss value, and the depression filling loss value.
[0027] Optionally, the step of predicting the hydrological prediction information of the depression point based on the real-time hydrological data and the depression point information includes:
[0028] The real-time hydrological data and the depression point information are input into a pre-trained temporal neural network prediction model to obtain the hydrological prediction information output by the temporal neural network prediction model; wherein, the real-time hydrological data includes one or more of the following: real-time rainfall data, surface runoff data, and soil moisture content data.
[0029] Optionally, the method further includes:
[0030] Collect hydrological measurement data;
[0031] Calculate the error value between the measured hydrological data and the predicted hydrological information;
[0032] Once the error value exceeds a preset threshold, the GNN model is triggered to retrain.
[0033] According to a second aspect of this disclosure, a DEM data depression filling device is provided, comprising:
[0034] The acquisition module is used to acquire the original DEM data and detect the original DEM data to obtain the depression points and depression point information;
[0035] The prediction module is used to collect real-time hydrological data and predict the hydrological prediction information of the depression point based on the real-time hydrological data and the depression point information.
[0036] The determination module is used to determine the depression-filling path of the depression point based on the hydrological prediction information and the depression point information;
[0037] The depression filling module is used to fill the depressions in the original DEM data according to the depression filling path to obtain the target DEM data.
[0038] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the DEM data filling method as described in the above embodiments.
[0039] According to a fourth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the DEM data filling method as described in the above embodiments.
[0040] The exemplary embodiments disclosed herein may have some or all of the following beneficial effects:
[0041] In some embodiments of the present disclosure, after detecting depressions, hydrological prediction information is obtained using real-time hydrological data. Then, a depression-filling path is determined based on the hydrological prediction information and the depression information, and the DEM data is filled using the optimized path. On one hand, the depression-filling path is dynamically updated using real-time hydrological data to ensure that the water flow direction is consistent with the actual runoff, avoiding the lag of static depression filling. On the other hand, by optimizing the depression-filling path, compared to traditional depression-filling algorithms that process depressions in a fixed order, redundant calculations or breaks in the water flow path can be avoided. All of the above demonstrates that the DEM data depression-filling method provided in this disclosure can improve the accuracy of hydrological simulation.
[0042] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0044] Figure 1 The illustration schematically shows a flowchart of a DEM data depression filling method according to an exemplary embodiment of the present disclosure;
[0045] Figure 2 This schematic diagram illustrates a cross-sectional view of a recessed point in an exemplary embodiment of the present disclosure.
[0046] Figure 3 This illustration schematically depicts a method for detecting indentations in an exemplary embodiment of the present disclosure.
[0047] Figure 4 This schematic diagram illustrates a cross-sectional view of a depression after filling in an exemplary embodiment of the present disclosure.
[0048] Figure 5 This schematic diagram illustrates the composition of a DEM data filling device according to an exemplary embodiment of the present disclosure;
[0049] Figure 6 The schematic diagram illustrates the structure of a computer system of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0050] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0051] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0052] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0053] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0054] DEM (Digital Elevation Model) simulates a relatively smooth terrain surface. However, due to DEM errors and the presence of real-world terrain features (such as karst topography), the DEM surface contains depressions. When calculating water flow direction, these depressions often lead to inaccurate or even incorrect flow directions. Therefore, before calculating water flow direction, the original DEM data should first be filled to obtain a depression-free DEM.
[0055] Traditional depression-filling algorithms process depressions in a fixed order, which may lead to repeated calculations or broken flow paths. Therefore, this disclosure proposes a depression-filling method for DEM data, which aims to optimize the depression-filling path of DEM data, correct data defects, and ensure hydrological continuity, thus providing a reliable basis for subsequent analysis.
[0056] The implementation details of the technical solutions of the embodiments of this disclosure are described in detail below.
[0057] Figure 1 This illustration schematically depicts a flowchart of a DEM data depression-filling method according to an exemplary embodiment of this disclosure. Figure 1 As shown, the DEM data depression filling method includes steps S101 to S104:
[0058] Step S101: Obtain the original DEM data and detect the original DEM data to obtain the depression points and depression point information;
[0059] Step S102: Collect real-time hydrological data, and predict the hydrological prediction information of the depression point based on the real-time hydrological data and the depression point information;
[0060] Step S103: Determine the filling path for the depression point based on the hydrological prediction information and the depression point information;
[0061] Step S104: Fill the depressions in the original DEM data according to the filling path to obtain the target DEM data.
[0062] In some embodiments of the present disclosure, after detecting depressions, hydrological prediction information is obtained using real-time hydrological data. Then, a depression-filling path is determined based on the hydrological prediction information and the depression information, and the DEM data is filled using the optimized path. On one hand, the depression-filling path is dynamically updated using real-time hydrological data to ensure that the water flow direction is consistent with the actual runoff, avoiding the lag of static depression filling. On the other hand, by optimizing the depression-filling path, compared to traditional depression-filling algorithms that process depressions in a fixed order, redundant calculations or breaks in the water flow path can be avoided. All of the above demonstrates that the DEM data depression-filling method provided in this disclosure can improve the accuracy of hydrological simulation.
[0063] The following will describe in more detail each step of the DEM data depression filling method in this exemplary embodiment, with reference to the accompanying drawings and embodiments.
[0064] In step S101, the original DEM data is acquired, and the original DEM data is detected to obtain the depression points and depression point information.
[0065] Specifically, the first priority is to acquire DEM data. DEM data without depression filling can be recorded as raw DEM data. DEM data can be mapped using methods such as satellite remote sensing and lidar, which will not be specifically limited here.
[0066] Then, depression detection is performed on the original DEM data. Specifically, a local minimum search algorithm is used to traverse each grid point in the DEM data, detect all depression points, and record their location and elevation information.
[0067] Figure 2 A schematic cross-sectional view of a recessed point is shown in an exemplary embodiment of this disclosure. For example... Figure 2As shown, a sink (also known as a confluence) is a spatially connected cell in a flow raster whose flow direction cannot be assigned one of the eight valid values. It is considered to have an undefined flow direction and is assigned a value equal to the sum of its possible directions. The number of sinks ranges from 1 to the number of sinks.
[0068] The main causes of sinks are twofold: 1) Errors within the data. Sampling issues and rounding elevations to integers are common causes of these errors. 2) A true reflection of the landform. For example, glaciers, lakes, karst topography, and sinkholes. Note: Naturally occurring sinks in elevation data with a pixel size of 10 meters or larger are extremely rare and are usually considered errors. Therefore, if sinks occur in data at this precision, it is necessary to overlay some topographic data for comparison to see if they exist in reality; otherwise, there is a fatal error in the data. As the pixel size increases, the number of sinks in the dataset usually also increases.
[0069] If we disregard sinks and directly use depression-filling tools to fill depressions in DEM data, we can obtain a DEM without depressions, but we cannot perform fine depression filling. This results in some depressions that are not sinks being filled in, leading to inaccurate runoff shapes and a failure to represent curvature details. Therefore, instead of simply analyzing the topological relationships of river networks, we must develop highly accurate relationships between topography and rivers, which necessitates fine depression filling.
[0070] Figure 3 This diagram schematically illustrates a method for detecting indentations in an exemplary embodiment of this disclosure. Figure 3 As shown, the shaded areas marked with a value of 1 are smaller than the surrounding grids, creating a situation where water flows in but cannot flow out. These are called confluences or depressions. Filling these depressions will solve the problem of water flow interruption.
[0071] Specifically, in step S101, the elevation values of each grid point and its neighboring grid points can be compared by traversing the grid matrix of the DEM data. If the elevation of a grid point is lower than that of all its neighboring grid points, it is determined to be a depression point, and the depression point information is obtained. An eight-neighbor or four-neighbor search method can also be used to improve detection efficiency.
[0072] In step S102, real-time hydrological data is collected, and hydrological prediction information of the depression point is predicted based on the real-time hydrological data and the depression point information.
[0073] Specifically, the first step is to collect real-time hydrological data, which includes one or more of the following: real-time rainfall data, surface runoff data, and soil moisture content data.
[0074] Real-time rainfall data can be collected through meteorological stations and radar monitoring; surface runoff data, such as surface runoff velocity and flow rate, can be collected through hydrological station sensors; soil moisture data, such as soil moisture content and groundwater level, can be collected through soil moisture monitoring stations. The collection frequency can be dynamically adjusted according to the rate of hydrological change, and can be increased to the minute level during extreme weather events such as heavy rainstorms.
[0075] After acquiring real-time hydrological data, data preprocessing can be performed. Preprocessing can include handling missing values; when missing values are detected, spatiotemporal interpolation methods such as Kriging interpolation and Kalman filtering can be used to fill in the missing values. Preprocessing can also filter outliers, removing them based on the 3σ principle of historical data distribution or the isolated forest algorithm. Furthermore, preprocessing can perform spatiotemporal calibration, unifying multi-source data to the DEM coordinate system and aligning it with the time reference.
[0076] After collecting real-time hydrological data, hydrological prediction information is generated. In one embodiment of this disclosure, predicting the hydrological prediction information of the depression point based on the real-time hydrological data and the depression point information includes: inputting the real-time hydrological data and the depression point information into a pre-trained temporal neural network prediction model to obtain the hydrological prediction information output by the temporal neural network prediction model.
[0077] Specifically, a temporal neural network (LSTM) can be used to predict hydrological information, capturing long-term series dependencies and making it suitable for handling nonlinear hydrological data fluctuations. The prediction target is the hydrological data of each depression point over a future period, such as changes in runoff volume and flow direction.
[0078] The trained temporal neural network needs to meet certain key performance indicators, such as a rainfall prediction error rate of <10%, a root mean square error (RMSE) of <5cm for runoff depth prediction, and a catchment time prediction deviation of <15 minutes. Model training can only be completed after the key performance indicators are verified. The model building process of temporal neural networks is relatively conventional and will not be elaborated on here.
[0079] Based on the above method, using real-time hydrological data to capture dynamic changes in the watershed can avoid the lag of static depression filling.
[0080] In step S103, the filling path of the depression point is determined based on the hydrological prediction information and the depression point information.
[0081] In one embodiment of this disclosure, determining the depression-filling path based on the hydrological prediction information and the depression-point information includes: creating a depression-point graph structure based on the depression-point information; wherein the depression-point graph structure includes a node feature matrix and a graph structure matrix; inputting the depression-point graph structure and the hydrological prediction information into a pre-trained graph neural network (GNN) model to obtain the depression-filling path output by the GNN model; wherein the depression-filling path is a connected path from the node with the highest priority score to the node with the lowest priority score.
[0082] Specifically, when searching for the optimal path to fill depressions, a depression point graph structure can be constructed from relevant information. Then, a graph neural network (GNN) model can be used to search for the optimal connected path. The starting point of the path to fill depressions is the node with the highest priority score, and the ending point is the node with the lowest priority score.
[0083] In one embodiment of this disclosure, creating a depression point graph structure based on the depression point information includes: setting the depression points as nodes to extract the node feature matrix based on the depression point information; extracting the connectivity relationship between adjacent depression points based on the depression point information; and calculating the water flow resistance between adjacent depression points based on the depression point information; wherein the water flow resistance is calculated based on the elevation values corresponding to adjacent depression points, the horizontal distance between adjacent depression points, the slope values between adjacent depression points, and a hydrological weight factor; and creating the graph structure matrix based on the connectivity relationship and the water flow resistance.
[0084] Specifically, a node feature matrix is first created, where each depression point is treated as a node. The features of a node include one or more of the following: the elevation value of the depression point, the catchment area, and the terrain slope, all of which can be obtained through depression point detection.
[0085] After creating nodes, the connectivity between adjacent depressions can be obtained through depression detection information. Based on the connectivity, edges can be created between nodes, and then the edge weights are calculated. The edge weights represent the water flow resistance between depressions, and the calculation method is as follows:
[0086]
[0087] In the formula, , These are the elevation values of the two depressions. The horizontal distance between adjacent depressions. This represents the slope value between adjacent depressions. , These are all hydrological weighting factors, adjusted according to the corresponding hydrological scenario.
[0088] Finally, a graph structure matrix is created based on each node, edge, and edge weight. Based on the above method, the spatial dependencies of concave points are modeled using a graph neural network, conforming to the physical laws of water flow.
[0089] The depression point map structure and the hydrological prediction information are input into a pre-trained graph neural network (GNN) model to obtain the depression filling path. The depression filling path is a connected path from the node with the highest priority score to the node with the lowest priority score.
[0090] In one embodiment of this disclosure, the method further includes: calculating the priority score of a node, wherein the priority score of the node includes: extracting the facility connectivity coefficient of the node based on the depression point information; and extracting the predicted catchment risk level and predicted water flow arrival time of the node based on the hydrological prediction information; and calculating the priority score of the node according to the facility connectivity coefficient, the predicted catchment risk level and the predicted water flow arrival time of the node.
[0091] Specifically, each depression point is given a priority score to assess the priority of filling that depression point. For depression points (nodes)... i The priority score of a node is calculated as follows:
[0092]
[0093] In the formula, For nodes i The predicted water catchment risk level can be standardized to [0,1] and determined based on the water catchment of the depression point. For nodes i The predicted arrival time of the water flow can be calculated based on the water volume at the depression and the direction of the water flow. For nodes i The facility connectivity coefficient, that is, the connectivity coefficient between this node and downstream key facilities (such as reservoirs and rivers), These are the weighting coefficients for each parameter.
[0094] In one embodiment of this disclosure, the method further includes: constructing a target loss function for a GNN model, and training the GNN model based on the target loss function; the target loss function for constructing the GNN model includes: calculating a node priority loss value, a path smoothing loss value, and a filling amount loss value under the predicted filling path; and using the sum of the node priority loss value, the path smoothing loss value, and the filling amount loss value as the target loss function.
[0095] Specifically, the model's objective loss function mainly includes three components. The first is the node priority loss value. Node priority indicates the degree of priority for filling a depression. For each node in the predicted depression-filling path, the closer the node is to the front end, the higher its priority for filling. The node priority loss value can be calculated based on the priority score of each node and its order in the predicted depression-filling path. The smaller the node priority loss value, the more likely it is that depressions with high catchment risk will be filled first.
[0096] The second objective loss function is the path smoothing loss value, which can be calculated based on the edge weights in the graph structure. The edge weights represent the water flow resistance between depressions, and the path smoothing loss value can constrain the filling sequence to conform to the natural flow direction of water.
[0097] The third objective loss function is the depression filling loss value, which can be calculated based on the elevation value of the depression point. The depression filling loss can control the total depression filling amount to not exceed a preset threshold. For example, the preset threshold can be set to twice the standard deviation of the original elevation of the DEM to prevent excessive depression filling distortion.
[0098] The final target loss function is L=λ1. Node priority loss value + λ2 Path smoothing loss value +λ3 Loss value due to filling depressions.
[0099] Based on the above method, multiple optimization objectives are used to calculate the loss value when optimizing the depression filling path to optimize the GNN model. This can take into account efficiency, cost and hydrological rationality, and achieve precise depression filling.
[0100] When training a GNN model, the first step is to create a sample dataset, which includes the model input sample depression point map structure, sample hydrological information, and the corresponding optimal depression filling path. Then, it is divided into a training set and a validation set according to a certain ratio. The training set and the target loss function are used to train the model, the model parameters are corrected, and the trained GNN model is obtained when it passes the validation on the validation set.
[0101] In step S104, the depressions in the original DEM data are filled according to the depression filling path to obtain the target DEM data.
[0102] The depression-filling path obtained in step S103 is a connected path from the node with the highest priority score to the node with the lowest priority score. The depressions in the original DEM data are filled sequentially according to the optimized depression-filling path. By increasing the elevation of the depressions to match the elevation of the surrounding grid points, the continuity of water flow is ensured.
[0103] During the depression filling process, DEM data and related data structures can be updated in real time, and the DEM data after depression filling can be output in a specified format (such as TIFF, ASCII, etc.) for subsequent hydrological analysis and application.
[0104] Figure 4 This schematically illustrates a cross-sectional view of a depression after filling in an exemplary embodiment of the present disclosure. (Comparison) Figure 2 and Figure 4 After filling the depression, the concave points are filled in.
[0105] In one embodiment of this disclosure, the method further includes: collecting measured hydrological data; calculating the error value between the measured hydrological data and the hydrological prediction information; and triggering the GNN model to retrain after the error value exceeds a preset threshold.
[0106] Specifically, since hydrological information affects the priority of filling depressions, if the error between the measured hydrological data and the hydrological prediction information is too large, it indicates that the prediction results of the GNN model may be biased. In this case, it is necessary to reconstruct the sample dataset and retrain the GNN model.
[0107] In summary, this application acquires real-time hydrological data and makes predictions. The prediction results, detected depressions, and related information are then input into a graph neural network model to optimize the filling sequence and path of the depressions. By combining hydrological dynamics with topographic structure, intelligent decision-making on depression filling strategies is achieved. Its core advantages are: using real-time hydrological data to capture dynamic changes in the watershed, avoiding the lag of static depression filling; modeling the spatial dependencies of depressions using graph neural networks, which conforms to the physical laws of water flow; and balancing efficiency, cost, and hydrological rationality through multi-objective optimization, making it suitable for complex application scenarios.
[0108] Figure 5 This schematic diagram illustrates the composition of a DEM data filling device according to an exemplary embodiment of the present disclosure, such as... Figure 5 As shown, the DEM data depression-filling device 500 may include an acquisition module 501, a prediction module 502, a determination module 503, and a depression-filling module 504. Wherein:
[0109] The acquisition module 501 is used to acquire the original DEM data and detect the original DEM data to obtain the depression points and depression point information.
[0110] Prediction module 502 is used to collect real-time hydrological data and predict hydrological prediction information of the depression point based on the real-time hydrological data and the depression point information.
[0111] The determining module 503 is used to determine the depression filling path of the depression point based on the hydrological prediction information and the depression point information;
[0112] The depression filling module 504 is used to fill the depressions in the original DEM data according to the depression filling path to obtain the target DEM data.
[0113] According to an exemplary embodiment of this disclosure, the determining module 503 is further configured to create a depression point graph structure based on the depression point information; wherein the depression point graph structure includes a node feature matrix and a graph structure matrix; the depression point graph structure and the hydrological prediction information are input into a pre-trained graph neural network (GNN) model to obtain the depression-filling path output by the GNN model; wherein the depression-filling path is a connected path from the node with the highest priority score to the node with the lowest priority score.
[0114] According to an exemplary embodiment of this disclosure, the determining module 503 is further configured to calculate the priority score of a node, including: extracting the facility connectivity coefficient of the node based on the depression point information; and extracting the predicted catchment risk level and predicted water flow arrival time of the node based on the hydrological prediction information; and calculating the priority score of the node based on the facility connectivity coefficient, the predicted catchment risk level and the predicted water flow arrival time of the node.
[0115] According to an exemplary embodiment of this disclosure, the determining module 503 is further configured to set the depression point as a node, extract the node feature matrix based on the depression point information; extract the connectivity relationship between adjacent depression points based on the depression point information, and calculate the water flow resistance between adjacent depression points based on the depression point information; wherein the water flow resistance is calculated based on the elevation value corresponding to adjacent depression points, the horizontal distance between adjacent depression points, the slope value between adjacent depression points, and the hydrological weight factor; and create the graph structure matrix based on the connectivity relationship and the water flow resistance.
[0116] According to an exemplary embodiment of this disclosure, the DEM data depression filling device 500 further includes a training module for constructing a target loss function of a GNN model to train the GNN model based on the target loss function; the target loss function for constructing the GNN model includes: calculating a node priority loss value, a path smoothing loss value, and a depression filling amount loss value under the predicted depression filling path; and using the sum of the node priority loss value, the path smoothing loss value, and the depression filling amount loss value as the target loss function.
[0117] According to an exemplary embodiment of the present disclosure, the prediction module 502 is used to input the real-time hydrological data and the depression point information into a pre-trained temporal neural network prediction model to obtain the hydrological prediction information output by the temporal neural network prediction model; wherein, the real-time hydrological data includes one or more of real-time rainfall data, surface runoff data and soil moisture content data.
[0118] According to an exemplary embodiment of this disclosure, the training module is further configured to collect measured hydrological data; calculate the error value between the measured hydrological data and the hydrological prediction information; and trigger the GNN model to retrain after the error value exceeds a preset threshold.
[0119] The specific details of each module in the aforementioned DEM data filling device 500 have been described in detail in the corresponding DEM data filling method, so they will not be repeated here.
[0120] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0121] In exemplary embodiments of this disclosure, a storage medium capable of implementing the above-described methods is also provided. It may be a portable compact disc read-only memory (CD-ROM) and include program code, and can run on a terminal device, such as a mobile phone. However, the program product of this disclosure is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0122] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided. Figure 6 The schematic diagram illustrates the structure of a computer system of an electronic device according to an exemplary embodiment of the present disclosure.
[0123] It should be noted that, Figure 6 The computer system 600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0124] like Figure 6As shown, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 602 or programs loaded from storage section 608 into Random Access Memory (RAM) 603. The RAM 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An Input / Output (I / O) interface 605 is also connected to the bus 604.
[0125] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0126] In particular, according to embodiments of this disclosure, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs various functions defined in the system of this disclosure.
[0127] It should be noted that the computer-readable medium shown in the embodiments of this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0129] The units described in the embodiments of this disclosure can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the unit itself.
[0130] In another aspect, this disclosure also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0131] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0132] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0133] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.
[0134] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for DEM data hole filling, characterized in that, The method comprises the following steps: obtaining original DEM data, and detecting the original DEM data to obtain a depression point and depression point information; collecting real-time hydrological data, and predicting hydrological prediction information of the depression point based on the real-time hydrological data and the depression point information; creating a depression point graph structure based on the depression point information, the depression point graph structure comprising a node feature matrix and a graph structure matrix; inputting the depression point graph structure and the hydrological prediction information into a pre-trained graph neural network (GNN) model to obtain a filling path output by the GNN model, the filling path being a connected path from a node with the maximum priority score to a node with the minimum priority score; performing depression filling processing on the depression point in the original DEM data according to the filling path to obtain target DEM data.
2. The DEM data hole filling method of claim 1, wherein, The method further comprises calculating a priority score of a node, which comprises the following steps: extracting a facility connectivity coefficient of the node based on the depression point information; and extracting a predicted runoff risk level and a predicted water flow arrival time of the node based on the hydrological prediction information; calculating the priority score of the node based on the facility connectivity coefficient, the predicted runoff risk level and the predicted water flow arrival time.
3. The DEM data hole filling method of claim 1, wherein, The step of creating a depression point graph structure based on the depression point information comprises the following steps: setting the depression point as a node to extract the node feature matrix based on the depression point information; and extracting a connectivity relationship of adjacent depression points based on the depression point information, and calculating a water flow resistance of adjacent depression points based on the depression point information; wherein the water flow resistance is calculated based on the elevation values corresponding to the adjacent depression points, the horizontal distance between the adjacent depression points, the slope values between the adjacent depression points, and a hydrological weight factor; creating the graph structure matrix based on the connectivity relationship and the water flow resistance.
4. The method of claim 1, wherein, The method further comprises constructing a target loss function of the GNN model to train the GNN model based on the target loss function; the step of constructing the target loss function of the GNN model comprises the following steps: calculating a node priority loss value, a path smoothing loss value and a depression filling amount loss value under a predicted filling path; taking the sum of the node priority loss value, the path smoothing loss value and the depression filling amount loss value as the target loss function.
5. The method of claim 1, wherein, The step of predicting hydrological prediction information of the depression point based on the real-time hydrological data and the depression point information comprises the following steps: inputting the real-time hydrological data and the depression point information into a pre-trained time series neural network prediction model to obtain the hydrological prediction information output by the time series neural network prediction model; wherein the real-time hydrological data comprises one or more of real-time rainfall data, surface runoff data and soil moisture data.
6. The method of claim 1, wherein, The method further comprises the following steps: collecting hydrological measured data; calculating an error value between the hydrological measured data and the hydrological prediction information; triggering the GNN model to be retrained when the error value exceeds a preset threshold.
7. A DEM data hole filling device, characterized by, The method comprises the following steps: an obtaining module is configured to obtain original DEM data, and detect the original DEM data to obtain a depression point and depression point information; A prediction module is configured to collect real-time hydrological data, and predict hydrological prediction information of the depression point based on the real-time hydrological data and the depression point information; A determination module is configured to create a depression point graph structure based on the depression point information, the depression point graph structure including a node feature matrix and a graph structure matrix; input the depression point graph structure and the hydrological prediction information into a pre-trained graph neural network (GNN) model to obtain a filling path output by the GNN model, the filling path being a connected path from a node with a maximum priority score to a node with a minimum priority score; A filling module is configured to perform a depression filling process on the depression point in original DEM data according to the filling path to obtain target DEM data.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6.
9. An electronic device, comprising: The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer program, when executed by a processor, implements the DEM data filling method according to any one of claims 1 to 6. The computer
Citation Information
Patent Citations
Interflow zone lake hydrological connectivity modeling method based on mathematical morphology
CN116415318A
Soil erosion terrain factor calculation method and system and storage medium
CN117034534A