Model training method, DEM data reconstruction method and device, medium and equipment

By introducing a deep residual layer and a feature extraction layer into the DEM data reconstruction model, and combining multiple loss functions, the problem of low accuracy in DEM data reconstruction in existing technologies is solved, and higher accuracy DEM data reconstruction is achieved.

CN121353075APending Publication Date: 2026-01-16CHONGQING LANDIAN AUTOMOBILE TECHNOLOGY CO LTD

Patent Information

Application Number
CN202511930672.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Existing DEM data reconstruction models rely solely on global content loss adjustments during training, failing to provide a detailed description of the characteristics of DEM data and resulting in low accuracy in reconstructing DEM data.

Method used

By acquiring sample DEM data, the deep residual layer and feature extraction layer of the reconstruction model are used to extract near-basin area features and slope features. By combining global content loss, local near-basin loss and slope loss, the model parameters are adjusted to achieve model convergence and improve the accuracy of reconstructed DEM data.

Benefits of technology

By refining the precision and feature extraction of DEM data and combining multiple loss functions, the accuracy of the reconstructed DEM data output by the model is improved, ensuring the detail and overall consistency of terrain features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121353075A_ABST
    Figure CN121353075A_ABST
Patent Text Reader

Abstract

The invention relates to a model training method, a DEM data reconstruction method and device, a medium and equipment. The method comprises the steps that sample DEM data are obtained, the sample DEM data comprise first sample DEM data of first precision and target sample DEM data of second precision, the grid side length of the target sample DEM data is one Nth of the grid side length of the first sample DEM data, and N is a positive integer larger than 1; converting the first sample DEM data into second sample DEM data with second precision through a depth residual layer of the reconstruction model, and extracting a deep feature map of the second sample DEM data; extracting near-watershed region features and gradient features from the deep feature map through a feature extraction layer of the reconstruction model to obtain reconstruction DEM data including a near-watershed region and a gradient region; determining the total loss of the reconstructed DEM data and the target sample DEM data; and adjusting parameters of the reconstruction model according to the total loss so as to converge the reconstruction model. The technical problem of low DEM data reconstruction accuracy is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of DEM data reconstruction, and in particular to a model training method, a method for reconstructing DEM data, an apparatus, a medium, and a device. Background Technology

[0002] DEM is an abbreviation for Digital Elevation Model, a digital data model used to describe surface elevation information. It represents surface elevation data in the form of discrete grid cells (pixels), each grid cell having a corresponding elevation value, reflecting the spatial distribution of regional landforms.

[0003] Methods for acquiring DEM data include ground control point measurement, GPS measurement, lidar, radar altimetry, and aerial photogrammetry.

[0004] Existing DEM data typically has a resolution of 30 meters, 90 meters, or 1 kilometer, which is relatively low. Therefore, to obtain high-precision DEM data, it is necessary to reconstruct the DEM data (also known as super-resolution reconstruction, which refers to improving the accuracy of the DEM data) to obtain high-precision DEM data.

[0005] In related technologies, one possible method for reconstructing DEM data is to use a model. By inputting low-precision DEM data into the model, the model reconstructs the DEM data and outputs high-precision DEM data. The model is then trained by backpropagating the loss calculation between the high-precision DEM data output by the model and the actual high-precision DEM data.

[0006] However, existing models only adjust the model by calculating the global content loss, which cannot describe the characteristics of DEM data in detail, resulting in low accuracy of the reconstructed DEM data after training. Summary of the Invention

[0007] This application provides a model training method, a method for reconstructing DEM data, an apparatus, a medium, and a device to solve the technical problem of low accuracy in reconstructing DEM data.

[0008] In a first aspect, this application provides a model training method, comprising: acquiring sample DEM data, wherein the sample DEM data includes first-precision first-sample DEM data and second-precision target-sample DEM data, wherein the grid side length of the target-sample DEM data is one-Nth of the grid side length of the first-sample DEM data, where N is a positive integer greater than 1; converting the first-sample DEM data into second-precision second-sample DEM data through a deep residual layer of a reconstruction model and extracting a deep feature map of the second-sample DEM data; extracting near-basin region features and slope features from the deep feature map through a feature extraction layer of the reconstruction model to obtain reconstructed DEM data including near-basin region and slope region; determining the global content loss, local near-basin loss, and slope loss of the reconstructed DEM data and the target-sample DEM data; determining the total loss through the global content loss, the local near-basin loss, and the slope loss; and adjusting the parameters of the reconstruction model according to the total loss to make the reconstruction model converge.

[0009] Secondly, this application provides a method for reconstructing DEM data, comprising: acquiring first DEM data of a map region to be processed with a first precision; converting the first DEM data into second DEM data of a second precision through a deep residual layer of a reconstruction model; extracting a deep feature map of the second DEM data through the deep residual layer, wherein the grid side length of the second DEM data is one-Nth of the grid side length of the first DEM data, where N is a positive integer greater than 1; extracting near-basin region features and slope features from the deep feature map through a feature extraction layer of the reconstruction model to obtain reconstructed DEM data of the map region to be processed, wherein the reconstruction model is a model trained using sample DEM data including near-basin region features and slope features, and the precision of the reconstructed DEM data is greater than the precision of the first DEM data.

