A ramp unit extraction method
By using a multi-source fusion feature tensor based on physical constraints and the TerrainNet deep learning model, combined with local orientation vector calculation and tolerance capture, the problems of fracture and topological disconnection in slope element extraction in existing technologies are solved. This achieves high-precision generation of planar polygons for slope elements, improving the automation level and engineering applicability of the extraction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-06
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies, when extracting slope units, are prone to disrupting the physical spatial logic due to the fusion of multi-source heterogeneous terrain data. Deep learning models are susceptible to interference from redundant textures and lack topological connectivity constraints when extracting slender terrain feature lines, resulting in broken and discontinuous predicted images that are difficult to generate topologically closed slope unit polygons.
A physical constraint-based multi-source fusion feature tensor construction method is adopted, combined with the TerrainNet deep learning model, including a large receptive field spatial attention mechanism, a bidirectional feature decoding mechanism, and a multi-objective joint loss function, to predict feature lines, and to perform topological extension closure processing through local direction vector calculation and tolerance capture.
It effectively preserves the spatial logic of multi-source heterogeneous data, improves the high-precision anti-interference extraction of slender terrain feature lines and the automated topology repair of broken line segments, generates topologically complete slope unit planar polygons, and improves the automation level and engineering applicability of slope unit extraction in complex terrain environments.
Smart Images

