Window attention and dynamic programming for permafrost table identification in large-scale permafrost regions
By combining window attention and dynamic programming of Swin Transformer, the automatic identification of the upper limit of permafrost in large-scale permafrost regions was achieved, solving the problems of low efficiency and inconsistent interpretation in the existing technology for detecting the upper limit of permafrost, and improving the accuracy and efficiency of permafrost zoning surveys.
Patent Information
- Application Number
- CN202611583179.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-13
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies for detecting the upper limit of permafrost in large-scale permafrost regions suffer from high labor intensity, low efficiency, and inconsistent interpretation results, making it difficult to guarantee the accuracy and continuity of the distribution of the upper limit of permafrost.
By combining the window attention mechanism of Swing Transformer with dynamic programming, multi-scale contextual features are extracted and boundary probabilities are generated. Dynamic programming is then introduced to perform global continuity verification and curvature constraints, thereby achieving stable and continuous identification of the upper limit of permafrost.
It improves the efficiency and accuracy of permafrost zoning surveys, realizes automated and continuous identification of permafrost upper limits, reduces the time and variability of manual interpretation, and is suitable for rapid and objective data support in large-scale permafrost regions.
Smart Images

Figure CN123181987A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of permafrost exploration and detection technology, and in particular to a window attention and dynamic programming method for identifying the upper limit of permafrost in large-scale permafrost regions. Background Technology
[0002] Linear engineering projects in permafrost regions often span tens to hundreds of kilometers. Accurately determining the distribution of the upper limit of permafrost along the route is fundamental for route selection, foundation treatment, and frost damage prevention. Ground-penetrating radar (GPR), with its advantages of being non-destructive, efficient, and capable of continuous imaging, has become the main method for detecting the upper limit of permafrost, enabling the rapid acquisition of continuous profiles reflecting changes in underground dielectric characteristics along the survey line. However, in large-scale permafrost zoning surveys, a single survey line often exceeds 5 kilometers. The radar signal characteristics gradually change along the survey line, and the upper limit of permafrost exhibits a macroscopic pattern of slow fluctuations. At this point, the interpretation of radar images still heavily relies on manual interpretation. Technicians need to analyze the morphology and phase changes of the reflected wave phase axis one by one and manually delineate the interface. This is not only labor-intensive and inefficient, but the interpretation results also vary from person to person, making it difficult to guarantee consistency and repeatability in large-scale data processing. This seriously restricts the efficiency and quality of permafrost zoning surveys.
[0003] Swin Transformer significantly reduces computational complexity while maintaining the global receptive field through a hierarchical window attention mechanism. Its hierarchical structure can capture both local details and global semantics simultaneously. The linear computational complexity of window attention makes it suitable for high-resolution radar image processing, perfectly meeting the needs of long-range context modeling in large-scale permafrost surveys. However, when predicting boundaries independently column by column, this model is susceptible to jumps caused by local noise or anomalous reflections, resulting in a lack of lateral continuity in the output boundary curves. This contradicts the physical nature of the permafrost upper limit as a continuous geological interface—this method solves the problem of "seeing the whole picture" but not the problem of "connecting the dots." Existing methods often add smoothing processing after inference as a remedy, but this post-processing is disconnected from model training and cannot fundamentally solve the problem.
[0004] Dynamic programming searches for the global optimum among candidate paths through state transitions, and uses adjacent column jump constraints and curvature constraints to suppress local jitter, ensuring the continuity and smoothness of the extracted boundaries. This effectively compensates for the lack of lateral continuity constraints in the column-by-column prediction of the Swin Transformer. However, traditional dynamic programming often relies on manually designed features for path search, making it difficult to fully utilize the deep semantic information output by the Swin Transformer. By using the deep semantic features of the Swin Transformer as input to dynamic programming, the recognition process combines an understanding of the long-range context of the entire survey line with the geological constraints of the lateral continuous variation of the permafrost upper limit. The two complement each other—the former provides reliable semantic features, and the latter ensures continuous geometric morphology.
[0005] To address the aforementioned problems, this invention proposes a joint identification method combining window attention and dynamic programming for large-scale permafrost regions. This method uses a Swing Transformer to extract multi-scale contextual features and generate boundary probabilities. Based on this, dynamic programming is introduced to perform global continuity verification and curvature constraints on candidate boundaries, unifying long-range context modeling and lateral continuity constraints within the same framework to achieve stable and continuous identification of the upper limit of permafrost in large-scale permafrost regions. Summary of the Invention
[0006] The purpose of this invention is to address the technical deficiencies in existing technologies by providing a window attention and dynamic programming method for identifying the upper limit of permafrost in a large-scale permafrost region.
[0007] The technical solution adopted to achieve the purpose of this invention is: A window attention and dynamic programming method for identifying the upper limit of permafrost in large-scale permafrost regions includes the following steps: Step 1: Deploy multiple survey channels in a large-scale permafrost area, with multiple sampling points set up on each channel. Ground-penetrating radar (GPR) is deployed at each sampling point to acquire GPR images. ; Step 2, for Resampling yields the input radar image After one-dimensional interpolation, a new boundary sequence is obtained, and finally the true boundary sequence is output. ; Step 3, based on the input radar image A feature extraction model is constructed based on the Swing Transformer window attention and shift window mechanism to extract multi-level hierarchical features. After fusion, the permafrost boundary response map is output. ; Step 4, based on the frozen soil boundary response map The boundary response value is used to generate the boundary probability. The initial value of the continuous boundary is calculated. Dynamic programming is performed on the boundary probability to search for the globally optimal boundary path. The initial value of the continuous boundary is fused with the globally optimal boundary path, and the fused boundary sequence is output. Step 5, based on the real boundary sequence The boundary regression loss is constructed with the continuous boundary initial value, and finally the weighted joint loss function is obtained. The feature extraction model is trained, and the trained feature extraction model is returned to steps 3 and 4 to output the optimized fusion boundary sequence. Step 6: Smooth the optimized fusion boundary sequence. By resetting the zero point of the ground surface depth and reconstructing the physical depth coordinate axis, coordinate correction and range constraints are completed. The pixel-level boundary results are mapped to a spatial sequence of real horizontal distance and underground depth to identify the upper limit of permafrost.
[0008] In the above technical solution, in step 1, the original ground-penetrating radar profile data is represented as follows: ; in, Represents the original radar amplitude matrix; Indicates the first Track measurement in the first Amplitude values at each vertical sampling location; Indicates the number of vertical sampling points; This indicates the number of horizontal measurement channels.
[0009] In the above technical solution, the preprocessing process in step 1 is as follows: first, the amplitude matrix is truncated by quantiles, then the truncated amplitude matrix is standardized, and the standardized result is normalized.
[0010] In the above technical solution, to reduce the impact of abnormal amplitude values on model training and subsequent boundary extraction, the amplitude matrix is truncated using quantiles. The truncated amplitude values are then expressed as follows: ; in: This represents the amplitude value after truncation; This indicates the low quantile truncation threshold; This indicates the high quantile truncation threshold.
[0011] In the above technical solution, the truncated amplitude matrix is standardized: ; in: This represents the standardized amplitude value; This represents the mean of the truncated amplitude matrix; This represents the standard deviation of the truncated amplitude matrix; This represents a very small positive number that prevents the denominator from being zero.
[0012] In the above technical solutions, The interval is used to obtain the radar image matrix: ; This yields the normalized radar image: ; in: This represents the normalized radar image. This represents the normalized pixel value; and These represent the minimum and maximum values in the standardized matrix, respectively.
[0013] In the above technical solution, in step 2, the radar image matrix I obtained in step 1 is resized and resampled to a fixed size. The input radar image is obtained: ; in: This represents the resampled input radar image; Indicates the first v Column, No. u Image pixel values at the row; This indicates the vertical pixel count of the input radar image; This indicates the number of horizontal pixels in the input radar image.
[0014] In the above technical solution, in step 2, the original boundary sequence of the original radar image matrix is obtained through boundary annotation as follows: ; in: Represents the boundary sequence of the radar image matrix; Indicates the original number The row number corresponding to the upper limit boundary of the frozen soil for the strip survey.
[0015] In the above technical solution, a new boundary sequence is obtained by one-dimensional interpolation of the original boundary sequence of the original radar image matrix: ; ; in: The first boundary matrix represents the new boundary matrix. v The new boundary sequence corresponding to the column; This represents a one-dimensional linear interpolation operation; Indicates the target column index v At the corresponding consecutive positions in the original boundary sequence, the original horizontal coordinates are: .
[0016] In the above technical solution, in step 2, when the vertical dimension of the original image is inconsistent with the height of the target image, the new boundary sequence needs to be scaled according to the height ratio to obtain the true boundary sequence: .
[0017] In the above technical solution, step 3 specifically includes the following steps: Step 3.1, input the radar image obtained in Step 2. Expanding it into a single-channel input tensor yields a single-channel input image. : ; Step 3.2, process the single-channel input image Perform patch embedding operation, and Divided into sizes The image patches are mapped to the embedded feature space to obtain the initial feature sequence: ; in, Indicates the total number of image blocks; Indicates the dimension of the embedded features; Represents the initial feature sequence; Step 3.3, in each level of the Swin Transformer, the initial feature sequence Dividing the space into local windows and performing multi-head self-attention within each local window, window self-attention is represented as follows: ; in: Indicates window self-attention; Indicates the dimension of the key vector; This represents the relative position offset matrix. , and These are the query matrix, key matrix, and value matrix within a given window.
[0018] Step 3.4: Introduce a shift window mechanism between adjacent Swing Transformer blocks to enable cross-window information interaction between different windows, obtaining multi-level hierarchical features, preferably a four-level hierarchical feature map: ; in: Indicates shallow detail features; and Indicates the characteristics of the middle layer structure; Represents deep semantic features; Step 3.5: Perform step-by-step upsampling and skip connections on the multi-level hierarchical features to obtain a high-resolution fused feature map: ; in: This represents the fused high-resolution feature map; This represents the number of channels in the fused feature map; Step 3.6, the high-resolution fused feature map Input the boundary prediction header, output the permafrost boundary response map: ; in: Indicates the first Liede The response value at the line belongs to the upper limit boundary of permafrost.
[0019] In the above technical solution, step 4 specifically includes the following steps: Step 4.1, for the frozen soil boundary response map Perform a softmax operation on each column along the vertical direction to obtain the boundary probability distribution and construct the boundary probability map: ; in: Indicates the first Ranked in The boundary probability that the location belongs to the upper limit of permafrost; Indicates the first Ranked in Boundary response value at the row; Step 4.2: Based on the boundary probabilities, calculate the initial values of the continuous boundaries for each column using soft-argmax: ; in: Indicates the first Initial values for the continuous boundaries of the column; Step 4.3, in order to overcome the local jumps and pseudo-boundary responses caused by column-by-column independent prediction, in the boundary probability map Perform dynamic programming path search to obtain the optimal cumulative path: ; ; in: For the first Liede The boundary of the place, Indicates reaching the th Liede The optimal cumulative path at each position; Indicates the candidate boundary row number of the previous column; Indicates the boundary row number corresponding to the optimal path in the first two columns; Indicates the penalty coefficient for transitions between adjacent column boundaries; This represents the penalty coefficient for changes in boundary curvature; Step 4.4, based on the optimal cumulative path By using dynamic programming to backtrack from the last column, the globally optimal boundary path can be obtained: ; in: The result obtained by dynamic programming search is the first... Column optimal boundary row number; Step 4.5: Merge the initial values of the continuous boundaries with the globally optimal boundary path to obtain the merged boundary sequence: ; ; in: Indicates the boundary row number after merging; Represents the fusion weight coefficient, satisfying .
[0020] In the above technical solution, in step 5, the weighted joint loss function is: ; in: Represents the total loss function; Indicates the boundary regression loss; Represents cross-entropy loss; Indicates boundary smoothing loss; This represents the gradient alignment loss; This represents the depth range constraint loss; This represents the consistency loss in dynamic programming. Represents the probability distribution constraint weights; Indicates the weights of the smoothing loss; Indicates the gradient alignment loss weights; Indicates the depth range constraint weight; This represents the consistency loss weight in dynamic programming.
[0021] In the above technical solution, a smooth L1 loss is used to constrain the continuous boundary initial value and the true boundary sequence. The bias is used to obtain the boundary regression loss: ; in: This represents the boundary regression loss.
[0022] In the above technical solution, the cross-entropy loss is constructed through the following process: using the true boundary sequence A Gaussian soft-label distribution is constructed around the target probability distribution. After normalization, the target probability distribution is obtained. A cross-entropy loss is then constructed based on the target probability distribution and the predicted probability distribution. , Indicates a Gaussian soft label distribution; This represents the target probability distribution.
[0023] In the above technical solution, the Gaussian soft label distribution is as follows: ; The target probability distribution: ; in: This represents the boundary label smoothing parameter.
[0024] In the above technical solution, the boundary smoothing loss is: ; To ensure the lateral continuity of the boundary, a first-order difference is introduced. and smooth curvature constraints : ; ; In the above technical solution, the process of constructing the gradient alignment loss is as follows: For the input radar image... The Sobel gradient response is calculated along the vertical direction to obtain the longitudinal gradient magnitude. Perform logarithmic compression and normalization, then apply initial values around continuous boundaries. Construct a Gaussian weight function and build a gradient alignment loss: ; Preferably, the longitudinal gradient magnitude : ; in: Indicates the first Liede Vertical gradient magnitude at the row position; Represents the vertical Sobel convolution kernel; This represents the convolution operation; Preferably, the longitudinal gradient magnitude after logarithmic compression and normalization ; ; Preferably, the Gaussian weighting function is:
[0025] in: Indicates the Gaussian weights near the boundary; This represents the width parameter of the gradient alignment window.
[0026] In the above technical solution, the depth range constraint loss is: ; ; ; in, Indicates the minimum effective depth The corresponding minimum valid line number; Indicates the maximum effective depth The corresponding maximum valid line number; This indicates the minimum pixel row number that is allowed to appear in the permafrost area. This indicates the maximum allowed pixel row number in the permafrost area.
[0027] In the above technical solution, the dynamic programming consistency loss is: ; in: This represents the consistency loss in dynamic programming. This represents the boundary row number of the optimal path obtained through dynamic programming search.
[0028] In the above technical solution, in step 6, a moving average smoothing is performed on the optimized fusion boundary sequence to obtain the smoothed boundary: ; in: Represents the smoothed first... Column boundaries; Indicates the length of the smooth window; Indicates half the width of the window; Indicates the first The optimized fusion boundary sequence of the column.
[0029] Let the row number of the surface be . Then the Earth's surface is redefined as the zero depth point, and the row number of the boundary relative to the Earth's surface is represented as follows: ; in: Indicates the boundary row number relative to the zero point on the Earth's surface; Indicates the row number of the surface.
[0030] Set the height of the cropped image for: ; The scope of the boundary line number is then restricted: ; Reconstruct the depth coordinate axis based on the Earth's surface: ; in: , This indicates the preset maximum detection depth corresponding to the radar image. Indicates the number after cutting The physical depth corresponding to the row, in meters; Mapping the boundary row numbers to the actual depths yields the sequence of upper limits for permafrost depth: ; in: Indicates the first The actual upper limit of the frozen soil depth corresponding to the survey track, in meters; At the same time, based on the total length of the survey line Construct horizontal distance coordinates: ; in: Indicates the first The horizontal distance corresponding to each column, in meters; This indicates the total length of the survey line, in meters. The final spatial sequence of upper limit results for permafrost is obtained as follows: ; It outputs identification results including the boundary relative to the ground surface row number, the actual depth of the boundary, the initial value of the continuous boundary, the boundary of the optimal path of dynamic programming, and a visual interpretation map, realizing the automatic identification and expression of the upper limit of permafrost.
[0031] Compared with the prior art, the beneficial effects of the present invention are: This invention addresses the characteristics of long survey lines, gradual signal changes, and continuous interface variations in large-scale permafrost regional surveys. It deeply integrates the global context modeling capabilities of the Swin Transformer with the global path optimization capabilities of dynamic programming, forming a collaborative identification mechanism driven by feature extraction and path decoding. Compared with existing technologies, its superiority and advancement in large-scale permafrost regions are mainly reflected in the following aspects.
[0032] I. Window Attention Mechanism Overcomes Local Receptive Field Limitations, Effectively Capturing Long-Range Dependencies Across the Entire Survey Line. In large-scale permafrost regions, a single survey line often exceeds 5 kilometers. The upper limit reflection characteristics of permafrost evolve slowly with overburden conditions, and clear contextual relationships exist between long-distance signals: the signal characteristics of a certain segment can often provide a reference for interface judgment under similar geological conditions several kilometers away. Traditional convolutional networks typically have a receptive field limited to a neighborhood of several hundred pixels, failing to establish such long-range dependencies, leading to shifts or drifts in signal transition zones. This invention employs the SwinTransformer, which uses a hierarchical window attention mechanism to finely model the reflection texture between adjacent traces within a local window. Simultaneously, it utilizes a shifted window to achieve cross-window information interaction, enabling the network to obtain a global receptive field covering the entire profile while maintaining computational efficiency. Boundary judgments for each column can reference the contextual information of the entire survey line. Even if the reflection signal weakens due to local water content anomalies, the model can make reasonable inferences based on the strong signal characteristics of similar strata at a distance, effectively avoiding systematic biases caused by insufficient receptive fields under long survey line conditions.
[0033] II. Dynamic Programming Global Path Search Ensures Lateral Continuity and Geological Rationality of Identification Results. As a continuous underground geological interface, the upper limit of permafrost should exhibit a smooth, undulating shape along the survey line, with no drastic abrupt changes in depth between adjacent survey lines. However, the independent prediction of each column in a neural network inherently lacks lateral correlation constraints, and local noise or abnormal reflections can easily cause the prediction results of certain columns to deviate from the true interface. This invention introduces dynamic programming path search based on the boundary probability map output by the Swing Transformer, directly incorporating the penalties for boundary jumps in adjacent columns and curvature changes into the path optimization objective function. This design ensures that the final output boundary path is a globally optimal solution that comprehensively considers the boundary probability of each column and the continuity between adjacent columns across the entire profile. Even if some columns exhibit false peaks in boundary probability due to local interference, as long as their continuity with the preceding and following columns is poor, dynamic programming will give them lower weights in the global recursion, effectively suppressing local jumps and ensuring the smooth continuity of the upper limit curve of the entire profile, which better conforms to the actual undulation law of the upper limit of permafrost.
[0034] III. Dynamic Programming Consistency Loss Achieves Collaboration Between Training and Decoding Objectives, Avoiding the Drawbacks of Separate Optimization. Most existing methods treat neural network prediction and subsequent smoothing as two independent stages: during network training, only pixel-level annotations are used as the supervision target, and smoothing is added as a remedy after inference. This separate design leads to predictions deemed appropriate by the model during training being over-modified during post-processing, making it difficult to achieve global optimum. This invention specifically designs a dynamic programming consistency loss function, which collaboratively constrains the globally optimal path obtained by dynamic programming search with the continuous initial boundary values of the neural network output, prompting the network to actively move towards the globally optimized result of dynamic programming during training. Through this joint optimization, the model retains the efficiency of end-to-end prediction while absorbing the advantages of dynamic programming in global continuity. This ensures that the initial boundary values of the network output itself possess good lateral consistency, and the dynamic programming in the inference stage mainly serves as verification and fine-tuning rather than significant correction, fundamentally improving the stability of the recognition results.
[0035] IV. Balancing Accuracy and Efficiency with Hierarchical Structure and Linear Computational Complexity to Meet the Needs of Large-Scale Data Processing. Large-scale permafrost zoning surveys involve massive amounts of radar data, placing practical demands on the computational efficiency of algorithms. The global self-attention computational complexity of standard visual Transformers is quadratically related to image size, making it difficult to directly apply to high-resolution radar profiles. This invention utilizes the Swin Transformer, which limits the self-attention computational range through a window, reducing the complexity to a linear relationship with image size, enabling efficient processing of radar profiles several kilometers long on ordinary workstations. Simultaneously, its four-level hierarchical feature pyramid structure allows the network to capture local texture details and global semantic information at different scales, ensuring both accurate boundary localization and high inference speed. This characteristic makes this invention suitable not only for indoor batch data processing but also for real-time or near-real-time interpretation in the field, significantly improving the efficiency of large-scale permafrost zoning surveys.
[0036] V. End-to-end automatic interpretation directly outputs the upper limit curve of the frozen soil along the entire profile, meeting the needs of engineering zoning. The ultimate goal of large-scale frozen soil zoning surveys is to obtain information on the upper limit depth of frozen soil continuously distributed along the line for use in frozen soil engineering geological zoning and risk assessment. Traditional methods require processing each radar profile separately and then stitching the results of each segment together for analysis, which is labor-intensive and makes it difficult to ensure accurate alignment of spatial positions between segments. This invention inputs the entire long survey line radar profile as a whole into the network. A single forward propagation can obtain the upper limit boundary of frozen soil continuously distributed along the entire survey line. The results are naturally in the same spatial coordinate system, eliminating the need for additional registration and stitching. The final output directly includes horizontal coordinates, freezing depth values at each point, and prediction confidence levels, which can quickly generate freezing depth profile maps, providing direct evidence for frozen soil engineering geological zoning. This function enables this invention to complete the process from raw data to final results with a single click, greatly improving the automation level and engineering practical value of large-scale frozen soil zoning surveys.
[0037] VI. Compared with manual interpretation, this technology demonstrates significant advantages in large-scale permafrost zoning surveys. In large-scale permafrost zoning surveys, a single survey line often exceeds 5 kilometers and contains thousands of radar data points. Manual interpretation requires tracing the reflection phase axis channel by channel, judging the interface undulation trend, and maintaining the consistency of the entire profile. The complete interpretation of a single survey line often takes several days, and different technicians have systematic differences in judging the interface attribution of signal transition sections. This invention automatically captures the long-range contextual information of the entire survey line using a window attention mechanism and automatically completes interface tracking and lateral continuity constraints using dynamic programming. The entire processing time from data input to permafrost upper limit curve output for a single survey line is shortened to the minute level, which is more than two orders of magnitude more efficient than manual interpretation. At the same time, it eliminates the problem of inconsistent interpretation caused by differences in personal experience. This efficiency advantage enables this invention to have batch processing capabilities in large-scale permafrost zoning surveys, and can complete the interpretation of the spatial distribution of permafrost upper limits for dozens of survey lines in a short time, providing rapid and objective data support for regional permafrost engineering geological zoning. Attached Figure Description
[0038] Figure 1 A flowchart illustrating the method of the present invention.
[0039] Figure 2 Logical graph for multi-scale feature extraction and boundary response generation for Swin Transformer.
[0040] Figure 3 This is a logic diagram for boundary probability generation and dynamic programming path search.
[0041] Figure 4 A logic graph for constructing and training the joint loss function is provided.
[0042] Figure 5 Interpretation of the upper limit of permafrost from radar imagery. Detailed Implementation
[0043] The present invention will be further described in detail below with reference to specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0044] like Figure 1 As shown, a window attention and dynamic programming method for identifying the upper limit of permafrost in a large-scale permafrost region includes the following steps: Step 1: Multiple survey channels are deployed in a large-scale permafrost area, with multiple sampling points set up on each channel. Ground-penetrating radar is deployed at each sampling point to acquire the original radar amplitude matrix. The amplitude matrix is first truncated by quantiles, then standardized, and finally normalized to obtain the ground-penetrating radar image. ; The original ground-penetrating radar amplitude matrix: ; in, Represents the original radar amplitude matrix; Indicates the first Track measurement in the first Amplitude values at each vertical sampling location; Indicates the number of vertical sampling points; This indicates the number of horizontal measurement channels.
[0045] Furthermore, to mitigate the impact of abnormal amplitude values on model training and subsequent boundary extraction, the amplitude matrix is truncated using quantiles. The truncated amplitude matrix is then expressed as: ; in: This represents the amplitude value after truncation; This indicates the low quantile truncation threshold; This indicates the high quantile truncation threshold.
[0046] Perform normalization on the truncated amplitude matrix: ; in: This represents the standardized amplitude value; This represents the mean of the truncated amplitude matrix; This represents the standard deviation of the truncated amplitude matrix; This represents a very small positive number that prevents the denominator from being zero.
[0047] Furthermore, the standardized results are normalized to The interval is used to obtain the radar image matrix: ; This yields the normalized ground-penetrating radar image: ; in: This represents a normalized ground-penetrating radar image. This represents the normalized pixel value; and These represent the minimum and maximum values in the standardized matrix, respectively.
[0048] Step 2, for Resampling yields the input radar image According to the preset maximum detection depth A uniform depth coordinate axis is constructed, the original boundary sequence is obtained through boundary annotation, a new boundary sequence is obtained through one-dimensional interpolation, and finally the true boundary sequence is output. ; Preferably, the radar image matrix obtained in step 1... Perform size transformation and resample to a fixed size. The input radar image is obtained: ; in: This represents the resampled input radar image matrix; Indicates the first v Column, No. u Image pixel values at the row; This indicates the vertical pixel count of the input radar image; This indicates the number of horizontal pixels in the input radar image.
[0049] Preferably, based on the preset maximum detection depth Construct a uniform depth coordinate axis: ; ; in: This represents the depth coordinate axis corresponding to the vertical direction of the radar image; Indicates the first The physical depth corresponding to a row of pixels, in meters; This indicates the preset maximum detection depth corresponding to the radar image, in meters.
[0050] Preferably, By labeling the boundaries, the original boundary sequence of the original radar image matrix is obtained. One-dimensional interpolation is then performed on the original boundary sequence to obtain a new boundary sequence. ; ; in: Represents the new boundary sequence of the radar image matrix; The first boundary sequence represents the new boundary sequence. v The new boundary row number corresponding to the column; This represents a one-dimensional linear interpolation operation; Indicates the target column index v The corresponding consecutive positions in the original boundary sequence; This indicates the number of horizontal tracks; the original horizontal coordinate is... ; Indicates the number of horizontal pixels.
[0051] Preferably, when the vertical dimension of the original image is inconsistent with the height of the target image, the new boundary sequence needs to be scaled according to the height ratio to obtain the true boundary sequence: .
[0052] Step 3, based on the input radar image To achieve this, a feature extraction model is constructed based on the Swin Transformer window attention and shift window mechanism. Multi-level hierarchical features are extracted, and after multi-scale feature fusion, the permafrost boundary response map is output. Specifically, it includes the following steps ( Figure 2 ): Step 3.1, input the radar image obtained in Step 2. Expanding it into a single-channel input tensor yields a single-channel input image. : ; Step 3.2, Image Patch Segmentation and Embedding: For single-channel input images Perform patch embedding operation, and Divided into sizes The image patch (fixed-size window) is mapped to the embedded feature space to obtain the initial feature sequence: ; in, Indicates the total number of image blocks; Indicates the dimension of the embedded features; Represents the initial feature sequence; Step 3.3, in each level of the Swin Transformer, the initial feature sequence Dividing the space into local windows and performing multi-head self-attention within each local window, window self-attention is represented as follows: ; in: Indicates window self-attention; Indicates the dimension of the key vector; This represents the relative position offset matrix. , and These are the query matrix, key matrix, and value matrix within a given window.
[0053] Step 3.4: Introduce a shift window mechanism between adjacent Swing Transformer blocks to enable cross-window information interaction between different windows, obtaining multi-level hierarchical features, preferably four-level hierarchical features: ; in: Indicates shallow detail features; and Indicates the characteristics of the middle layer structure; It represents deep semantic features.
[0054] Step 3.5: Perform step-by-step upsampling and skip connections on the multi-level hierarchical features to obtain a high-resolution fused feature map: ; in: This represents the fused high-resolution feature map; This represents the number of channels in the fused feature map; Step 3.6, the high-resolution fused feature map Input boundary prediction head outputs frozen soil boundary response map: ; in: Indicates the first Liede The response value at the line belongs to the upper limit boundary of permafrost.
[0055] Step 4, based on the frozen soil boundary response map The boundary response values are used to generate boundary probabilities. Initial values for continuous boundaries are calculated. Dynamic programming is performed on these boundary probabilities to search for the globally optimal boundary path. The initial values for continuous boundaries are then fused with the globally optimal boundary path to output a fused boundary sequence. Specifically, this includes the following steps: Figure 3 ): Step 4.1, for the frozen soil boundary response map Perform a softmax operation on each column along the vertical direction to obtain the boundary probability distribution, and construct the boundary probability: ; in: Indicates the first Ranked in The boundary probability that the location belongs to the upper limit of permafrost; Indicates the first Ranked in Boundary response value at the row.
[0056] Step 4.2: Based on the boundary probability map, calculate the initial values of the continuous boundaries for each column using soft-argmax: ; in: Indicates the first Initial values for the continuous boundaries of the column.
[0057] Step 4.3, in order to overcome the local jumps and pseudo-boundary responses caused by column-by-column independent prediction, in the boundary probability map The dynamic programming path search is performed to obtain the optimal cumulative path through the state transition equation: ; ; in: For the first Liede The boundary of the place, Indicates reaching the th Liede The optimal cumulative path at each position; Indicates the candidate boundary row number of the previous column; Indicates the boundary row number corresponding to the optimal path in the first two columns; Indicates the penalty coefficient for transitions between adjacent column boundaries; This represents the penalty coefficient for changes in boundary curvature.
[0058] Step 4.4, Optimal Path Search: Based on the optimal cumulative path By using dynamic programming to backtrack from the last column, the globally optimal boundary path can be obtained: ; in: The result obtained by dynamic programming search is the first... The optimal boundary row number of the column.
[0059] Step 4.5: Merge the initial values of the continuous boundaries with the globally optimal boundary path to obtain the merged boundary sequence: ; ; in: Indicates the boundary row number after merging; Represents the fusion weight coefficient, satisfying .
[0060] Step 5, based on the real boundary sequence A boundary regression loss is constructed using continuous boundary initial values, followed by a cross-entropy loss, boundary smoothing loss, gradient alignment loss, range constraint loss, and dynamic programming consistency loss, ultimately yielding a weighted joint loss function. This function is then used to train the feature extraction model. Figure 4 The trained feature extraction model is returned to steps 3 and 4, outputting the optimized fusion boundary sequence. Preferably, the weighted joint loss function is: ; in: Represents the total loss function; Indicates the boundary regression loss; Represents cross-entropy loss; Indicates boundary smoothing loss; This represents the gradient alignment loss; This represents the depth range constraint loss; This represents the consistency loss in dynamic programming. Represents the probability distribution constraint weights; Indicates the weights of the smoothing loss; Indicates the gradient alignment loss weights; Indicates the depth range constraint weight; This represents the consistency loss weight in dynamic programming.
[0061] Preferably, a smooth L1 loss is used to constrain the continuous boundary initial value and the true boundary sequence. The bias is used to obtain the boundary regression loss: ; in: This represents the boundary regression loss.
[0062] Preferably, the cross-entropy loss is constructed through the following process: using the true boundary sequence A Gaussian soft-label distribution is constructed around the target probability distribution. After normalization, the target probability distribution is obtained. A cross-entropy loss is then constructed based on the target probability distribution and the predicted probability distribution. , Indicates a Gaussian soft label distribution; This represents the target probability distribution.
[0063] Preferably, the Gaussian soft label distribution is as follows: ; The target probability distribution: ; in: This represents the boundary label smoothing parameter.
[0064] Preferably, the boundary smoothing loss is: ; To ensure the lateral continuity of the boundary, a first-order difference is introduced. and smooth curvature constraints : ; ; Preferably, the gradient alignment loss process is as follows: for the input radar image The Sobel gradient response is calculated along the vertical direction to obtain the longitudinal gradient magnitude. Perform logarithmic compression and normalization, then apply initial values around continuous boundaries. Construct a Gaussian weight function and build a gradient alignment loss: ; Preferably, the longitudinal gradient magnitude : ; in: Indicates the first Liede Vertical gradient magnitude at the row position; Represents the vertical Sobel convolution kernel; This represents the convolution operation; Preferably, the longitudinal gradient magnitude after logarithmic compression and normalization ;
[0065] Preferably, the Gaussian weighting function is: ; in: Indicates the Gaussian weights near the boundary; This represents the width parameter of the gradient alignment window.
[0066] The depth range constraint loss is: ; ; ; in, Indicates the minimum effective depth The corresponding minimum valid line number; Indicates the maximum effective depth The corresponding maximum valid line number; This indicates the minimum pixel row number that is allowed to appear in the permafrost area. This indicates the maximum allowed pixel row number in the permafrost area.
[0067] Preferably, the dynamic programming consistency loss is: .
[0068] in: This represents the consistency loss in dynamic programming. This represents the boundary row number of the optimal path obtained through dynamic programming search.
[0069] Step 6: Smooth the optimized fusion boundary sequence and output the smoothed boundary. By resetting the zero point of the ground surface depth and reconstructing the physical depth coordinate axis, coordinate correction and range constraints are completed, and pixel-level boundary results are mapped into a spatial sequence of real horizontal distance and underground depth to identify the upper limit of permafrost.
[0070] Preferably, the optimized fusion boundary sequence is smoothed using a moving average to obtain the smoothed boundary: ; in: Represents the smoothed first... Column boundary row number; Indicates the length of the smooth window; Indicates half the width of the window; Indicates the first Optimized fusion boundary sequence of columns Let the row number of the surface be . Then the Earth's surface is redefined as the zero depth point, and the row number of the boundary relative to the Earth's surface is represented as follows: ; in: Indicates the boundary row number relative to the zero point on the Earth's surface; Indicates the row number of the surface.
[0071] Let the height of the cropped image be: ; The scope of the boundary line number is then restricted: ; Reconstruct the depth coordinate axis based on the Earth's surface: ; ; in: Indicates the number after cutting The physical depth corresponding to the row, in meters.
[0072] Mapping the boundary row numbers to the actual depths yields the sequence of upper limits for permafrost depth: ; in: Indicates the first The actual depth of the upper limit of frozen soil corresponding to the survey track, in meters.
[0073] At the same time, based on the total length of the survey line Construct horizontal distance coordinates: ; in: Indicates the first The horizontal distance corresponding to each column, in meters; This indicates the total length of the survey line, in meters.
[0074] The final spatial sequence of upper limit results for permafrost is obtained as follows: ; like Figure 5As shown, it outputs recognition results including the boundary relative to the surface row number, the actual depth of the boundary, the initial value of the continuous boundary, the optimal path boundary of dynamic programming, and a visual interpretation map, realizing the automatic identification and expression of the upper limit of permafrost. Figure 5 It can be seen that the permafrost upper limit curve obtained by the method of this invention can still maintain continuous fit in areas with weak reflection, local discontinuity, and strong background clutter. Compared with threshold segmentation, edge detection, or column-by-column independent deep learning prediction methods, this invention simultaneously utilizes the global context features of the Swin Transformer and the jump and curvature constraints of dynamic programming, which can reduce false boundary jumps, boundary breaks, and local misjudgments, making the interpreted curve smoother in details and more consistent with the actual fluctuations of the permafrost upper limit at turning points. Compared with the measured results (blue dots), the identification error of the method of this invention is within 7.35%, verifying the effectiveness of the method in identifying the permafrost upper limit in large-scale permafrost areas.
[0075] The above description is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A window attention and dynamic programming method for identifying the upper limit of permafrost in a large-scale permafrost region, characterized in that, Includes the following steps: Step 1: Deploy multiple survey channels in a large-scale permafrost area, with multiple sampling points set up on each channel. Ground-penetrating radar (GPR) is deployed at each sampling point to acquire GPR images. ; Step 2, for Resampling yields the input radar image After one-dimensional interpolation, a new boundary sequence is obtained, and finally the true boundary sequence is output. ; Step 3, based on the input radar image A feature extraction model is constructed based on the Swing Transformer window attention and shift window mechanism to extract multi-level hierarchical features. After fusion, the permafrost boundary response map is output. ; Step 4, based on the frozen soil boundary response map The boundary response value is used to generate the boundary probability. The initial value of the continuous boundary is calculated. Dynamic programming is performed on the boundary probability to search for the globally optimal boundary path. The initial value of the continuous boundary is fused with the globally optimal boundary path, and the fused boundary sequence is output. Step 5, based on the real boundary sequence The boundary regression loss is constructed with the continuous boundary initial value, and finally the weighted joint loss function is obtained. The feature extraction model is trained, and the trained feature extraction model is returned to steps 3 and 4 to output the optimized fusion boundary sequence. Step 6: Smooth the optimized fusion boundary sequence. By resetting the zero point of the ground surface depth and reconstructing the physical depth coordinate axis, coordinate correction and range constraints are completed. The pixel-level boundary results are mapped to a spatial sequence of real horizontal distance and underground depth to identify the upper limit of permafrost in a large-scale permafrost area.
2. The large-scale permafrost region window attention and dynamic programming permafrost upper limit identification method according to claim 1, characterized in that, In step 2, the radar image obtained in step 1 is... Perform size transformation and resample to a fixed size. The input radar image is obtained, and the original boundary sequence of the original radar image matrix is obtained through boundary annotation. One-dimensional interpolation is then performed on the original boundary sequence to obtain a new boundary sequence. ; ; in: Represents the new boundary sequence of the radar image matrix; The first boundary sequence represents the new boundary sequence. v The new boundary row number corresponding to the column; This represents a one-dimensional linear interpolation operation; Indicates the target column index v The corresponding consecutive positions in the original boundary sequence; This indicates the number of horizontal tracks; the original horizontal coordinate is... ; Indicates the number of horizontal pixels; When the vertical dimension of the original image is inconsistent with the height of the target image, the new boundary sequence needs to be scaled according to the height ratio to obtain the true boundary sequence. : 。 3. The large-scale permafrost region window attention and dynamic programming permafrost upper limit identification method according to claim 2, characterized in that, Step 3 specifically includes the following steps: Step 3.1, input the radar image obtained in Step 2. Expanding it into a single-channel input tensor yields a single-channel input image. : ; Step 3.2, process the single-channel input image Perform patch embedding operation, and The image is divided into patches and mapped to the embedded feature space to obtain the initial feature sequence: ; in, Indicates the total number of image blocks; Indicates the dimension of the embedded features; Represents the initial feature sequence; Step 3.3, in each level of the Swin Transformer, the initial feature sequence Dividing the space into local windows and performing multi-head self-attention within each local window, window self-attention is represented as follows: ; in: Indicates window self-attention; Indicates the dimension of the key vector; This represents the relative position offset matrix. , and These are the query matrix, key matrix, and value matrix within a given window; Step 3.4 introduces a shift window mechanism between adjacent Swing Transformer blocks to enable cross-window information interaction between different windows, thereby obtaining multi-level hierarchical features: ; in: Indicates shallow detail features; and Indicates the characteristics of the middle layer structure; Represents deep semantic features; Step 3.5: Perform step-by-step upsampling and skip connections on the multi-level hierarchical features to obtain a high-resolution fused feature map: ; in: This represents the fused high-resolution feature map; This represents the number of channels in the fused feature map; Step 3.6, the high-resolution fused feature map Input the boundary prediction header, output the permafrost boundary response map: ; in: Indicates the first Liede The response value at the upper boundary of the permafrost is where the line is located. This indicates the number of vertical pixels.
4. The large-scale permafrost region window attention and dynamic programming permafrost upper limit identification method according to claim 3, characterized in that, Step 4 specifically includes the following steps: Step 4.1, for the frozen soil boundary response map Perform a softmax operation on each column along the vertical direction to obtain the boundary probability distribution, and construct the boundary probability: ; in: Indicates the first Ranked in The boundary probability that the location belongs to the upper limit of permafrost; Indicates the first Ranked in Boundary response value at the row; Step 4.2: Based on the boundary probabilities, calculate the initial values of the continuous boundaries for each column using soft-argmax: ; in: Indicates the first Initial values for the continuous boundaries of the column; Step 4.3: Perform dynamic programming path search on the boundary probabilities to obtain the optimal cumulative path: ; ; in: For the first Liede The boundary of the place, Indicates reaching the th Liede The optimal cumulative path at each position; Indicates the candidate boundary row number of the previous column; Indicates the boundary row number corresponding to the optimal path in the first two columns; Indicates the penalty coefficient for transitions between adjacent column boundaries; This represents the penalty coefficient for changes in boundary curvature; Step 4.4, based on the optimal cumulative path By using dynamic programming to backtrack from the last column, the globally optimal boundary path can be obtained: ; in: The result obtained by dynamic programming search is the first... Column optimal boundary row number; Step 4.5: Merge the initial values of the continuous boundaries with the globally optimal boundary path to obtain the merged boundary sequence: ; ; in: Indicates the boundary row number after merging; Represents the fusion weight coefficient, satisfying .
5. The large-scale permafrost region window attention and dynamic programming permafrost upper limit identification method according to claim 4, characterized in that, In step 5, the weighted joint loss function is: ; in: Represents the total loss function; Indicates the boundary regression loss; Represents cross-entropy loss; Indicates boundary smoothing loss; This represents the gradient alignment loss; This represents the depth range constraint loss; This represents the consistency loss in dynamic programming. Represents the probability distribution constraint weights; Indicates the weights of the smoothing loss; Indicates the gradient alignment loss weights; Indicates the depth range constraint weight; This represents the consistency loss weight in dynamic programming.
6. The large-scale permafrost region window attention and dynamic programming permafrost upper limit identification method according to claim 5, characterized in that, Using smooth L1 loss to constrain continuous boundary initial values and true boundary sequences The bias is used to obtain the boundary regression loss: ; in: This represents the boundary regression loss.
7. The large-scale permafrost region window attention and dynamic programming permafrost upper limit identification method according to claim 6, characterized in that, The cross-entropy loss is constructed using the following process: with the true boundary sequence A Gaussian soft-label distribution is constructed around the target probability distribution. After normalization, the target probability distribution is obtained. A cross-entropy loss is then constructed based on the target probability distribution and the predicted probability distribution. , Indicates a Gaussian soft label distribution; Represents the target probability distribution; The Gaussian soft label distribution: ; The target probability distribution: ; in: Indicates the boundary label smoothing parameter; This represents a very small positive number that prevents the denominator from being zero.
8. The large-scale permafrost region window attention and dynamic programming permafrost upper limit identification method according to claim 7, characterized in that, Introducing first-order difference and smooth curvature constraints Construct the boundary smoothing loss: ; ; 。 9. The large-scale permafrost region window attention and dynamic programming permafrost upper limit identification method according to claim 8, characterized in that, The gradient alignment loss is constructed as follows: For the input radar image... The Sobel gradient response is calculated along the vertical direction to obtain the longitudinal gradient magnitude. Perform logarithmic compression and normalization, then apply initial values around continuous boundaries. Construct a Gaussian weight function and build a gradient alignment loss: ; The depth range constraint loss is: ; ; ; in, Indicates the minimum effective depth The corresponding minimum valid line number; Indicates the maximum effective depth The corresponding maximum valid line number; This indicates the minimum pixel row number that is allowed to appear in the permafrost area. This indicates the maximum allowed pixel row number in the permafrost area; The consistency loss of dynamic programming: ; in: This represents the consistency loss in dynamic programming. This represents the boundary row number of the optimal path obtained through dynamic programming search.
10. The large-scale permafrost region window attention and dynamic programming permafrost upper limit identification method according to claim 9, characterized in that, In step 6, a moving average smoothing process is performed on the optimized fusion boundary sequence to obtain the smoothed boundary: ; in: Represents the smoothed first... Column boundaries; Indicates the length of the smoothing window; Indicates half the width of the window; Indicates the first The optimized fusion boundary sequence of the column; Let the row number of the surface be . Then the Earth's surface is redefined as the zero depth point, and the row number of the boundary relative to the Earth's surface is represented as follows: ; in: Indicates the boundary row number relative to the zero point on the Earth's surface; Indicates the row number of the surface location; Set the height of the cropped image for: ; The scope of the boundary line number is then restricted: ; Reconstruct the depth coordinate axis based on the Earth's surface: ; in: , This indicates the preset maximum detection depth corresponding to the radar image. Indicates the number after cutting The physical depth corresponding to the row; Mapping the boundary row numbers to the actual depths yields the sequence of upper limits for permafrost depth: ; in: Indicates the first The actual depth of the upper limit of frozen soil corresponding to the survey track; At the same time, based on the total length of the survey line Construct horizontal distance coordinates: ; in: Indicates the first The horizontal distance corresponding to the column; Indicates the total length of the survey line; The final spatial sequence of upper limit results for permafrost is obtained as follows: 。