[0010] Thirdly, this application provides a model training apparatus, comprising: an acquisition module for acquiring sample DEM data, wherein the sample DEM data includes first sample DEM data of a first precision and target sample DEM data of a second precision, wherein the grid side length of the target sample DEM data is one-Nth of the grid side length of the first sample DEM data, and N is a positive integer greater than 1; a depth residual module for converting the first sample DEM data into second sample DEM data of a second precision and extracting deep feature maps of the second sample DEM data; a feature extraction module for extracting near-basin region features and slope features from the deep feature maps to obtain reconstructed DEM data including near-basin region and slope region; a loss determination module for determining the global content loss, local near-basin loss, and slope loss of the reconstructed DEM data and the target sample DEM data; and determining the total loss through the global content loss, the local near-basin loss, and the slope loss; and an adjustment module for adjusting the parameters of the reconstruction model according to the total loss to make the reconstruction model converge.

[0011] Fourthly, this application provides a DEM data reconstruction training apparatus, comprising: an acquisition module for acquiring first DEM data of a map region to be processed with a first precision; a conversion module for converting the first DEM data into second DEM data of a second precision through a deep residual layer of a reconstruction model; a first extraction module for extracting a deep feature map of the second DEM data through the deep residual layer, wherein the grid side length of the second DEM data is one-Nth of the grid side length of the first DEM data, where N is a positive integer greater than 1; and a second extraction module for extracting near-basin area features and slope features from the deep feature map through a feature extraction layer of the reconstruction model to obtain reconstructed DEM data of the map region to be processed, wherein the reconstruction model is a model trained using sample DEM data including near-basin area features and slope features, and the precision of the reconstructed DEM data is greater than the precision of the first DEM data.

[0012] Fifthly, this application provides an electronic device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the memory stores a computer program, and the processor is configured to implement the model training method or the DEM data reconstruction method of any of the above when executing the computer program.

[0013] Sixthly, this application also provides a computer storage medium storing computer-executable instructions for executing the model training method or DEM data reconstruction method of any of the above claims of this application.

[0014] Compared with the prior art, the technical solution provided in this application has the following advantages: The solution provided in this application acquires sample DEM data, which includes first-precision first-sample DEM data and second-precision target-sample DEM data. The grid side length of the target-sample DEM data is one-Nth of the grid side length of the first-sample DEM data, where N is a positive integer greater than 1. The first-sample DEM data is converted to second-precision second-sample DEM data through the deep residual layer of the reconstruction model, and a deep feature map of the second-sample DEM data is extracted. Near-basin region features and slope features are extracted from the deep feature map through the feature extraction layer of the reconstruction model, resulting in reconstructed DEM data including near-basin regions and slope regions. The global content loss, local near-basin loss, and slope loss of the reconstructed DEM data and the target-sample DEM data are determined. The total loss is determined through the global content loss, the local near-basin loss, and the slope loss. The parameters of the reconstruction model are adjusted according to the total loss to make the reconstruction model converge, thereby enabling the reconstruction model to learn the near-basin region features and slope features in the DEM data, improving the accuracy of the reconstructed DEM data output by the model. Attached Figure Description

[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0017] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0018] Figure 1 A flowchart illustrating a model training method provided in this application embodiment; Figure 2 A flowchart illustrating a method for reconstructing DEM data provided in this application embodiment; Figure 3 A structural diagram of a reconstruction model provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a model training device provided in an embodiment of this application; Figure 5A schematic diagram of a DEM data reconstruction device provided in an embodiment of this application; Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] The following disclosure provides numerous different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of the invention. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0021] To address the technical problem of low accuracy in reconstructed DEM data in existing technologies, this application provides a model training method and a DEM data reconstruction method, which can improve the accuracy of the reconstructed DEM data output by the model.

[0022] Figure 1 This is a flowchart illustrating a model training method provided in an embodiment of this application. Figure 1 As shown, the above model training methods include: S102, acquire sample DEM data, wherein the sample DEM data includes first sample DEM data of first precision and target sample DEM data of second precision, the grid side length of the target sample DEM data is one-Nth of the grid side length of the first sample DEM data, where N is a positive integer greater than 1; S104, the first sample DEM data is converted into second sample DEM data with second precision by reconstructing the deep residual layer of the model and the deep feature map of the second sample DEM data is extracted. S106, through the feature extraction layer of the reconstruction model, extract the near-basin area features and slope features from the deep feature map to obtain reconstructed DEM data including the near-basin area and the slope area; S108, determine the global content loss, local near-basin loss, and slope loss between the reconstructed DEM data and the target sample DEM data; determine the total loss using the global content loss, the local near-basin loss, and the slope loss; S110, adjust the parameters of the reconstruction model according to the total loss to make the reconstruction model converge.