Figure CN122132761A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geological engineering technology, and in particular to a method for extracting slope units. Background Technology
[0002] Evaluation units are the basic spatial carriers for assessing the susceptibility and risk of geological hazards. For a long time, regular grid units have dominated regional assessments due to their standardized data structure. However, as research has deepened towards refinement and mechanistic analysis, the limitations of grid units—such as mechanically cutting through geological bodies and disrupting slope integrity—have become increasingly apparent. In contrast, slope units, naturally divided based on hydrological watersheds and runoff lines, can more realistically depict the three-dimensional spatial morphology of slopes and have become the mainstream choice for refined assessments.
[0003] Currently, slope unit extraction techniques mainly include methods based on hydrological process analysis (such as the r.slopeunits algorithm) and methods based on geomorphological features. However, when facing the complex landforms of the Loess Plateau in my country, especially the Loess Plateau region, characterized by "flat tops and steep sides" and "crisscrossing gullies," existing technologies face serious bottlenecks: hydrological analysis methods are sensitive to thresholds, easily leading to over-segmentation of complete slopes or blurred boundaries; morphological methods struggle to identify abrupt transition lines between the plateau surface and the slope; while conventional deep learning methods possess powerful feature extraction capabilities, they often neglect the physical dimensions of topographic data, and when dealing with linear features with extremely low pixel percentages (less than 5%), they suffer from severe sample imbalance, resulting in severely broken extracted feature lines that cannot be directly closed to form usable areal evaluation units.
[0004] In summary, existing technologies struggle to effectively correlate and analyze limited topographic data, resulting in severely fragmented and blurred topographic feature lines that fail to form closed planar slope units. Consequently, the internal attributes (such as slope, stratigraphic lithology, and hydrological conditions) of the divided evaluation units are highly mixed, severely weakening the geological representativeness and physical mechanism adaptability of the evaluation units. Ultimately, this leads to insufficient accuracy and reliability in the geological hazard susceptibility assessment results, making it difficult to meet the actual needs of refined disaster mechanism revelation and risk management. Summary of the Invention
[0005] This application provides a slope unit extraction method to at least solve the problems in the prior art, such as the easy destruction of physical spatial logic when fusing multi-source heterogeneous terrain data, the easy interference of redundant textures and lack of topological connectivity constraints when deep learning models extract slender terrain feature lines, and the difficulty in generating topologically closed slope unit polygons due to broken and disconnected prediction maps.
[0006] In a first aspect, this application provides a method for extracting slope elements, the method comprising: Based on the acquisition of multi-source terrain data of the target area, physical constraint-based preprocessing and multi-scale feature extraction are performed to construct a multi-source fusion feature tensor. The multi-source fusion feature tensor is used to represent the channel cascaded data of fused remote sensing image spectral features, elevation features and multi-scale terrain location index features. The multi-source fusion feature tensor is input into the TerrainNet deep learning model to obtain the initial terrain feature line prediction map. The TerrainNet deep learning model includes an encoder, a large receptive field spatial attention mechanism, a bidirectional feature decoding mechanism, and a multi-objective joint loss function. The initial terrain feature line prediction map is used to characterize the probability distribution of valley lines and ridge lines in the target area. The output processing is based on the predicted map of the initial terrain feature lines to generate slope units for several target areas. The slope units are used to represent planar polygons. The output processing includes identifying hanging endpoints, obtaining local orientation vectors, and topological extension and closure processing.
[0007] The above technical solution constructs a multi-source fusion feature tensor based on physical constraints, relies on the TerrainNet model integrating large receptive field spatial attention and bidirectional feature decoding mechanism for feature line prediction, and finally combines local direction vector calculation and tolerance capture for topological extension and closure. This achieves the technical effects of effectively preserving the spatial logic of multi-source heterogeneous data, high-precision anti-interference extraction of slender terrain feature lines, and automated topological repair and closure of broken line segments. Its beneficial effects are that it overcomes the defects of existing technologies such as large redundancy interference of terrain texture, topological disconnection of predicted feature lines, and difficulty in effectively constructing slope units due to broken lines. It improves the automation level, topological integrity, and engineering applicability of slope unit planar polygon extraction in complex terrain environments.
[0008] Secondly, this application provides a slope element extraction system, the system comprising: The feature tensor construction module is used to perform physical constraint-based preprocessing and multi-scale feature extraction based on the acquired multi-source terrain data of the target area, and construct a multi-source fusion feature tensor. The multi-source fusion feature tensor is used to represent the channel cascaded data of fused remote sensing image spectral features, elevation features and multi-scale terrain location index features. The feature line prediction module is used to input the multi-source fused feature tensor into the TerrainNet deep learning model to obtain the initial terrain feature line prediction map. The TerrainNet deep learning model includes an encoder, a large receptive field spatial attention mechanism, a bidirectional feature decoding mechanism, and a multi-objective joint loss function. The initial terrain feature line prediction map is used to characterize the probability distribution of valley lines and ridge lines in the target area. The slope unit generation module is used to process the output based on the initial terrain feature line prediction map and generate slope units for several target areas. The slope units are used to represent planar polygons. The output processing includes identifying hanging endpoints, obtaining local orientation vectors, and topological extension and closure processing.
[0009] Thirdly, this application provides an electronic device comprising one or more processors and one or more memories, wherein at least one piece of program code is stored in the one or more memories, the program code being loaded and executed by the one or more processors to implement the operations performed by the ramp element extraction method.
[0010] Fourthly, this application also provides a computer-readable storage medium storing at least one piece of program code, which is loaded and executed by a processor to implement the operations performed by the ramp element extraction method.
[0011] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described ramp element extraction methods. Attached Figure Description
[0012] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0013] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 1 ; Figure 2 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 2 ; Figure 3 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 3 ; Figure 4 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 4 ; Figure 5 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 5 ; Figure 6 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 6 ; Figure 7 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 7 ; Figure 8 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 8 ; Figure 9 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 9 ; Figure 10 A flowchart illustrating a slope element extraction method provided in this application embodiment. Figure 10 ; Figure 11 This is a schematic diagram of a slope unit extraction system provided in an embodiment of this application; Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0015] 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, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0016] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0017] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] In related technologies, slope unit extraction typically relies on hydrological analysis algorithms based on Digital Elevation Models (DEMs) or edge detection and segmentation methods based on single remote sensing images. However, existing technologies have the following limitations in practical applications: Firstly, when fusing multi-source heterogeneous terrain data, physical constraint mechanisms are often lacking, and conventional data augmentation operations can easily disrupt the elevation dimensions of the DEM and the true spatial topological logic, leading to the introduction of false features into the model. Secondly, ridgelines and valley lines are typical slender, low-frequency topological structures. Conventional convolutional networks have limited receptive fields, making it difficult to filter out complex micro-topographic redundant texture interference, and conventional classification loss functions cannot constrain the topological connectivity of lines, resulting in predicted feature lines being prone to breakage and fragmentation. Furthermore, the probability maps directly output by deep learning models inevitably contain a large number of broken lines (hanging nodes). Existing technologies usually rely on manual intervention or complex global graph theory algorithms for repair, making it difficult to achieve local adaptive automatic extension and closure of broken lines, ultimately resulting in the inability to effectively construct a complete and closed slope unit planar polygon network. The Digital Elevation Model refers to the digital simulation of ground terrain using limited terrain elevation data.
[0019] To address the aforementioned technical challenges, this application proposes a slope unit extraction method. First, a multi-source fusion feature tensor is constructed through physical constraint-based differential data augmentation and multi-scale feature extraction, ensuring the physical rationality and spatial consistency of heterogeneous data fusion. Second, a TerrainNet deep learning model integrating a large receptive field spatial attention mechanism, a bidirectional feature decoding mechanism, and a multi-objective joint loss function is introduced, effectively suppressing terrain texture redundancy interference and significantly improving the extraction accuracy and topological connectivity of slender feature lines. Finally, for suspended nodes in the predicted map, a post-processing strategy based on local orientation vector calculation and tolerance-based capture of topological extension closure is proposed, achieving automated repair and network splicing of broken feature lines, thereby generating topologically complete slope unit planar polygons with high fidelity and full automation.
[0020] The slope unit extraction method and system provided in this application can be widely used in fields such as geographic information, engineering geology, and disaster prevention and mitigation, which require refined spatial division of complex terrain, geomorphological feature analysis, and surface process simulation. Typical application scenarios include, but are not limited to, the following: 1. Scenarios for assessing the susceptibility to geological disasters in complex mountainous areas In geological hazard investigations such as landslides and collapses, slope units are considered more consistent with geomechanical mechanisms than regular grids. In this scenario, this application utilizes physically constrained multi-source fusion feature tensors to effectively penetrate the interference of complex vegetation cover and accurately extract the ridgeline and valleyline frameworks. Combined with automatic topological extension and closure processing of broken feature lines, it efficiently generates large-area, unbroken closed slope unit polygons. This provides high-precision base map data for subsequent extraction of hazard-causing factors such as slope gradient and aspect of each slope, as well as for large-scale geological hazard zoning, avoiding the pain point of traditional methods where slope unit meshing is impossible due to line segment breaks, requiring extensive manual repair.
[0021] 2. Scenarios for Site Selection and Slope Stability Analysis in Major Engineering Corridors In the surveying and design phases of mountainous highways, railways, and ultra-high-voltage transmission lines, it is crucial to accurately identify the state of mountain cutting to avoid unstable slopes. In this scenario, facing areas with fragmented terrain due to human engineering activities or fault cutting, this application leverages the large receptive field spatial attention mechanism of the TerrainNet model to filter redundant micro-topographic textures and extract feature line prediction maps reflecting the true terrain trend. Through local directional vector calculation and tolerance capture, it automatically repairs fractured terrain lines, thereby quickly constructing a slope unit network that conforms to the actual terrain watershed and catchment area, assisting engineers in 3D field analysis and fill / cut volume estimation.
[0022] 3. Soil and water loss monitoring and fine-grained small watershed delineation scenarios Soil erosion primarily occurs on hillsides, and its runoff process is strictly controlled by ridgelines and valley lines. In this scenario, the bidirectional feature decoding mechanism provided in this application, combined with a multi-objective joint loss function, ensures the absolute topological connectivity of the extracted valley lines (runoff channels). The resulting closed slope units can serve as the foundational spatial computational units for distributed hydrological models and high-precision soil erosion models (such as the Revised Universal Soil Loss Equation, RUSLE), helping water conservancy or environmental protection departments accurately calculate soil erosion in different micro-watersheds and implement targeted ecological restoration projects.
[0023] The technical solutions provided in the embodiments of this application are described below. (See also...) Figure 1 The slope element extraction method includes the following steps.
[0024] Step S101: Based on the multi-source terrain data of the target area, perform physical constraint-based preprocessing and multi-scale feature extraction to construct a multi-source fusion feature tensor.
[0025] In practical terrain analysis scenarios, a single data source often fails to fully depict complex surface morphology. While remote sensing imagery is rich in land cover and spectral texture information, it is easily obscured by vegetation, buildings, and other features; and while digital elevation models (DEMs) can reflect the actual undulations of bare land, they lack intuitive features of surface material composition. Therefore, this embodiment first acquires multi-source terrain data for the target area. To ensure that heterogeneous data can be effectively understood by the deep learning model in the same dimension, physical constraint-based preprocessing is required. Here, physical constraints mainly refer to ensuring that the spatial coordinate system, resolution alignment, and relative spatial logic of terrain elevation are not disrupted when performing registration, cropping, and other operations on multi-source data.
[0026] Based on preprocessing, multi-scale feature extraction is further performed, such as calculating the Topographic Position Index (TPI) under different neighborhood windows. The Topographic Position Index reflects the location of a local terrain feature, such as a ridge, valley, slope, or flat area. In this application, the TPI is obtained by calculating the difference between the elevation of the center pixel and the average elevation of its neighborhood. By setting multiple neighborhood analysis windows of different sizes to extract multi-scale TPI features, terrain details in micro and macro geomorphic forms within different spatial ranges can be effectively identified. That is, in this embodiment, the multi-scale Topographic Position Index features can effectively identify micro and macro geomorphic forms in ridges, valleys, slopes, or flat areas within different spatial ranges. Finally, the extracted remote sensing image spectral features, elevation features, and multi-scale Topographic Position Index features are cascaded along the channel dimension. Here, the multi-source fusion feature tensor is used to represent the channel cascaded data that fuses the remote sensing image spectral features, elevation features, and multi-scale Topographic Position Index features. In this way, an input data block containing rich multimodal information is constructed, providing a high-quality data foundation for subsequent deep learning models to accurately capture the terrain skeleton.
[0027] Step S102: Input the multi-source fusion feature tensor into the TerrainNet deep learning model to obtain the initial terrain feature line prediction map.
[0028] Ridge lines and valley lines typically exhibit long, continuous, and wide-span low-frequency topological structures in space. Traditional convolutional neural networks are susceptible to interference from minor local topographical undulations, such as micro-landforms and artificially cut slopes, when processing these features, leading to discontinuous or offset extracted feature lines. To address this issue, this embodiment employs a specially designed TerrainNet deep learning model.
[0029] Specifically, the TerrainNet deep learning model refers to the deep learning network model specifically designed and adopted in this application embodiment, used to extract and output a probability map of terrain feature lines from a multi-source fused feature tensor. This model not only includes a conventional encoder but also integrates a large receptive field spatial attention mechanism, a bidirectional feature decoding mechanism, and a multi-objective joint loss function to overcome texture interference and topological breakage problems during the extraction of long, thin linear features. The large receptive field spatial attention mechanism is a feature selection mechanism that allows the network to comprehensively consider long-distance spatial context information when judging the current pixel. In this application, the receptive field is expanded by using large-size convolutional kernels, and a spatial attention weight matrix is calculated to strengthen long-distance feature responses that conform to macroscopic terrain trends and suppress redundant interference noise from local non-terrain skeletons, such as micro-topography and artificial slope cutting. The bidirectional feature decoding mechanism refers to a processing mechanism that uses a bottom-up and top-down bidirectional path for feature refinement during the upsampling and restoration of the spatial resolution of the feature map, and combines channel dimension weight learning for cross-layer fusion. In this application, it is used to finely preserve the edge details and structural information of terrain feature lines, ensuring that the feature lines do not shift positionally when restoring details. A multi-objective joint loss function refers to a loss calculation function that simultaneously considers classification accuracy and topological constraints during the model training phase. In this application, it integrates the "pixel-level classification loss" obtained by calculating the error per pixel and the "topological connectivity preservation loss" obtained by simulating skeleton similarity using a differentiable operator, and performs a weighted summation through a dynamic weight allocation mechanism to force the model to maintain the macroscopic coherence of the feature line network.
[0030] When the multi-source fusion feature tensor is input into the TerrainNet deep learning model, the encoder is responsible for extracting abstract semantic features layer by layer from the multimodal data. The large receptive field spatial attention mechanism gives the model a broader perspective, enabling it to comprehensively refer to long-distance spatial context information when determining whether the current pixel is a feature line, thereby effectively filtering out local terrain texture noise and focusing on the true macroscopic terrain direction. The bidirectional feature decoding mechanism is used to finely preserve the edge details and structural information of the feature lines during the process of restoring the spatial resolution of the feature map. During the training phase of the TerrainNet deep learning model, the multi-objective joint loss function constrains the model from multiple optimization dimensions, guiding the TerrainNet deep learning model to not only focus on the accuracy of classification, but also on the structural integrity of the feature lines.
[0031] After the forward inference calculations of the TerrainNet deep learning model, the final output of the TerrainNet deep learning model is a probability map, namely the initial terrain feature line prediction map. This initial terrain feature line prediction map is used to represent the probability distribution of valley lines and ridge lines in the target area. In this prediction map, the value of each pixel represents the confidence level that the location belongs to a ridge line or valley line, for example, a value between 0 and 1. The higher the value, the greater the probability that the location is at a terrain watershed or runoff line.
[0032] Step S103: Based on the initial terrain feature line prediction map, perform output processing to generate slope units for several target areas.
[0033] It should be noted that, due to limitations in deep learning models during image block prediction, such as edge effects, complex terrain occlusion, or inherent data limitations, the initial terrain feature line prediction map, after threshold binarization, inevitably contains a certain number of "broken lines," meaning line segments do not fully extend to intersect and have free endpoints. If these broken feature lines are directly used to delineate the terrain, closed geometric regions cannot be formed, and slope units with practical engineering significance cannot be obtained.
[0034] Therefore, the initial terrain feature line prediction map must undergo specialized output processing, which includes identifying hanging endpoints, obtaining local directional vectors, and performing topological extension and closure processing. First, nodes with a degree of 1 are searched in the binarized feature line network and identified as hanging endpoints. Second, for these hanging endpoints, the original extension trend of their respective line segments is analyzed, and a local directional vector representing their potential future trajectory is calculated. Subsequently, based on this local directional vector, topological extension is performed, exploring outwards under predefined logical rules. When the extended trajectory captures another feature line or node within a reasonable tolerance range, closure processing is performed, connecting the two line segments.
[0035] Through the aforementioned processes of "finding breakpoints, determining directions, and automatically connecting lines," the originally fragmented network of terrain feature lines was repaired into a topologically connected and structurally complete ridge-valley skeleton network. Since ridgelines form watershed boundaries and valley lines form water collection channels, their natural interweaving divides the target area's spatial surface into several relatively independent plots. Finally, based on these closed feature line networks, polygonal surface regions are generated to obtain the required slope units. These slope units represent planar polygons with closed boundaries. Planar polygons are terrain units with closed boundaries, enclosed by ridgelines and valley lines, realistically reflecting a complete slope surface in nature. This provides the most basic and topologically reasonable spatial computational unit for subsequent applications such as geological hazard assessment and soil erosion calculation.
[0036] The above embodiments construct a multi-source fusion feature tensor based on physical constraints, rely on the TerrainNet model integrating a large receptive field spatial attention mechanism and a multi-objective joint loss function for feature line prediction, and combine local direction vector calculation and tolerance capture to automatically extend and close the topology of broken lines. This achieves the technical effects of effectively preserving the spatial logic of heterogeneous data, extracting slender terrain skeleton lines with high precision and noise resistance, and automatically repairing and connecting broken line networks. Its beneficial effect is that it can automatically generate topologically complete and closed slope unit planar polygons, fundamentally overcoming the defect of traditional deep learning methods that cannot construct networks due to the easy breakage of feature lines, eliminating tedious manual repair work, and providing a high-quality spatial computing base that conforms to the real landform for practical engineering such as geological disaster assessment and soil erosion calculation.
[0037] It should be noted that the above steps S101-S103 are a simplified description of the embodiments provided in this application.
[0038] The following will provide a more detailed explanation of step S101 of the embodiments of this application, which involves preprocessing based on physical constraints and extracting multi-scale features from multi-source terrain data of the target area, and constructing a multi-source fusion feature tensor, using some examples. (See [link to relevant documentation]). Figure 2 Specifically, it includes the following steps.
[0039] Step S201: Based on the multi-source terrain data of the target area, perform differential data standardization processing to obtain standardized remote sensing images and standardized digital elevation model data.
[0040] Specifically, the acquired multi-source topographic data of the target area includes at least remote sensing imagery and digital elevation model (DEM) data. Because these two types of data have fundamentally different physical properties and numerical distributions—for example, remote sensing imagery is a two-dimensional matrix distribution of spectral reflectance, while in this application, DEM data is a three-dimensional surface undulation data with clear physical dimensions, such as elevation in meters—capable of reflecting the actual undulations of bare land, but lacking intuitive characteristics of surface material composition. Therefore, a single normalization method cannot be used. This embodiment performs differentiated data standardization processing: for remote sensing images, conventional pixel value stretching or normalization to the [0,1] interval is used to unify spectral radiance; for digital elevation model data, standardization processing involving elevation benchmark alignment and elimination of abnormal elevation values is used. While preserving the physical logic of relative topographic undulations, the values are mapped to an interval suitable for neural network calculation, thereby obtaining standardized remote sensing imagery and standardized digital elevation model data respectively.
[0041] Step S202: Based on standardized digital elevation model data, perform multi-scale terrain location index extraction processing to obtain multi-scale terrain location index features.
[0042] Topographic location refers to the ability of a Topographic Index (TPI) to effectively reflect the geomorphic location of a local terrain, such as a ridge, valley, slope, or flat area. Relying solely on a single-scale TPI makes it difficult to simultaneously capture both macroscopic mountain range trends and microscopic valley details. Therefore, this embodiment, based on standardized digital elevation model (DEM) data, sets multiple neighborhood analysis windows of different sizes. For example, small windows capture micro-topographical abrupt changes, while large windows reflect macroscopic mountain outlines. The difference between the elevation of the central pixel and the average elevation of its neighborhood is calculated for each window. After multi-window calculation, multi-scale topographic location index features that characterize the topographic undulations of the target area at different spatial scales are extracted. These features exist in the form of a multi-channel two-dimensional matrix.
[0043] Step S203: Based on standardized remote sensing images, standardized digital elevation model data, and multi-scale terrain location index features, perform physical constraint-based differential data augmentation to obtain enhanced multi-source terrain feature data.
[0044] In deep learning model training, data augmentation is a common method to expand the sample size. However, for terrain data, conventional image augmentation operations can easily destroy the physical realism of the terrain. In this embodiment, "differentiation" refers to adopting different augmentation strategies for different types of data features; "based on physical constraints" means that when performing spatial geometric transformations, such as rotation, cropping, and translation, it is essential to ensure absolute synchronization and consistency in spatial coordinates among the standardized remote sensing image, standardized digital elevation model data, and multi-scale terrain location index features, strictly prohibiting any misalignment. Simultaneously, since standardized digital elevation model data and multi-scale terrain location index features have clear spatial directional physical meanings, such as the direction of ridges and the elevation gradient between windward and leeward slopes, they must be strictly limited or specially processed when performing operations such as mirroring to avoid artificially creating "pseudo-terrain" that violates the logic of gravity and real landforms. Through this differentiated augmentation under physical constraints, both the diversity of the samples is expanded, and the physical rationality and authenticity of the augmented multi-source terrain feature data are guaranteed.
[0045] Step S204: Based on the enhanced multi-source terrain feature data, perform cascade processing in the channel dimension to construct a multi-source fusion feature tensor.
[0046] After the above processing steps, the data of the target area is transformed into multiple two-dimensional matrices with consistent spatial dimensions (i.e., the same length and width in pixels) but different feature contents. To enable the deep learning network to simultaneously perceive this heterogeneous information, this embodiment performs cascading processing along the channel dimension. That is, the spectral channel of the enhanced standardized remote sensing image, the elevation channel of the standardized digital elevation model data, and the multiple scale channels of the multi-scale topographic position index features are concatenated end-to-end along the channel axis of the deep learning tensor in a predetermined order. The resulting multi-source fusion feature tensor, at each pixel coordinate point, simultaneously integrates the "surface color / material information, i.e., spectrum," "absolute spatial location information, i.e., elevation," and "macro- and micro-level relative topographic location information, i.e., multi-scale topographic position index features" at that location, providing a complete and spatially strictly aligned three-dimensional input data structure for high-precision feature extraction in subsequent models.
[0047] This embodiment employs differentiated data standardization for remote sensing imagery and digital elevation model data, extracts multi-scale topographic location index features, and combines a physically constrained differentiated data enhancement strategy with cascading along the channel dimension. This achieves the technical effects of unifying the numerical distribution of heterogeneous data, comprehensively capturing multi-scale geomorphic details, and effectively expanding sample diversity while avoiding the generation of "pseudo-topography" that violates geomorphic logic. Its beneficial effects are that it provides a high-quality multi-source fusion input base that is complete in information, physically realistic, and spatially strictly aligned, fundamentally avoiding the problems of feature space misalignment or model learning errors caused by improper data preprocessing, and significantly improving the accuracy and reliability of subsequent complex terrain feature extraction.
[0048] In some embodiments, see Figure 3 This paper details the physical-constrained differential data augmentation process performed on standardized remote sensing images, standardized digital elevation model data, and multi-scale topographic location index features to obtain enhanced multi-source topographic feature data. The process includes the following steps: Step S301: Based on the standardized remote sensing image, standardized digital elevation model data, and multi-scale topographic location index features, perform synchronous geometric transformation processing that preserves morphology to obtain the geometrically transformed standardized remote sensing image, standardized digital elevation model data, and multi-scale topographic location index features.
[0049] Specifically, since multi-source terrain data includes remote sensing images with two-dimensional planar attributes and DEM and TPI data representing three-dimensional undulations, it is essential to ensure the consistency of absolute spatial coordinates between them when performing spatial data augmentation. This embodiment employs synchronous, morphology-invariant geometric transformation processing, including operations such as random cropping, translation, or rigid rotation. "Morphology-invariant" here means that the transformation process strictly follows rigid body transformation rules, without altering the original relative elevation and undulation morphology, slope magnitude, and topological structure of the terrain, deliberately avoiding distortions of the landform framework such as ridges and valleys caused by nonlinear transformations such as elastic deformation and perspective distortion. By applying identical geometric transformation matrix parameters to the three types of data, it is ensured that the transformed remote sensing images, digital elevation model data, and multi-scale terrain location index features remain aligned at the pixel level, maintaining the spatial mapping relationship between the multi-source heterogeneous data without disruption.
[0050] Step S302: Based on the normalized remote sensing image after geometric transformation, perform intensity transformation and Gaussian noise injection processing to obtain a texture-enhanced remote sensing image.
[0051] After completing the spatial geometric transformation, considering the potential impact of varying lighting conditions, atmospheric scattering, cloud cover, or sensor errors on remote sensing images acquired by different satellite sensors in real-world environments, this embodiment specifically performs intensity transformation on the geometrically transformed remote sensing images. This includes randomly adjusting contrast and brightness, and injecting Gaussian noise. This processing effectively simulates complex imaging environments, enriches the spectral texture of remote sensing images, and enhances the anti-interference capability and robustness of subsequent models under different imaging conditions. It is crucial to emphasize that this texture enhancement operation is strictly limited to remote sensing images and must never be applied to digital elevation model (DEM) data or multi-scale topographic position index (TPI) features. For DEM and TPI, their pixel values represent elevation values and topographic position differences with strict physical dimensions. Injecting noise or arbitrarily altering their intensity will directly lead to the generation of "pseudo-terrain," such as creating false peaks or depressions out of thin air, completely destroying the physical authenticity of the topographic data.
[0052] Step S303: Combine the texture-enhanced remote sensing image with the geometrically transformed and standardized digital elevation model data and multi-scale terrain location index features to obtain enhanced multi-source terrain feature data.
[0053] Enhanced multi-source terrain feature data is used to represent a dataset that integrates enhanced remote sensing spectral texture features while preserving physical dimensions and spatial logic, including elevation features and multi-scale terrain location index features. This differentiated combination strategy employs a "loose-strict" approach for data with different physical meanings: "Loose" for remote sensing images, significantly expanding the diversity of spectral samples through intensity transformation and noise injection to prevent overfitting during deep learning model training; "strict" for terrain data, allowing only morphologically invariant geometric transformations while strictly adhering to the bottom line of elevation dimensions and spatial logic. The resulting feature dataset possesses rich feature representations while strictly adhering to the physical laws of Earth science.
[0054] This embodiment employs a technique that uses synchronous, morphology-invariant geometric transformations on multi-source data and differentiates the intensity transformation and noise injection only on remote sensing images. This achieves the technical effect of ensuring strict alignment of spatial coordinates of multi-source data while effectively expanding the diversity of remote sensing spectral textures. It also avoids the introduction of false features or dimensional distortions into elevation and terrain location features. Its beneficial effects are that it enhances the robustness and generalization ability of deep learning models under different imaging conditions, while safeguarding the physical authenticity and spatial logic of terrain data. It reduces the risk of the model learning false landform patterns due to improper data augmentation, laying a solid and reliable data foundation for high-precision terrain feature line extraction.
[0055] In some embodiments, the specific forward inference process within the TerrainNet deep learning model is further explained; see [reference]. Figure 4 The process of inputting the multi-source fusion feature tensor into the TerrainNet deep learning model includes the following steps: Step S401: Input the multi-source fusion feature tensor into the TerrainNet deep learning model and perform backbone feature encoding to obtain a high-resolution shallow feature map and a low-resolution deep feature map.
[0056] Specifically, backbone feature encoding typically consists of multiple downsampling stages in a deep convolutional neural network, such as a combination of residual blocks and pooling layers. When a multi-source fused feature tensor, incorporating spectral, elevation, and multi-scale topographic location index features, is input, the network gradually extracts abstract semantic information as its depth increases. In this process, shallow networks, due to their smaller receptive field and less downsampling, can readily capture details such as edges and textures in the multi-source data, thus outputting high-resolution shallow feature maps with large spatial dimensions and rich details. Deep networks, on the other hand, undergo multiple downsampling processes, expanding their receptive field and losing some spatial location details, but acquiring highly condensed global context and abstract semantic information, thus outputting low-resolution deep feature maps with smaller spatial dimensions but higher semantic levels. These two types of feature maps respectively carry the precise location details and macroscopic semantic concepts necessary for subsequent topographic line extraction.
[0057] Step S402: Based on the high-resolution shallow feature map and the low-resolution deep feature map, perform large receptive field spatial attention feature filtering to obtain the enhanced feature map.
[0058] Ridge lines and valley lines possess topological characteristics of long spatial spans and strong continuity. However, the local receptive fields of conventional convolutional operations struggle to establish long-distance dependencies and are easily misled by local micro-topography or data noise. Therefore, this embodiment introduces a large receptive field spatial attention mechanism to perform feature filtering on shallow and deep features. This mechanism, through specific network structures such as dilated spatial convolution, pooling pyramids, or large kernel convolution, expands the spatial receptive field while calculating the attention weight matrix of the feature map in the spatial dimension. Using this weight matrix, the network can adaptively evaluate the contribution of each region in the global spatial context to the prediction of the current pixel, strengthening long-distance feature responses that conform to the macro-topographic trend and suppressing redundant interference noise from local non-topographic skeletons. This results in an enhanced feature map that filters out background noise and highlights the core topographic skeleton structure.
[0059] Step S403: Based on the enhanced feature map, perform bidirectional feature decoding and adaptive fusion processing to obtain dynamically integrated decoded features.
[0060] To obtain accurate prediction results consistent with the input image resolution, it is necessary to decode and upsample the low-dimensional augmented features. This embodiment employs a bidirectional feature decoding mechanism, which does not simply enlarge the feature map directly. Instead, during the upsampling process to restore spatial resolution, it combines the obtained high-resolution shallow feature map for cross-layer fusion. Shallow features provide accurate edge localization information, while deep semantic features provide category discrimination criteria. This bidirectional interaction ensures that feature lines do not shift position when restoring details. Simultaneously, adaptive fusion processing is employed. The network automatically assigns weight ratios between shallow details and deep semantics during the fusion process through learning, rather than manually setting fixed coefficients. The fusion strategy is dynamically adjusted according to the complexity of different terrain regions, ultimately outputting dynamically integrated decoded features that possess both high localization accuracy and strong semantic consistency.
[0061] Step S404: Based on the dynamically integrated decoded features, the initial terrain feature line prediction map is obtained by classifying and outputting the data through a classifier.
[0062] Finally, the dynamically integrated decoded features are input into a classifier, typically a 1x1 convolutional layer combined with an activation function such as the sigmoid function. The classifier maps the rich multidimensional feature vector of each pixel to a probability scalar between 0 and 1. This value directly represents the confidence that the pixel belongs to the target terrain feature line, such as a ridgeline or valley line. After traversing all pixels of the target region, the classifier outputs a two-dimensional probability matrix with the same spatial dimensions as the original input image, i.e., the initial terrain feature line prediction map.
[0063] This embodiment employs a backbone network to extract features from both shallow and deep branches, introduces a large receptive field spatial attention for global contextual feature filtering, and combines bidirectional decoding with cascaded processing of adaptive weight fusion. This achieves enhanced semantic information of long-distance terrain skeletons in complex multi-source contexts, effective suppression of local micro-topographic noise, and high-precision alignment and recovery of multi-scale features in spatial location. Its beneficial effects are that it significantly improves the deep learning model's ability to perceive and extract slender, weak-edge topological structures such as ridgelines and valley lines. It overcomes the problems of terrain line breaks, blurring, or positional shifts caused by limited receptive fields or stiff feature fusion in traditional networks, providing an extremely clear, continuous, and topologically reliable initial feature line base map for the subsequent generation of high-precision closed slope units.
[0064] In some embodiments, the specific internal process of the large receptive field spatial attention feature filtering process is further described in the following reference. Figure 5 Based on high-resolution shallow feature maps and low-resolution deep feature maps, large receptive field spatial attention feature filtering is performed to obtain enhanced feature maps. The specific steps include: Step S501: Based on the low-resolution deep feature map, perform upsampling processing to align the spatial dimensions and obtain the upsampled deep feature map.
[0065] Specifically, due to multiple downsampling operations during the backbone network encoding stage, the spatial dimensions (length and width) of low-resolution deep feature maps are much smaller than those of high-resolution shallow feature maps. To enable deep semantic information to interact with shallow detail information at the pixel level, this step employs upsampling algorithms such as bilinear interpolation or transposed convolution to restore the spatial resolution of the low-resolution deep feature maps, ensuring that their dimensions are completely consistent with those of the high-resolution shallow feature maps. This results in upsampled deep feature maps, thus eliminating spatial scale barriers for subsequent feature fusion.
[0066] Step S502: Perform feature fusion processing on the upsampled deep feature map and the high-resolution shallow feature map to obtain a fused feature map.
[0067] After spatial alignment, the upsampled deep feature map, containing rich global terrain category semantics, is fused with a high-resolution shallow feature map containing rich surface edge and texture details. This fusion process can be performed, for example, by stitching along the channel dimension or adding element-wise. At each pixel location, this fused feature map possesses both the semantic basis for determining whether the location belongs to the macroscopic mountain trend and the spatial structural information of how the edge details are specifically distributed, forming a preliminary composite feature representation that combines macroscopic and microscopic information.
[0068] Step S503: Based on the fused feature map, use a large-size convolutional kernel to extract spatial context features and calculate weights to obtain the initial spatial attention features.
[0069] Ridge lines and valley lines exhibit significant cross-regional continuity in space. To establish this long-distance pixel dependency, this step abandons small-sized convolutional kernels such as 3x3 found in conventional neural networks. Instead, it employs large-sized convolutional kernels, such as combinations of 7x7 and 11x11 depthwise separable convolutions or dilated convolutions, to perform convolution operations on the fused feature map. These large kernels provide the network with a large receptive field, enabling it to comprehensively consider the surrounding terrain context when calculating the feature response of the current pixel. Through this large receptive field scanning and computation, the network can identify which local edges conform to the macroscopic terrain trend and which are isolated noise points, thus outputting initial spatial attention features containing global importance assessment information.
[0070] Step S504: Based on the initial spatial attention features, perform Sigmoid activation mapping to obtain the spatial attention weight matrix.
[0071] To transform the initial spatial attention features calculated in the previous step into weight coefficients that can be directly applied to feature modulation, this step performs a non-linear mapping process using the Sigmoid activation function. After processing with the Sigmoid function, each value in the initial spatial attention features is smoothly mapped to the range of 0 to 1, thereby generating a two-dimensional matrix with the same spatial size as the fused feature map, i.e., the spatial attention weight matrix. In this matrix, the closer a value is to 1, the higher the confidence that the corresponding spatial location belongs to the true terrain skeleton line; the closer a value is to 0, the greater the probability that the location belongs to the background or redundant texture.
[0072] Step S505: Based on the spatial attention weight matrix, perform element-wise multiplication with the original high-resolution shallow feature map to obtain a weighted feature map.
[0073] This step implements the actual physical effect of attention weights. The generated spatial attention weight matrix is multiplied element-wise with the unfused "original high-resolution shallow feature map". This operation is equivalent to a spatial gating mechanism: using global topological weights learned from the macroscopic receptive field, it directly guides and filters the original high-resolution detail features. This ensures that edge information in the original shallow features that conforms to the macroscopic terrain trend is preserved or even amplified with high weights, while local details that deviate from the macroscopic trend are suppressed with low weights.
[0074] Step S506: Based on the weighted feature map, filter redundant terrain texture information and enhance target features to obtain an enhanced feature map.
[0075] After the element-wise multiplication and weighted modulation described above, the short and discontinuous high-frequency responses in the weighted feature map caused by minor terrain undulations, vegetation textures, and man-made facilities are significantly weakened, thus successfully filtering out redundant terrain texture information. Meanwhile, continuous edge signals that are highly consistent with the direction of macroscopic ridges and valleys are significantly enhanced. The final enhanced feature map output completely eliminates the interference of local noise while preserving the high-resolution positioning accuracy of shallow features, presenting extremely clear terrain skeleton features that conform to the global geomorphological logic.
[0076] This embodiment achieves the technical effect of establishing long-distance pixel dependence with a macroscopic large receptive field of view and using global topological logic to accurately filter and recalibrate local high-resolution edge features by aligning and fusing deep and shallow features, extracting global context and calculating attention weights, and then gating the weight matrix with the original shallow features element-wise. The beneficial effect is that it effectively breaks the limitations of conventional convolutional local perception, can extremely sensitively distinguish between real macroscopic terrain skeleton lines and local micro-topographic redundant noise, and avoids the problem of feature line extraction breakage or misjudgment caused by local texture interference. It provides a feature expression foundation with strong noise resistance for subsequent output of ridge lines and valley lines with strong topological coherence.
[0077] The following is a further explanation of the specific internal process of bidirectional feature decoding and adaptive fusion processing provided in this embodiment. (See also...) Figure 6 After obtaining the enhanced feature map through a large receptive field spatial attention mechanism, in order to accurately preserve the edge structure of the terrain lines during image resolution restoration, a bidirectional path feature refinement process is first performed based on the enhanced feature map, involving both bottom-up and top-down approaches. This bidirectional transfer mechanism allows the shallow, high-resolution localization information and the deep, macroscopic semantic information to interweave and mutually correct each other in the decoding network, initially integrating them to obtain a bidirectional feature map containing rich multi-scale details. Subsequently, based on this bidirectional feature map, the following adaptive fusion step is performed: Step S601: Based on the bidirectional feature map, perform channel dimension weight learning processing to obtain a dynamic weight map.
[0078] Specifically, the bidirectional feature map contains rich feature responses along the channel dimension. Each channel may correspond to terrain edges in different directions, landform undulations at different scales, or different land cover responses. However, not all channel features are beneficial for extracting ridgelines or valley lines at the current stage. This step introduces a lightweight channel attention mechanism, such as global average pooling combined with a multilayer perceptron, to adaptively evaluate feature importance and learn weights along the channel dimension of the bidirectional feature map. Based on the actual input, the network automatically calculates the actual contribution of each feature channel to the terrain line extraction task and outputs a dynamic weight map that matches the number of channels. The values in this weight map intuitively reflect the degree to which features of each channel should be preserved or suppressed.
[0079] Step S602: Based on the dynamic weight graph, perform element-wise multiplication with the current layer features of the current path to obtain the weighted current layer features.
[0080] After obtaining the dynamic weight map, this step uses it as a "soft-gated" signal and performs element-wise multiplication with the current layer's features being processed in the current decoding path. During this process, effective channels that strongly represent the terrain skeleton are assigned high weights close to 1, amplifying their signals; while ineffective channels that represent background noise or redundant micro-topographic textures are assigned low weights close to 0, strongly suppressing their signals. Through this channel-level dynamic calibration, the resulting weighted features are free from a large amount of channel redundancy interference, achieving purification and focusing of feature representation along the channel dimension.
[0081] Step S603: Based on the weighted features of this layer, perform splicing and fusion processing with the features of adjacent decoding layers to obtain dynamically integrated decoding features.
[0082] After channel-level adaptive refinement of the features at this layer, they need to be combined with features from adjacent decoding layers in the network, such as features passed from the previous layer that has just undergone upsampling. This step uses a concat operation to stack the refined, weighted features of this layer with features from adjacent decoding layers along the channel axis. Since the features of this layer have undergone adaptive selection with dynamic weights before fusion, this concatenation is no longer a rigid, full feature superposition, but rather a high-quality, high-purity feature complementarity. This mechanism effectively avoids the accumulation of useless noise from adjacent layers, and the final output is a dynamically integrated decoded feature with both extremely high signal-to-noise ratio and the fusion of multi-level spatial information.
[0083] This embodiment employs a bidirectional path refinement technique combined with channel dimension weight learning to generate a dynamic weight map. This map is then multiplied element-wise with the current path's layer features to achieve channel-level adaptive filtering. Finally, it is spliced with features from adjacent decoding layers. This technique achieves dynamic calibration of spatial and semantic information between different decoding layers, precise suppression of invalid channel features, and high-quality purification and complementary fusion of cross-layer features. Its beneficial effects are that it effectively overcomes the feature channel redundancy and edge blurring problems caused by fixed weight fusion in traditional decoders. It ensures the lossless transmission and accurate focusing of terrain feature line details in complex resolution restoration, and improves the edge sharpness and structural coherence of the final terrain feature line prediction map.
[0084] In some embodiments, the specific process for generating slope units based on the initial terrain feature line prediction map is further described in the following reference. Figure 7 Based on the initial terrain feature line prediction map, output processing is performed to generate slope units for several target areas. This includes the following steps: Step S701: Based on the initial terrain feature line prediction map, perform suspended endpoint identification processing to obtain suspended nodes.
[0085] Specifically, the initial terrain feature line probability map predicted by the deep learning model is transformed into a vector line feature network composed of nodes and arc segments after thresholding, binarization, and thinning. Ideally, ridgelines and valleys should intertwine to form a complete network, but in actual predictions, line segment breaks often occur due to insufficient local prediction confidence. This step, based on graph theory principles, traverses the connectivity degree of all nodes in the vector network, i.e., the number of line segments connected to that node. The connectivity degree of normal intersections is usually greater than or equal to 3, while nodes with a connectivity degree strictly equal to 1 are identified. These free endpoints connected only to a single line segment are called "hanging nodes," which are the locations of the ends of broken feature lines.
[0086] Step S702: Based on the suspended node, perform local direction vector calculation to obtain the local direction vector of the broken feature line.
[0087] To ensure that subsequent line breaks follow the actual terrain contours rather than blindly connecting straight lines, this step calculates the orientation of each identified suspended node. Specifically, it extracts the topologically adjacent nodes on the broken feature line where the suspended node is located—that is, the coordinates of the next node closest to the suspended node. By calculating the spatial coordinate difference between these two nodes, the local extension direction of the broken line at its end is determined. By normalizing or smoothing this direction vector, a local orientation vector representing the natural extension trend of the broken feature line is obtained. This local orientation vector indicates the most likely spatial orientation of the terrain skeleton line if it continues to extend.
[0088] Step S703: Based on the local direction vector of the broken feature line, perform tolerance extension and capture closure processing to obtain the closed node and closed feature line network.
[0089] After obtaining the local directional vector, the continued growth process of the feature lines is simulated. Starting from the dangling node, the spatial extension exploration is performed along the direction indicated by the local directional vector, according to the set step size and maximum tolerance distance. During this process, a capture closure process is performed: if, within the maximum tolerance range, the search ray of the extended trajectory successfully captures another terrain feature line (not its own segment) or another node in the network, the closure condition is satisfied. At this time, a new connecting segment is generated between the dangling node and the captured target node, or the projection point on the target segment, connecting the two previously disconnected parts topologically. After performing the above operation on all dangling nodes in the network, the disconnection phenomenon in the network is eliminated, and finally a topologically connected, closed node and closed feature line network without dangling endpoints is obtained.
[0090] Step S704: Based on the closed nodes and closed feature line network, generate slope elements for several target regions.
[0091] After the above repair steps, the ridgelines (watersheds) and valleylines (catchment lines) in the closed feature line network intertwine spatially, naturally forming numerous non-overlapping closed polygonal boundaries. Based on these closed vector boundary lines, this step utilizes polygonal region construction algorithms, such as the left-turn algorithm, to convert the linear network into planar features. Each independent planar polygon strictly enclosed by ridgelines and valleylines represents a relatively independent terrain unit with consistent internal water catchment processes under the physical mechanism of surface water flow, thus successfully generating slope units for several target areas. The target areas are used to indicate the specific geographic spatial range for which terrain feature line extraction and slope unit delineation are required.
[0092] This embodiment achieves automated topology repair and seamless network connectivity for fractured terrain feature lines predicted by deep learning, by accurately identifying suspended nodes in a vector network, calculating the local direction vector of the broken line, and performing tolerance-based directional extension and target capture closure based on the vector. Its beneficial effect is that it completely solves the engineering bottleneck of not being able to directly construct the surface region due to the breakage of the predicted line, eliminates a lot of tedious manual line breaking, connection and editing work, and realizes fully automatic high-fidelity conversion from two-dimensional probabilistic map to topologically complete and physically logically rigorous surface slope unit, providing usable basic surface data for the refined spatial assessment of geological hazards such as landslides.
[0093] In some embodiments, the specific algorithm flow for calculating the local direction vector of the severed feature line based on the suspended node is further explained: see [link / reference]. Figure 8 Based on the suspended node, the local direction vector is calculated to obtain the local direction vector of the severed feature line. The specific steps include: Step S801: Based on the dangling node, perform backtracking extraction along the feature line to obtain the coordinates of a preset number of adjacent pixels at the end.
[0094] Specifically, after binarization and thinning, the initial terrain feature lines output by the model inevitably have tiny jagged edges or single-pixel-level bends at the raster level. Relying solely on dangling nodes and their immediate neighbors to infer the direction would result in significant errors. Therefore, this step, based on the identified dangling nodes, traces backward along the direction of the broken feature line, continuously extracting a predetermined number of the coordinates of the last adjacent pixels, such as 5 or 10 pixels sequentially. This coordinate sequence records the local geometric trajectory of the broken line in its terminal region.
[0095] Step S802: Based on the coordinates of adjacent pixels at the end, perform least squares linear fitting to obtain the parameters of the local fitted line.
[0096] After obtaining the discrete set of pixel coordinates, directly calculating the direction using the line connecting the first and last pixels is still easily affected by individual abnormally jittery pixels. This step introduces the least squares method to perform linear fitting on these coordinate points. By minimizing the sum of the squared vertical distances from all backtracking pixels to the line to be fitted, the optimal line equation parameters, such as slope and intercept, are solved. These optimal line equation parameters, such as slope and intercept, are then used as the parameters for the locally fitted line. This fitting process can effectively absorb and filter out the minor jaggedness and local noise introduced by rasterization, using a smooth straight line to equivalently replace the macroscopic direction of the small segment of feature line at the end.
[0097] Step S803: Based on the parameters of the locally fitted straight line, perform direction calculation processing from the fitting center point to the suspending node to obtain the two-dimensional extension direction vector.
[0098] After obtaining the robust parameters of the locally fitted line, it is necessary to assign it a specific directionality. This step first calculates the geometric mean of all backtracking pixel coordinates to determine the fitting center point of the line segment. Then, based on the slope of the fitted line, a two-dimensional vector is calculated pointing precisely from the fitting center point to the "hanging node" at the end. The choice of the order "from the center point to the hanging node" is crucial because it follows the actual spatial orientation of the feature line, which originally grew from the inside out, ensuring that the derived direction is the direction in which the broken line "continues to extend outward," rather than the direction of retraction.
[0099] Step S804: Based on the two-dimensional extension direction vector, perform vector normalization processing to obtain the local direction vector of the severed feature line.
[0100] Because the actual pixel distances from the fitting center point to the dangling node vary, the magnitude (i.e., the vector length) of the two-dimensional extension direction vector obtained in the previous step is a random variable. To facilitate subsequent steps in extending the search using a uniform standard step size, this step normalizes the two-dimensional extension direction vector. That is, while keeping the proportion of the vector's directional components unchanged, its magnitude is forcibly scaled to 1. The resulting local orientation vector becomes a unit direction vector that purely represents the spatial extension orientation, eliminating the interference of distance attributes.
[0101] This embodiment achieves effective smoothing and filtering of minute jagged edges and local noise at the ends of broken feature lines, as well as high-precision, purely directional mathematical quantification extraction of the true local extension trend. This is achieved by extracting multiple pixel coordinates backward along the feature line, performing line fitting using the least squares method, and normalizing the direction from the fitting center to the suspended node. The beneficial effect is that it provides an extremely accurate compass vector for subsequent tolerance extension and closure operations, which is not affected by end deformation. This ensures that the broken terrain line can strictly follow the original real landform trend when automatically repairing and extending, avoiding the problem of abnormal bending of feature lines or forced connection with incorrect nodes due to incorrect calculation of the extension direction, and improving the morphological rationality of the automatically generated slope unit skeleton network.
[0102] In some embodiments, the specific algorithm flow for tolerance extension and capture closure processing is further explained: see [link / reference] Figure 9 Based on the local direction vector of the severed feature line, tolerance-inclusive extension and closure capture processing are performed to obtain the closed node and closed feature line network, including: Step S901: Based on the local direction vector of the broken feature line, perform pixel-level virtual step extension processing starting from the hanging node to obtain the extension trajectory point sequence.
[0103] Specifically, after obtaining the unit direction vector representing the true extension trend of the broken line, this step takes the dangling node as the starting point and extends virtually along the direction indicated by the local direction vector, following a set pixel-level step size, for example, advancing one pixel at a time along the vector direction. "Virtual" means that this extension process does not directly generate permanent line segments on the original data, but rather simulates the growth of a ray, recording the spatial coordinates reached at each step, thus forming a sequence of extension trajectory points composed of discrete pixel coordinates. This sequence of extension trajectory points represents the ideal path that the broken feature line would take if it continued to grow along the current direction. Its total extension length is strictly controlled by a preset maximum tolerance distance. Once the accumulated step length reaches the maximum tolerance limit, the extension process is immediately terminated to prevent the search range from expanding infinitely without restraint.
[0104] Step S902: Based on the extended trajectory point sequence, perform adjacent feature lines and nodes search processing within the preset tolerance radius to obtain the target capture point.
[0105] During each step of the virtual extension process, this step simultaneously uses the current extension trajectory point as the center and a preset tolerance radius (e.g., 5 to 10 pixels) as the search range to detect in real time whether there are other feature lines or existing nodes in the original feature line network within this circular search area. If the tolerance circle of the current step point is a blank area, the search continues along the direction vector to the next trajectory point. If a feature line or node in the original network that does not belong to its own line segment is successfully detected within the tolerance circle of a certain step point, the detected object is immediately locked, and its spatial coordinates or the projection coordinates of the line segment closest to the current trajectory point are confirmed as the target capture point, while the entire virtual extension process is terminated. Through this "walking and observing, gradually approaching" search strategy, the most closely connected target that is closest to the dead end and best conforms to the natural trend can be efficiently captured within a reasonable range of the extension trajectory.
[0106] Step S903: Based on the target capture point, connect it with the hanging node using a straight line segment to obtain the newly added closed line segment and the corresponding closed node.
[0107] After successfully capturing the target snap point, this step performs the actual physical connection operation. A new straight line segment is generated between the coordinates of the dangling node and the coordinates of the target snap point; this line segment is the newly added closed line segment. Simultaneously, if the target snap point falls on an existing feature line segment instead of exactly on an existing node, a node break operation is performed on that feature line segment. This involves dividing the original line segment in half at the target snap point's location and inserting a new node. Thus, the dangling node and the target snap point together form two corresponding closed nodes, physically connected by the newly added closed line segment, successfully integrating the broken line into the original feature line network.
[0108] Step S904: Based on the newly added closed line segments and their corresponding closed nodes, perform topological merging processing with the original feature lines to obtain a network of closed nodes and closed feature lines.
[0109] After completing a single closed connection, the newly added closed line segment and its associated closed node are formally written back into the original vector data structure and merged with the original feature line in the topology. The merging operation includes updating the connection degree information of all relevant nodes, such as changing the degree of a dangling node from 1 to 2, increasing the degree of a captured node accordingly, and reconstructing the topological adjacency table between nodes and line segments. After the merging process, the broken line is completely eliminated, and the topological integrity of the feature line network at the break point is restored. Since steps S701 to S704 are a cyclical process, the remaining dangling nodes in the network are checked one by one, and the entire process of virtual extension, target capture, straight line connection, and topology merging is repeated until there are no more dangling nodes with a degree of 1 in the entire network, finally resulting in a fully connected, unbroken closed node and closed feature line network.
[0110] This embodiment achieves the technical effect of adaptively extending the broken feature line along the direction of the real terrain, capturing the nearest connectable target, and automatically completing the topology connection repair through a cyclical iterative process of searching for and locking adjacent targets within a preset tolerance radius in real time at each step. Its beneficial effect is that through the rigorous logic of "virtual exploration, actual connection, and cyclic verification", it ensures that the generation of each repair line segment strictly follows the natural extension law of the terrain and is constrained by the tolerance radius to avoid abnormal leaps. Finally, it realizes the automated and seamless reconstruction of the entire ridge-valley feature line network from fragmentation to full topology closure, providing a continuous, complete, and physically and logically self-consistent skeleton network foundation for the subsequent construction of high-quality planar slope units.
[0111] In some embodiments, the specific training constraint mechanism of the multi-objective joint loss function in the TerrainNet deep learning model is further explained: See [link / reference] Figure 10 The TerrainNet deep learning model also includes: Step S1001: Multi-objective joint loss function. The model training is constrained by the multi-objective joint loss function to obtain the trained terrain feature line prediction model.
[0112] This step serves as the overarching framework for constructing the model training loss, clarifying that the core constraint for optimizing the entire network parameters lies in the multi-objective joint loss function. This function simultaneously considers classification accuracy and topological structure, guiding the model to converge to the optimal state. The specific details are as follows.
[0113] Step S1002: Based on the initial terrain feature line prediction map and the real label map, perform pixel-by-pixel error calculation to obtain pixel-level classification loss.
[0114] Specifically, pixel-level classification losses, such as binary cross-entropy loss (BCE) or Dice loss, serve as the fundamental supervision signals for model training. The predicted probability value (between 0 and 1) of each pixel in the initial terrain feature line prediction map output by the model is compared one by one with the corresponding binary label in the manually labeled ground truth map (1 for the feature line region and 0 for the background region). The mathematical difference error between the two is calculated. This processing step provides local supervision signals to the network, enabling the model to learn to distinguish the microscopic differences between the terrain feature lines and the surrounding background in multi-source fusion features, achieving accurate pixel-level localization of linear edges.
[0115] Step S1003: Based on the initial terrain feature line prediction map and the real label map, perform soft topological skeleton similarity calculation to obtain the topological connectivity preservation loss.
[0116] For extremely long and thin topological structures with weak edges, such as ridgelines and valleys, relying solely on pixel-by-pixel error calculation has a fatal flaw: even if the model misses a single pixel in its prediction, which implies a "break" in the line structure, the penalty is negligible given the vast number of pixels. Since traditional morphological skeleton extraction involves non-differentiable nonlinear operations, it cannot be directly used for backpropagation in deep learning. Therefore, this embodiment employs soft topological skeleton similarity calculation, utilizing differentiable morphological operators, such as soft max-pooling and soft min-pooling, to simulate dilation and erosion, or approximation algorithms based on distance transformation, to simulate and calculate the skeleton structural similarity between predicted and real lines at the probabilistic graph level. This topological connectivity preservation loss can detect and penalize line segment breaks, isolated fragments, or spikes in the network output, forcing the model to maintain the coherence of the feature line network on a macroscopic level.
[0117] Step S1004: Based on pixel-level classification loss and topological connectivity preservation loss, perform dynamic weight allocation and weighted summation to obtain the multi-objective joint loss value.
[0118] The optimization difficulty and dominant requirements of these two loss terms change dynamically at different stages of model training. In the early stages of training, the model needs to quickly locate approximate edge positions, at which point pixel-level classification loss should dominate. However, in the later stages of training, assuming the positions are basically accurate, the focus shifts to improving line connectivity, at which point the weight of the topological connectivity preservation loss should be increased accordingly. This step uses a dynamic weight allocation mechanism, such as automatically learning the variance weights of each loss term based on homoscedasticity uncertainty, or an adaptive adjustment curve based on the training epochs, to automatically adjust the proportion of these two losses in the total loss. Finally, the weighted pixel-level classification loss and the topological connectivity preservation loss are summed to obtain a scientifically balanced multi-objective joint loss value.
[0119] Step S1005: Based on the multi-objective joint loss value, perform backpropagation and iterative update of the parameters of the TerrainNet deep learning model to obtain the trained terrain feature line prediction model.
[0120] After obtaining the joint loss value for multiple objectives, the gradient of this loss value with respect to each trainable parameter in the TerrainNet model, such as convolutional kernel weights and bias terms, is calculated using the chain rule. An optimizer, such as Adam or SGD, is used to execute the backpropagation algorithm, continuously fine-tuning and iteratively updating the model parameters along the gradient descent direction. After multiple rounds of batch training, when the joint loss value for multiple objectives stably converges to its minimum range, the model achieves a perfect balance between precise local microscopic localization and global macroscopic topological connectivity, thus outputting the trained terrain feature line prediction model.
[0121] Figure 11 This is a schematic diagram of a slope element extraction system 11 provided in an embodiment of this application. Further explanation is provided regarding the specific collaborative working principle of each module of the slope element extraction system 11: See [link to relevant documentation]. Figure 11 The slope unit extraction system 11 includes: a feature tensor construction module 1101, a feature line prediction module 1102, and a slope unit generation module 1103.
[0122] The feature tensor construction module 1101 is used to perform physical constraint-based preprocessing and multi-scale feature extraction based on the acquired multi-source terrain data of the target area, and construct a multi-source fusion feature tensor. The multi-source fusion feature tensor is used to represent the channel cascaded data of fused remote sensing image spectral features, elevation features and multi-scale terrain location index features.
[0123] This module serves as the data foundation of the entire system, responsible for addressing the adaptation issues of multi-source heterogeneous data from the outset. In its implementation, it encompasses sub-units such as standardization processing, multi-scale topographic location index (TPI) calculation, and differentiated data augmentation. This module strictly adheres to the "physical constraint" bottom line: while enhancing the spectral texture of remote sensing imagery, it only allows morphologically invariant geometric transformations on DEM and TPI data, resolutely preventing elevation distortion and the generation of "pseudo-topography." Ultimately, the module rigorously concatenates the pure remote sensing spectral features, elevation features, and multi-scale topographic location index features along the channel dimension, providing the subsequent deep learning model with a spatially strictly aligned, informationally complementary, and physically logically self-consistent multi-source fusion feature tensor.
[0124] The feature line prediction module 1102 is used to input the multi-source fused feature tensor into the TerrainNet deep learning model to obtain the initial terrain feature line prediction map. The TerrainNet deep learning model includes an encoder, a large receptive field spatial attention mechanism, a bidirectional feature decoding mechanism, and a multi-objective joint loss function. The initial terrain feature line prediction map is used to characterize the probability distribution of valley lines and ridge lines in the target area.
[0125] This module is responsible for feature extraction, utilizing a highly customized TerrainNet model to transform the aforementioned tensors into linear probability distributions. During the model's forward inference, the encoder first extracts features from both shallow and deep branches; then, a large receptive field spatial attention mechanism is activated to filter redundant noise from local micro-topography within a global macroscopic view and enhance long-distance terrain skeleton responses; next, a bidirectional feature decoding mechanism performs cross-level channel adaptive fusion and detail restoration. Furthermore, this module is strictly constrained by a multi-objective joint loss function (fusing pixel-level errors and soft topological skeleton similarity) during model training, ensuring that the output initial terrain feature line prediction map not only has sharp edges at the pixel level but also possesses high-precision topological coherence at the structural level, achieving a high-confidence probability mapping of ridgelines and valley lines.
[0126] The slope element generation module 1103 is used to perform output processing based on the initial terrain feature line prediction map to generate slope elements for several target areas. The slope elements are used to represent planar polygons. The output processing includes identifying hanging endpoints, obtaining local orientation vectors, and topological extension and closure processing.
[0127] This module acts as the system's topology repair and surface region converter, responsible for transforming the probabilistic map into engineering-usable polygonal surfaces. For the very few remaining fractures caused by complex terrain, the module first accurately identifies the hanging endpoints in the vectorized prediction map, and calculates the local directional vector reflecting the actual terrain trend through backward backtracking and least squares fitting. Subsequently, guided by this, pixel-level virtual step extension and tolerance-based target capture are performed to achieve automated and seamless connection of fracture segments. Finally, after eliminating all network breaks and forming a completely closed feature line network, polygonal surfaces are automatically constructed based on the interwoven boundaries of ridges and valleys, outputting slope units with clear physical meaning and independent internal water flow processes.
[0128] In some embodiments, the feature tensor construction module 1101 includes: The differential data standardization submodule is used to perform differential data standardization processing based on the multi-source terrain data of the acquired target area, so as to obtain standardized remote sensing images and standardized digital elevation model data.
[0129] The multi-scale terrain location index extraction submodule is used to perform multi-scale terrain location index (TPI) extraction processing based on the standardized digital elevation model data to obtain multi-scale terrain location index features.
[0130] The physically constrained differential data enhancement submodule is used to perform physically constrained differential data enhancement processing based on the standardized remote sensing images, standardized digital elevation model data and multi-scale terrain location index features to obtain enhanced multi-source terrain feature data.
[0131] The physical constraint-based differential data augmentation submodule includes: The synchronous geometric transformation unit is used to perform synchronous, morphology-invariant geometric transformation processing based on the standardized remote sensing image, standardized digital elevation model data, and multi-scale topographic location index features, to obtain the geometrically transformed standardized remote sensing image, standardized digital elevation model data, and multi-scale topographic location index features.
[0132] The texture enhancement unit is used to perform intensity transformation and Gaussian noise injection processing on the normalized remote sensing image after the geometric transformation to obtain a texture-enhanced remote sensing image.
[0133] The data combination unit is used to combine the texture-enhanced remote sensing image with the geometrically transformed digital elevation model data and multi-scale terrain location index features to obtain enhanced multi-source terrain feature data.
[0134] The channel cascading submodule is used to perform cascading processing on the channel dimension based on the enhanced multi-source terrain feature data to construct a multi-source fusion feature tensor.
[0135] The feature line prediction module 1102 includes: The backbone feature encoding submodule is used to input the multi-source fusion feature tensor into the TerrainNet deep learning model for backbone feature encoding processing to obtain high-resolution shallow feature maps and low-resolution deep feature maps.
[0136] The large receptive field spatial attention feature filtering submodule is used to perform large receptive field spatial attention feature filtering processing based on the high-resolution shallow feature map and the low-resolution deep feature map to obtain the enhanced feature map. The large receptive field spatial attention feature filtering submodule includes: The upsampling alignment unit is used to perform upsampling processing based on the low-resolution deep feature map to align the spatial dimensions and obtain an upsampled deep feature map.
[0137] The feature fusion unit is used to perform feature fusion processing on the upsampled deep feature map and the high-resolution shallow feature map to obtain a fused feature map.
[0138] The large-size convolutional weight calculation unit is used to perform spatial context feature extraction and weight calculation based on the fused feature map using a large-size convolutional kernel to obtain the initial spatial attention features.
[0139] The Sigmoid mapping unit is used to perform Sigmoid activation mapping processing based on the initial spatial attention features to obtain the spatial attention weight matrix.
[0140] The element-wise multiplication unit is used to perform element-wise multiplication with the original high-resolution shallow feature map based on the spatial attention weight matrix to obtain a weighted feature map.
[0141] A redundancy filtering unit is used to filter redundant terrain texture information and enhance target features based on the weighted feature map to obtain an enhanced feature map.
[0142] The bidirectional feature decoding and adaptive fusion submodule is used to perform bidirectional feature decoding and adaptive fusion processing based on the enhanced feature map to obtain dynamically integrated decoded features; The bidirectional feature decoding and adaptive fusion submodule includes: The bidirectional feature refinement unit is used to perform feature refinement processing on the enhanced feature map using both bottom-up and top-down bidirectional paths to obtain a bidirectional feature map.
[0143] The channel weight learning unit is used to perform channel dimension weight learning processing based on the bidirectional feature map to obtain a dynamic weight map.
[0144] The weighting unit at this layer is used to perform element-wise multiplication with the current layer features of the current path based on the dynamic weight graph to obtain the weighted features at this layer.
[0145] The splicing and fusion unit is used to splice and fuse the weighted features of the current layer with the features of the adjacent decoding layers to obtain dynamically integrated decoding features.
[0146] The classifier output submodule is used to classify and output the dynamically integrated decoded features to obtain the initial terrain feature line prediction map.
[0147] The multi-objective joint loss constraint submodule is used to constrain the model training through the multi-objective joint loss function to obtain the trained terrain feature line prediction model.
[0148] The multi-objective joint loss constraint submodule includes: The pixel-level classification loss calculation unit is used to perform pixel-by-pixel error calculation based on the initial terrain feature line prediction map and the real label map to obtain the pixel-level classification loss.
[0149] The topology connectivity preservation loss calculation unit is used to perform soft topology skeleton similarity calculation based on the initial terrain feature line prediction map and the real label map to obtain the topology connectivity preservation loss.
[0150] The dynamic weight allocation unit is used to perform dynamic weight allocation and weighted summation based on the pixel-level classification loss and topological connectivity preservation loss to obtain the multi-objective joint loss value.
[0151] The backpropagation update unit is used to perform backpropagation and iterative update of the parameters of the TerrainNet deep learning model based on the multi-objective joint loss value, so as to obtain the trained terrain feature line prediction model.
[0152] The slope unit generation module 1103 includes: The suspended endpoint identification submodule is used to perform suspended endpoint identification processing based on the initial terrain feature line prediction map to obtain suspended nodes; The local direction vector calculation submodule is used to perform local direction vector calculation processing based on the suspended node to obtain the local direction vector of the broken feature line.
[0153] The local orientation vector calculation submodule includes: The backward extraction unit is used to perform backward extraction processing along the feature line based on the dangling node to obtain a preset number of end adjacent pixel coordinates.
[0154] The least squares fitting unit is used to perform least squares linear fitting based on the coordinates of the adjacent pixels at the end to obtain the parameters of the local fitted line.
[0155] The direction vector calculation unit is used to perform direction calculation processing from the fitting center point to the suspending node based on the local fitted line parameters, to obtain a two-dimensional extended direction vector.
[0156] The vector normalization unit is used to perform vector normalization processing based on the two-dimensional extension direction vector to obtain the local direction vector of the severed feature line.
[0157] The tolerance-in-range extension and capture closure submodule is used to perform tolerance-in-range extension and capture closure processing based on the local direction vector of the severed feature line to obtain the closed node and closed feature line network. The tolerance-in-progress extension and capture closure submodule includes: The virtual step extension unit is used to perform pixel-level virtual step extension processing based on the local direction vector of the severed feature line, starting from the suspended node, to obtain a sequence of extension trajectory points.
[0158] The adjacent target search unit is used to perform adjacent feature lines and nodes search processing within a preset tolerance radius based on the extended trajectory point sequence to obtain the target capture point.
[0159] The straight line segment connection unit is used to connect the target capture point with the suspension node using straight line segments to obtain a new closed line segment and the corresponding closed node.
[0160] The topology merging unit is used to perform topology merging processing with the original feature lines based on the newly added closed line segments and their corresponding closed nodes, to obtain a network of closed nodes and closed feature lines.
[0161] The slope element region generation submodule is used to generate several slope elements of the target region based on the closed nodes and the closed feature line network.
[0162] It should be noted that the slope element extraction system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the slope element extraction system and the slope element extraction method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0163] This application also provides an electronic device. Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0164] Typically, electronic device 12 includes one or more processors 1201 and one or more memories 1202.
[0165] Processor 1201 may include one or more processing cores, such as a quad-core processor, a hexa-core processor, etc. Processor 1201 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1201 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1201 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required by the display screen. In some embodiments, processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0166] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1202 are used to store at least one computer program, which is executed by the processor 1201 to implement the ramp cell extraction method provided in the method embodiments of this application.
[0167] Those skilled in the art will understand that Figure 12 The structure shown does not constitute a limitation on the electronic device 12, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0168] In addition, the electronic device provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a ramp cell extraction method provided in the above embodiments.
[0169] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement the slope element extraction method provided in the above embodiment.
[0170] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the slope element extraction method provided in the above embodiment.
[0171] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0172] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0173] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0174] The above description is only a specific implementation of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application.
Claims
1. A method for extracting slope elements, characterized in that, The method includes: Based on the acquisition of multi-source terrain data of the target area, physical constraint-based preprocessing and multi-scale feature extraction are performed to construct a multi-source fusion feature tensor. The multi-source fusion feature tensor is used to represent the channel concatenated data of fused remote sensing image spectral features, elevation features and multi-scale terrain location index features. The target area is used to indicate the specific geographic spatial range that needs to be extracted for terrain feature lines and divided into slope units. The multi-source fusion feature tensor is input into the TerrainNet deep learning model to obtain an initial terrain feature line prediction map. The TerrainNet deep learning model includes an encoder, a large receptive field spatial attention mechanism, a bidirectional feature decoding mechanism, and a multi-objective joint loss function. The initial terrain feature line prediction map is used to characterize the probability distribution of valley lines and ridge lines in the target region. Based on the initial terrain feature line prediction map, output processing is performed to generate several slope units of the target area. The slope units are used to represent planar polygon terrain units with closed boundaries, which are enclosed by ridge lines and valley lines. The output processing includes identifying hanging endpoints, obtaining local orientation vectors, topological extension, and closure processing.
2. The slope unit extraction method according to claim 1, characterized in that, The process of acquiring multi-source terrain data of the target area, performing physical constraint-based preprocessing and multi-scale feature extraction, and constructing a multi-source fusion feature tensor includes: Based on the acquisition of multi-source terrain data of the target area, differentiated data standardization processing is performed to obtain standardized remote sensing images and standardized digital elevation model data; Based on the standardized digital elevation model data, multi-scale terrain location index extraction processing is performed to obtain multi-scale terrain location index features. Based on the standardized remote sensing images, standardized digital elevation model data, and multi-scale terrain location index features, physical constraint-based differential data enhancement processing is performed to obtain enhanced multi-source terrain feature data. Based on the enhanced multi-source terrain feature data, cascade processing is performed in the channel dimension to construct a multi-source fusion feature tensor.
3. The slope unit extraction method according to claim 2, characterized in that, Based on the standardized remote sensing images, standardized digital elevation model data, and multi-scale topographic location index features, physical constraint-based differential data augmentation processing is performed to obtain enhanced multi-source topographic feature data, including: Based on the standardized remote sensing images, standardized digital elevation model data, and multi-scale topographic location index features, synchronous morphology-preserving geometric transformation processing is performed to obtain the geometrically transformed standardized remote sensing images, standardized digital elevation model data, and multi-scale topographic location index features. Based on the standardized remote sensing image after the geometric transformation, intensity transformation and Gaussian noise injection are performed to obtain a texture-enhanced remote sensing image. The texture-enhanced remote sensing image is combined with the geometrically transformed and standardized digital elevation model data and multi-scale terrain location index features to obtain enhanced multi-source terrain feature data. The enhanced multi-source terrain feature data is used to represent a data set that integrates enhanced remote sensing spectral texture features and elevation features and multi-scale terrain location index features while maintaining physical dimensions and spatial logic.
4. The slope unit extraction method according to claim 1, characterized in that, The step of inputting the multi-source fused feature tensor into the TerrainNet deep learning model includes the following steps: The multi-source fusion feature tensor is input into the TerrainNet deep learning model for backbone feature encoding to obtain a high-resolution shallow feature map and a low-resolution deep feature map. Based on the high-resolution shallow feature map and the low-resolution deep feature map, a large receptive field spatial attention feature filtering process is performed to obtain an enhanced feature map. Based on the enhanced feature map, bidirectional feature decoding and adaptive fusion processing are performed to obtain dynamically integrated decoded features; Based on the dynamically integrated decoded features, the initial terrain feature line prediction map is obtained by classifying and outputting the data through a classifier.
5. The slope unit extraction method according to claim 4, characterized in that, The enhanced feature map is obtained by performing large receptive field spatial attention feature filtering based on the high-resolution shallow feature map and the low-resolution deep feature map, including: Based on the low-resolution deep feature map, upsampling is performed to align the spatial dimensions, resulting in an upsampled deep feature map. The upsampled deep feature map is fused with the high-resolution shallow feature map to obtain a fused feature map. Based on the fused feature map, spatial context features are extracted and weights are calculated using large-size convolutional kernels to obtain initial spatial attention features. Based on the initial spatial attention features, a Sigmoid activation mapping process is performed to obtain the spatial attention weight matrix; Based on the spatial attention weight matrix, an element-wise multiplication process is performed with the original high-resolution shallow feature map to obtain a weighted feature map. Based on the weighted feature map, redundant terrain texture information is filtered out and target features are enhanced to obtain an enhanced feature map.
6. The slope unit extraction method according to claim 4, characterized in that, Based on the enhanced feature map, bidirectional feature decoding and adaptive fusion processing are performed to obtain dynamically integrated decoded features, including: Based on the enhanced feature map, feature refinement processing is performed on the bidirectional path from bottom to top and from top to bottom to obtain a bidirectional feature map. Based on the bidirectional feature map, channel dimension weight learning processing is performed to obtain a dynamic weight map; Based on the dynamic weight graph, the current layer features of the current path are multiplied element by element to obtain the weighted current layer features. Based on the weighted features of this layer, they are spliced and fused with the features of adjacent decoding layers to obtain dynamically integrated decoding features.
7. The slope unit extraction method according to claim 1, characterized in that, The process of outputting the predicted map based on the initial terrain feature lines to generate several slope units for the target area includes: Based on the initial terrain feature line prediction map, suspended endpoint identification processing is performed to obtain suspended nodes; Based on the suspended node, a local direction vector calculation is performed to obtain the local direction vector of the broken feature line. Based on the local direction vector of the severed feature line, tolerance extension and capture closure processing are performed to obtain closed nodes and closed feature line network. Based on the closed nodes and closed feature line network, several slope units for the target region are generated.
8. The slope unit extraction method according to claim 7, characterized in that, The process of calculating the local direction vector based on the suspended node to obtain the local direction vector of the severed feature line includes: Based on the dangling node, a backward extraction process is performed along the feature line to obtain a preset number of end adjacent pixel coordinates. Based on the coordinates of the adjacent pixels at the end, a least squares linear fitting process is performed to obtain the parameters of the local fitted line. Based on the local fitted line parameters, the direction from the fitting center point to the suspension node is calculated to obtain a two-dimensional extension direction vector. Based on the two-dimensional extension direction vector, vector normalization is performed to obtain the local direction vector of the severed feature line.
9. The slope unit extraction method according to claim 7, characterized in that, The local directional vector based on the severed feature line is subjected to tolerance-based extension and capture closure processing to obtain a closed node and closed feature line network, including: Based on the local direction vector of the severed feature line, pixel-level virtual step extension processing is performed with the suspended node as the starting point to obtain the extension trajectory point sequence. Based on the extended trajectory point sequence, adjacent feature lines and nodes within a preset tolerance radius are searched to obtain the target capture point. Based on the target capture point, connect it with the suspension node by a straight line segment to obtain a new closed line segment and the corresponding closed node. Based on the newly added closed line segments and their corresponding closed nodes, a topological merging process is performed with the original feature lines to obtain a network of closed nodes and closed feature lines.
10. The slope element extraction method according to claim 4, characterized in that, The TerrainNet deep learning model also includes: A multi-objective joint loss function is used to constrain model training, resulting in a trained terrain feature line prediction model, including: Based on the initial terrain feature line prediction map and the real label map, pixel-by-pixel error calculation is performed to obtain pixel-level classification loss. Based on the initial terrain feature line prediction map and the real label map, soft topological skeleton similarity calculation is performed to obtain the topological connectivity preservation loss. Based on the pixel-level classification loss and topological connectivity preservation loss, dynamic weight allocation and weighted summation are performed to obtain the multi-objective joint loss value. Based on the multi-objective joint loss value, the parameters of the TerrainNet deep learning model are backpropagated and iteratively updated to obtain the trained terrain feature line prediction model.
Citation Information
Patent Citations
Geological disaster risk intelligent pre-judgment method based on deep learning
CN121010228A
Slope stability grade identification method and system based on multi-modal deep learning
CN121459035A
Method, system, device and medium for landslide identification based on full polarimetric SAR
US11747498B1