[0023] Figure 2 Here is a flowchart of a DEM data reconstruction method according to this application, as shown below. Figure 2 As shown, it includes: S202, Obtain the first DEM data of the map area to be processed with the first precision; S204, convert the first DEM data into second-precision second DEM data by reconstructing the deep residual layer of the model; S206, extract the deep feature map of the second DEM data through the deep residual layer, wherein the grid side length of the second DEM data is one-Nth of the grid side length of the first DEM data, and N is a positive integer greater than 1; S208, the feature extraction layer of the reconstruction model extracts near-basin area features and slope features from the deep feature map to obtain the reconstructed DEM data of the map area to be processed. The reconstruction model is a model trained using sample DEM data including near-basin area features and slope features. The accuracy of the reconstructed DEM data is greater than that of the first DEM data.

[0024] This application can be applied to the process of DEM data reconstruction from low-precision DEM data.

[0025] DEM data is an abbreviation for Digital Elevation Model, a digital data model used to describe surface elevation information. It represents surface elevation data in the form of discrete grid cells (pixels), each grid cell having a corresponding elevation value, reflecting the spatial distribution of regional landforms.

[0026] In layman's terms, DEM data with a precision of 30 meters can be understood as a grid formed by squares with sides of 30 meters on the ground surface, and the elevation value corresponding to the grid is the height of the ground surface, such as altitude or height relative to a certain plane.

[0027] To reconstruct low-precision DEM data, a reconstruction model can be used. The following section explains the process of DEM data reconstruction from the perspective of training and using the reconstruction model.

[0028] First, we need to train the model.

[0029] When training the model, sample DEM data is required. This sample DEM data includes a first sample DEM and a target sample DEM. The precision of the first sample DEM and the target sample DEM differs, with the target sample DEM having higher precision. The first precision of the first sample DEM can be low, such as 1 km, 100 m, 30 m, 27 m, etc., but is not limited to these. The second precision of the target sample DEM can be high. If the first precision is 100 m and N equals 2, then the second precision is 50 m. If the first precision is 27 m and N equals 3, then the second precision is 9 m. The first-precision first sample DEM and the second-precision target sample DEM are used to train the reconstruction model.

[0030] When training the reconstruction model, the first sample DEM data should be input into the reconstruction model, and the deep residual layer of the reconstruction model should be used to extract the deep feature map of the first sample DEM data.

[0031] Extracting deep feature maps from the first sample DEM data involves multiple steps.

[0032] 1. Refine the precision of the first sample DEM data, adjusting it from a first precision to a second precision. For example, this step can involve defining each grid cell of the first sample DEM data as a first grid cell and obtaining the elevation value of the first grid cell; then dividing each first grid cell of the first sample DEM data into N... 2 The second grid is used; based on the elevation values ​​of the first grid, the resulting N grids are determined. 2 The elevation value of each second grid in each grid.

[0033] In this step, the initial precision is refined to the second precision. This means that one grid of the first sample DEM data will be divided into 4, 9, or more grids. For example, if the original 80*80 first sample DEM data is divided into 9 grids, it will be divided into 240*240 second sample DEM data. The elevation values ​​of the 9 resulting grids can be the same as the original 1 grid. Alternatively, the elevation value of the central grid in the 9 resulting grids can be the same as the original 1 grid, while the elevation values ​​of the remaining 8 grids are adjusted based on the central grid's elevation value.

[0034] This step adjusts the first sample DEM data to the second sample DEM data with the second precision.

[0035] 2. Use the first convolutional kernel of the deep residual layer to extract the initial feature map from the second sample DEM data.

[0036] In this step, the first convolutional kernel of the deep residual layer can be used to extract the initial feature map. The size, number of channels, and stride of the first convolutional kernel can be set. This convolutional kernel is then used to extract the initial feature map from the second sample DEM data.

[0037] 3. Use multiple cascaded residual blocks of the deep residual layer to extract the deep feature map from the initial feature map.

[0038] In this step, the initial feature map can be input into the first residual block of a series of cascaded residual blocks. The outputs of the multiple cascaded residual blocks are processed step by step, and the output of the last residual block is determined as the deep feature map. Each residual block performs the following operations: Local elevation features are extracted from the input feature map using a second convolutional kernel. The size of the second convolutional kernel is smaller than that of the first convolutional kernel, and the number of channels and stride are the same as those of the first convolutional kernel. The local elevation features are normalized using a batch normalization layer. Local elevation features with values ​​greater than zero are activated using an activation layer. Refined features are extracted from the activated local elevation features using a second convolutional kernel. The refined features are normalized using a batch normalization layer. The normalized refined features are then fused with the output of the previous residual block as the input to the next residual block.

[0039] In this step, multiple residual blocks are executed in a cascaded manner. Each residual block processes the data from the previous residual block and outputs it to the next residual block; these multiple residual blocks are executed sequentially. The first residual block obtains the initial feature map extracted from the second sample DEM data by the first convolutional kernel. The first residual block uses a second convolutional kernel, which is smaller in size but has the same number of channels and stride as the first convolutional kernel, to process the initial feature map, extracting local elevation features. Then, a batch normalization layer is used to normalize the local elevation features; an activation layer is used to activate the local elevation features that are greater than zero in the normalized local elevation features; the second convolutional kernel is used to extract refined features from the activated local elevation features; and a batch normalization layer is used to normalize the refined features. Since the first residual block does not have a previous residual block, the normalized refined features are used as output features and output to the second residual block. The second residual block performs the same actions on the input features as the previous residual block. The difference lies in that the second residual block fuses its own output with the output of the previous residual block as the input to the next residual block. Subsequent residual blocks also fuse their own output with the output of the previous residual block as the input to the next residual block, until the last residual block outputs the deep feature map.

[0040] After obtaining the deep feature map, the feature extraction layer of the reconstruction model extracts near-basin area features and slope features from the deep feature map to obtain the reconstructed DEM data of the map area to be processed. This process consists of multiple steps: 1. Use the first deformable convolutional layer to extract the first deformable feature map of the deep feature map; 2. Activate the first deformed feature map using the first activation layer to obtain the first activated feature map; 3. Use a second deformable convolutional layer to extract the second deformable feature map of the first activation feature map; 4. Activate the second deformed feature map using the second activation layer to obtain the second activated feature map; 5. Use a third deformable convolutional layer to extract the third deformable feature map of the second activation feature map; 6. Use fine-tuning convolutional layers to adjust the feature value range of the third deformable feature map to obtain the reconstructed DEM data.

[0041] In this example, the model's feature extraction layers include at least the aforementioned first deformable convolutional layer, second deformable convolutional layer, and third deformable convolutional layer, as well as a first activation layer, a second activation layer, and a fine-tuning convolutional layer. Different layers are used to extract different features. Each deformable convolutional layer and activation layer is used to extract one type of feature. For example, the first deformable convolutional layer and first activation layer can be used to collect one feature from near-basin area features or slope features. The second deformable convolutional layer and second activation layer can be used to collect another feature from near-basin area features or slope features. If this application wishes to collect other features, deformable convolutional layers and activation layers can be added. Finally, after passing through the third deformable convolutional layer and the fine-tuning convolutional layer, the feature value range is adjusted, and the reconstructed DEM data after collecting near-basin area features and slope features is output.

[0042] For step 1, which extracts near-basin area features and slope features to obtain the reconstructed DEM data of the map area to be processed, the first deformable feature map of the deep feature map is extracted using the first deformable convolutional layer. The sampling position of the second convolutional kernel in the first deformable convolutional layer in the deep feature map can be adjusted according to the first sampling offset. The first deformable feature map is obtained by sampling according to the sampling position.

[0043] In this application, the first deformable convolutional layer and the first activation layer are used to extract one of the features from the near-basin area or the slope feature. For example, to extract the near-basin area feature, the second convolutional kernel in the first deformable convolutional layer can adjust the sampling position according to the first sampling offset and sample according to the sampling position to obtain the first deformable feature map.

[0044] In step 2, which involves extracting near-basin area features and slope features to obtain the reconstructed DEM data of the map area to be processed, the first activation layer is used to activate the first deformation feature map, resulting in the first activated feature map. This can be achieved by using the first activation layer to set the output of negative inputs in the first deformation feature map to zero and the output of positive inputs to positive inputs. This activates the positive inputs while activating the negative inputs.

[0045] For step 3, which extracts near-basin area features and slope features to obtain the reconstructed DEM data of the map area to be processed, the second deformable feature map extracted from the first activation feature map using the second deformable convolutional layer can be obtained by adjusting the sampling position of the second convolution kernel in the second deformable convolutional layer according to the second sampling offset in the first activation feature map; and sampling according to the sampling position to obtain the second deformable feature map.

[0046] If the first deformable convolutional layer extracts features from the near-watershed region, then the second deformable convolutional layer extracts slope features. The second deformable convolutional layer uses a second convolutional kernel to adjust the sampling position in the first activated feature map according to a second sampling offset and then samples to obtain the second deformable feature map.

[0047] In step 4, which involves extracting near-basin area features and slope features to obtain the reconstructed DEM data of the map area to be processed, the second activation layer is used to activate the second deformation feature map, resulting in the second activated feature map. This can be achieved by using the second activation layer to set the output of negative inputs in the second deformation feature map to zero and the output of positive inputs to positive inputs. This activates the positive inputs while activating the negative inputs.

[0048] For step 5, which extracts near-basin area features and slope features to obtain the reconstructed DEM data of the map area to be processed, the third deformable feature map of the second activation feature map is extracted using the third deformable convolutional layer. The multi-channel features sampled by the second activation feature map by the second convolution kernel in the third deformable convolutional layer can be compressed into single-channel features to obtain the third deformable feature map.

[0049] In this application, the multi-channel features of the second activation feature map are compressed into single-channel features through the third deformable convolutional layer, thereby retaining the data of one channel and making the output third deformable feature map conform to the format of reconstructed DEM data, with each grid corresponding to a single channel of data.

[0050] In step 6, which involves extracting near-basin area features and slope features to obtain the reconstructed DEM data of the map area to be processed, the feature value range of the third deformation feature map is adjusted using a fine-tuning convolutional layer to obtain the reconstructed DEM data. This adjustment of the feature value range of the third deformation feature map using a 1x1 size third convolutional kernel within the fine-tuning convolutional layer can make the elevation values ​​in the reconstructed DEM data more accurate.

[0051] After the above process, the reconstruction model obtains the reconstructed DEM data using the input first sample DEM data. Next, the total loss needs to be calculated using the reconstructed DEM data and the target sample DEM data, and the model needs to be adjusted to train the reconstruction model.

[0052] The total loss can be calculated using the following formula: (1) in, For the total loss, For the loss of global content, For local near-basin losses, For slope loss, and For weights. Can be set. = 0.001、 = 1 is used to balance the numerical scale of different losses.

[0053] In other words, in this application, the weighted sum of the global content loss, the local near-basin loss, and the slope loss is determined as the total loss (the weight of the global content loss is 1). Therefore, to calculate the total loss, it is necessary to further determine the global content loss, the local near-basin loss, and the slope loss.

[0054] The global content loss can be calculated using the following formula: (2) in, The loss is the global content loss, where N is the number of grid cells in the reconstructed DEM data or the number of grid cells in the target sample DEM data. To reconstruct the elevation values ​​of the corresponding grid in the DEM data, This represents the elevation value of the corresponding grid in the target sample DEM data. Global content loss can optimize global elevation accuracy, ensuring that the overall elevation distribution of the generated DEM is consistent with the real terrain.

[0055] For local near-basin losses, the following formula can be used for calculation: (3) in, For local near-watershed loss, N is the number of grids in the reconstructed DEM data or the number of grids in the target sample DEM data. To reconstruct the DEM data mask, This is a mask for the target sample DEM data. Local near-watershed loss ensures the continuity and location accuracy of linear terrain structures such as streams in the generated DEM.

[0056] To address slope loss, you can first calculate the slope maps of the reconstructed DEM data and the target sample DEM data, and then calculate the slope loss based on the slope maps.

[0057] Slope diagrams can be calculated using the following formula:

[0058]

[0059] (4) in, Here is a slope diagram. For horizontal elevation gradient, The vertical elevation gradient is denoted by s, where s is the resolution of the reconstructed DEM data or the target sample DEM data. The mean square error between the slope maps of the reconstructed DEM data and the target sample DEM data is defined as the slope loss. The horizontal rate of change dx calculates the east-west elevation difference based on the elevation of the right (j+1) and left (j-1) columns of the target grid. The vertical rate of change dy calculates the north-south elevation difference based on the elevation of the lower (i+1) and upper (i-1) rows of the target grid. Slope features can preserve the steepness of terrain undulations (such as hillside slopes), ensuring the physical realism of terrain derivatives.

[0060] After calculating the global content loss, local near-basin loss, and slope loss using the above formulas, and further calculating the total loss, the model parameters are adjusted based on the total loss to make the reconstruction model converge. The reconstruction model can then be used to reconstruct low-precision DEM data to obtain higher-precision reconstructed DEM data.

[0061] The scheme provided in this application involves acquiring sample DEM data, which includes first-precision sample DEM data and second-precision target sample DEM data. The grid side length of the target sample DEM data is 1 / N of the grid side length of the first sample DEM data, where N is a positive integer greater than 1. The first sample DEM data is converted to second-precision second sample DEM data through a deep residual layer of the reconstruction model, and a deep feature map is extracted from the second sample DEM data. Near-basin region features and slope features are extracted from the deep feature map through a feature extraction layer of the reconstruction model, resulting in reconstructed DEM data including near-basin region and slope region. The total loss between the reconstructed DEM data and the target sample DEM data is determined. The parameters of the reconstruction model are adjusted according to the total loss to make the reconstruction model converge, thereby enabling the reconstruction model to learn the near-basin region features and slope features in the DEM data and improve the accuracy of the reconstructed DEM data output by the model.

[0062] Second, use the model, i.e., reconstruct the DEM data.

[0063] After training through the above process, the reconstruction model has converged. The first-precision DEM data of the map area to be processed is then input into the reconstruction model. The model first refines the first DEM data to obtain second-precision DEM data. Then, a deep residual layer is used to extract the deep feature map of the second DEM data. A feature extraction layer is then used to extract near-watershed area features and slope features from the deep feature map, resulting in the reconstructed DEM data of the map area to be processed (the specific process is the same as the processing flow for the first sample DEM data). This completes the reconstruction of the first-precision DEM data into second-precision reconstructed DEM data.

[0064] Figure 3This is a structural diagram of the reconstruction model in this application. It includes a deep residual layer, a feature extraction layer, and a collaborative loss module. The deep residual layer employs a residual learning mechanism (by stacking 16 residual blocks, such as standard convolution, batch normalization, and activation function residual blocks) to capture complex elevation distribution patterns in the DEM data (such as mountain range orientation, stream orientation, and basin undulation), laying the foundation for subsequent refined terrain feature extraction. Considering the irregularity (such as meandering streams, sloping ridges, and canyon depressions) and heterogeneity (such as different elevation values ​​for rivers of different widths and slopes of different gradients), the feature extraction layer dynamically adjusts the sampling position (adaptive sampling) by learning the sampling offset through deformable convolution, enabling the extraction of free-form features (features of different sizes and shapes). The feature extraction layer, constructed through deformable convolution layers, can extract elevation features consistent with the terrain trend from its preceding module, the deep residual layer. The output of the feature extraction layer is the high-precision reconstructed DEM data obtained by the reconstruction model from the input low-precision DEM data. Finally, the model is adjusted by calculating losses using the collaborative loss module.

[0065] The reconstruction process of DEM data is illustrated with an example. For instance, if the initial input DEM data is a 30-meter precision DEM with a size of 3612x3612, it can be divided into 80x80 patches. Then, the model is used to reconstruct each patch. During reconstruction, each grid can be scaled up by 3 times, resulting in a size of 240x240. After reconstruction, each patch is stitched together to form a 10836x10836 reconstructed DEM data. This reduces the amount of GPU memory used.

[0066] Taking the reconstruction of a small 80*80 patch into a 240*240 reconstructed DEM as an example, the 80*80 patch is single-channel data, storing the elevation value of each grid. Using the nearest neighbor difference method, it is enlarged to 240*240. A 9×9 first convolutional kernel (64 channels, stride = 1, covering a larger receptive field to capture the global elevation distribution trend) is used to extract features, generating an initial 240*240 feature map with 64 channels. Then, 16 cascaded residual modules are used to extract features from the initial feature map, resulting in a 240*240, 64-channel deep feature map. Each residual block extracts local elevation features using a 3x3 size, 64-channel, 1-stride second convolutional kernel. These features are then normalized using a batch normalization (BN) layer to reduce interference from extreme elevation values. An activation layer (ReLU) is then applied to introduce non-linearity and improve network stability. Further convolution with the second kernel yields refined features, which are then normalized again using the normalization layer. The normalized refined features are then fused with the output of the previous residual block as the input to the next residual block, continuing until the last residual block outputs a 240x240, 64-channel deep feature map.

[0067] For the acquired deep feature maps, a first deformable convolutional layer is used for convolution. This first deformable convolutional layer uses a 3x3 size, 64-channel deformable convolutional kernel with a stride of 1. The sampling position is adjusted according to a first sampling offset (adapting to terrain features) to capture irregular terrain features (such as river edges), outputting a 240x240 size, 64-channel first deformable feature map. This first deformable feature map is then activated by a first activation layer, which enhances feature discriminative power (filtering invalid features and retaining effective shape signals), resulting in a 240x240 size, 64-channel first activation feature map. The first activation feature map then passes through a second deformable convolutional layer, using a 3x3 size, 64-channel deformable convolutional kernel with a stride of 1, further optimizing the terrain feature sampling accuracy and adapting to smaller-scale terrain (such as streams or slopes), resulting in a 240x240 size, 64-channel second deformable feature map. This second deformable feature map then passes through a second activation layer, resulting in a 240x240 size, 64-channel second activation feature map. The second activation feature map is processed by a third deformable convolutional layer using a 3x3 kernel with a 1-channel stride of 1. This compresses the 64 channels of the second activation feature map into a single channel, resulting in a 240x240, 1-channel third deformable feature map. The third deformable feature map is then fine-tuned by adjusting the 1x1 kernel of the convolutional layer to fine-tune the feature value range, ensuring the output scale matches the true elevation values. This yields a 240x240, 1-channel adaptive topographic map, which is used as the data for DEM reconstruction. The reconstructed 240x240 blocks can be stitched together to form a 10836x10836 overall map.

[0068] Figure 4 This is a schematic diagram of a model training device provided in an embodiment of this application. Figure 4 As shown, it includes: The acquisition module 402 is used to acquire sample DEM data, wherein the sample DEM data includes first sample DEM data with a first precision and target sample DEM data with a second precision, wherein the grid side length of the target sample DEM data is one-Nth of the grid side length of the first sample DEM data, and N is a positive integer greater than 1. The deep residual module 404 is used to convert the first sample DEM data into second sample DEM data with second precision and extract the deep feature map of the second sample DEM data. Feature extraction module 406 is used to extract near-basin area features and slope features from deep feature maps to obtain reconstructed DEM data including near-basin area and slope area; The loss determination module 408 is used to determine the global content loss, local near-basin loss, and slope loss of the reconstructed DEM data and the target sample DEM data; and to determine the total loss through the global content loss, the local near-basin loss, and the slope loss. The adjustment module 410 is used to adjust the parameters of the reconstruction model according to the total loss so that the reconstruction model converges.

[0069] For other examples of this embodiment, please refer to the examples above, which will not be repeated here.

[0070] Figure 5 This is a schematic diagram of a model training device provided in an embodiment of this application. Figure 5 As shown, it includes: The acquisition module 502 is used to acquire the first DEM data of the map area to be processed with the first precision. The conversion module 504 is used to convert the first DEM data into second DEM data with second precision by using the deep residual layer of the reconstructed model; The first extraction module 506 is used to extract the deep feature map of the second DEM data through the deep residual layer, wherein the grid side length of the second DEM data is one-Nth of the grid side length of the first DEM data, and N is a positive integer greater than 1. The second extraction module 508 is used to extract near-basin area features and slope features from the deep feature map through the feature extraction layer of the reconstruction model to obtain the reconstructed DEM data of the map area to be processed. The reconstruction model is a model trained using sample DEM data including near-basin area features and slope features. The accuracy of the reconstructed DEM data is greater than that of the first DEM data.

[0071] like Figure 6 As shown in the figure, this application provides an electronic device, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114. Memory 113 is used to store computer programs; In one embodiment of this application, the processor 111, when executing the program stored in the memory 113, implements the model training method or the DEM data reconstruction method provided in any of the foregoing method embodiments.

[0072] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the model training method or the DEM data reconstruction method provided in any of the foregoing method embodiments.

[0073] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0074] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0075] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0076] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A model training method, characterized in that, The method comprises: obtaining sample DEM data, wherein the sample DEM data comprises first sample DEM data of a first precision and target sample DEM data of a second precision, the grid length of the target sample DEM data is 1 / N of the grid length of the first sample DEM data, N is a positive integer greater than 1; converting the first sample DEM data into second sample DEM data of the second precision through a depth residual layer of a reconstruction model and extracting a deep feature map of the second sample DEM data; extracting near-basin region features and slope features from the deep feature map through a feature extraction layer of the reconstruction model to obtain reconstruction DEM data comprising a near-basin region and a slope region; determining a global content loss, a local near-basin loss, and a slope loss of the reconstruction DEM data and the target sample DEM data; determining a total loss through the global content loss, the local near-basin loss, and the slope loss; adjusting parameters of the reconstruction model according to the total loss to make the reconstruction model converge.

2. The method of claim 1, wherein, Determining the global content loss of the reconstruction DEM data and the target sample DEM data comprises: calculating the global content loss through the following formula: wherein, is the global content loss, N is the number of grids of the reconstructed DEM data or the number of grids of the target sample DEM data, is the elevation value of the corresponding grid in the reconstructed DEM data, is the elevation value of the corresponding grid in the target sample DEM data.

3. The method of claim 1, wherein, Determining the local near-basin loss of the reconstruction DEM data and the target sample DEM data comprises: calculating the local near-basin loss through the following formula: wherein, is the local near flow area loss, N is the number of grids of the reconstructed DEM data or the number of grids of the target sample DEM data, is the mask of the reconstructed DEM data, is the mask of the target sample DEM data.

4. The method of claim 1, wherein, Determining the slope loss of the reconstruction DEM data and the target sample DEM data comprises: calculating the slope map of the reconstruction DEM data and the target sample DEM data through the following formula: wherein, is the slope map, is the horizontal elevation gradient, is the vertical elevation gradient, s is the resolution of the reconstructed DEM data or the resolution of the target sample DEM data; determining the mean square error of the slope map of the reconstruction DEM data and the slope map of the target sample DEM data as the slope loss.

5. The method of claim 1, wherein, Determining the total loss through the global content loss, the local near-basin loss, and the slope loss comprises: calculating the total loss through the following formula: wherein, is the total loss, is the global content loss, is the local near-watershed loss, is the slope loss, and is a weight.

6. A method of reconstructing DEM data, characterized by, The method comprises: obtaining first DEM data of a first precision of a to-be-processed map region; converting the first DEM data into second DEM data of a second precision through a depth residual layer of a reconstruction model; extracting a deep feature map of the second DEM data through the depth residual layer, wherein the grid length of the second DEM data is 1 / N of the grid length of the first DEM data, N is a positive integer greater than 1; extracting near-basin region features and slope features from the deep feature map through a feature extraction layer of the reconstruction model to obtain reconstruction DEM data of the to-be-processed map region, wherein the reconstruction model is a model trained using sample DEM data comprising near-basin region features and slope features, and the precision of the reconstruction DEM data is higher than that of the first DEM data.

7. The method of claim 6, wherein, Converting the first DEM data into second DEM data of the second precision through a depth residual layer of a reconstruction model comprises: determining each grid of the first DEM data as a first grid and obtaining the elevation value of the first grid; dividing each of the first grids of the first DEM data into N 2 second grids; Based on the elevation values ​​of the first grid, determine the N values ​​after partitioning. 2 The elevation value of each second grid in each grid.

8. The method of claim 6, wherein, extracting a deep feature map of the second DEM data through the depth residual layer comprises: extracting an initial feature map from the second DEM data using a first convolution kernel of the deep residual layer; extracting the deep feature map from the initial feature map using a plurality of residual blocks connected in series.

9. The method of claim 8, wherein, extracting the deep feature map from the initial feature map using a plurality of residual blocks connected in series includes: inputting the initial feature map into a first residual block of the plurality of residual blocks connected in series, and performing processing on outputs of the plurality of residual blocks connected in series step by step, and determining an output of a last residual block as the deep feature map, and each of the residual blocks performs the following operations: extracting local elevation features from the input feature map using a second convolution kernel, the second convolution kernel having a size smaller than that of the first convolution kernel and the same number of channels and step as the first convolution kernel; performing normalization on the local elevation features using a batch normalization layer; activating local elevation features greater than zero in the normalized local elevation features using an activation layer; extracting refined features from the activated local elevation features using the second convolution kernel; and normalizing the refined features using the batch normalization layer; and fusing the normalized refined features with an output of a previous residual block as an input of a next residual block.

10. The method of claim 6, wherein, extracting near-basin area features and slope features from the deep feature map through a feature extraction layer of the reconstruction model to obtain the reconstructed DEM data of the to-be-processed map area includes: extracting a first deformation feature map of the deep feature map using a first deformable convolution layer; activating the first deformation feature map using a first activation layer to obtain a first activated feature map; extracting a second deformation feature map of the first activated feature map using a second deformable convolution layer; activating the second deformation feature map using a second activation layer to obtain a second activated feature map; extracting a third deformation feature map of the second activated feature map using a third deformable convolution layer; adjusting a feature value range of the third deformation feature map using a fine-tuning convolution layer to obtain the reconstructed DEM data.

11. The method of claim 10, wherein, extracting a first deformation feature map of the deep feature map using a first deformable convolution layer includes: adjusting a sampling position of a second convolution kernel in the first deformable convolution layer in the deep feature map according to a first sampling offset; sampling according to the sampling position to obtain the first deformation feature map.

12. The method of claim 10, wherein: activating the first deformation feature map using a first activation layer to obtain a first activated feature map includes outputting a negative input in the first deformation feature map as zero and outputting a positive input in the first deformation feature map as the positive input; or activating the second deformation feature map using a second activation layer to obtain a second activated feature map includes outputting a negative input in the second deformation feature map as zero and outputting a positive input in the second deformation feature map as the positive input.

13. The method of claim 10, wherein, extracting a second deformation feature map of the first activated feature map using a second deformable convolution layer includes: adjusting a sampling position of a second convolution kernel in the second deformable convolution layer in the first activated feature map according to a second sampling offset; sampling the second activation feature map using a third deformable convolution layer includes:

14. The method of claim 10, wherein, compressing, by a second convolution kernel in the third deformable convolution layer, multi-channel features sampled by the second activation feature map into single-channel features to obtain the third deformable feature map. adjusting, by a fine-tuning convolution layer, a feature value range of the third deformable feature map to obtain the reconstructed DEM data includes:

15. The method of claim 10, wherein, adjusting, by a third convolution kernel of 1*1 size in the fine-tuning convolution layer, a feature value range of the third deformable feature map to obtain the reconstructed DEM data. comprises:

16. A model training apparatus, comprising: an acquisition module, configured to acquire sample DEM data, wherein the sample DEM data comprises first sample DEM data of a first precision and target sample DEM data of a second precision, a grid side length of the target sample DEM data is 1 / N of a grid side length of the first sample DEM data, N is a positive integer greater than 1; a deep residual module, configured to convert the first sample DEM data into second sample DEM data of the second precision and extract a deep feature map of the second sample DEM data; a feature extraction module, configured to extract near-basin area features and slope features from the deep feature map to obtain reconstructed DEM data comprising a near-basin area and a slope area; a loss determination module, configured to determine a global content loss, a local near-basin loss, and a slope loss of the reconstructed DEM data and the target sample DEM data; and determine a total loss based on the global content loss, the local near-basin loss, and the slope loss; an adjustment module, configured to adjust parameters of a reconstruction model based on the total loss to make the reconstruction model converge. comprises:

17. A reconstruction apparatus of DEM data, characterized by, an acquisition module, configured to acquire first DEM data of a first precision of a to-be-processed map area; a conversion module, configured to convert the first DEM data into second DEM data of a second precision by a deep residual layer of a reconstruction model; a first extraction module, configured to extract a deep feature map of the second DEM data by the deep residual layer, wherein a grid side length of the second DEM data is 1 / N of a grid side length of the first DEM data, N is a positive integer greater than 1; a second extraction module, configured to extract near-basin area features and slope features from the deep feature map by a feature extraction layer of the reconstruction model to obtain reconstructed DEM data of the to-be-processed map area, wherein the reconstruction model is a model trained using sample DEM data comprising the near-basin area features and the slope features, and a precision of the reconstructed DEM data is higher than a precision of the first DEM data. comprises:

18. An electronic device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; ​ at least one memory connected to the at least one bus, wherein the memory stores a computer program, and wherein the processor executes the computer program to implement the model training method in any one of claims 1 to 5 or the DEM data reconstruction method in any one of claims 6 to 15.

19. A computer readable storage medium, characterized in that, The storage medium stores computer executable instructions for executing the model training method in any one of claims 1 to 5 or the DEM data reconstruction method in any one of claims 6 to 15.

Citation Information

Patent Citations

  • Mountain surface multi-scale DEM modeling method and system based on fused topographic features

    CN117172134A

  • DEM reconstruction model training method and DEM reconstruction method

    CN118037976A

  • DEM super-resolution reconstruction method and system based on state space model

    CN118887090A

  • Meteorological downscaling method based on space-time fusion and physical constraint

    CN121074707A

  • Flow-aligned spatially-adaptive convolution

    WO2023083476A1

Cited By

  • Method and device for training DEM data reconstruction model in combination with map data, equipment and medium

    CN121391614A

  • Method, device and equipment for training DEM data reconstruction model in combination with map data and medium

    CN121391614B