Method and system for automatic generation of line path profile based on ai

CN122780451APending Publication Date: 2026-09-18ZHUHAI HUACHENG ELECTRIC POWER DESIGN INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611252227.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

此外,地形处理、弧垂计算、图层组织及DXF出图往往分散在不同软件或处理环节中,存在数据重复录入和转换过程,容易造成里程、高程、塔位及弧垂曲线之间不一致,影响出图效率和审图可靠性

Benefits of technology

[0014] This application, based on traditional contour line spatial interpolation, introduces a terrain feature matrix containing information on contour line distribution, multi-directional elevation differences, and interpolation reliability. It then utilizes a one-dimensional fully convolutional residual network to obtain point-by-point predicted elevations and their standard deviations, providing quantifiable uncertainty data for route elevation reconstruction. By comparing traditional interpolated elevations with predicted elevations point-by-point, regions are categorized as consistent, suspicious, and anomalous based on their predicted standard deviations. Differentiated weighted fusion or local re-interpolation with expanded search ranges is applied to different regions. Sampling points that still do not meet the criteria are written into the output metadata for manual review. This approach, while preserving the geometric basis of traditional interpolation, reduces the risk of significant elevation deviations caused by sparse contour lines, abrupt terrain changes, and interpolation hole filling areas. Combining incremental updates of measured elevation samples with sag calculation, layer drawing, and standard DXF output ensures that the elevation processing results are stably integrated into the plan and profile map generation process, improving the consistency of route design data and the reliability of map review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122780451A_ABST
    Figure CN122780451A_ABST
Patent Text Reader

Abstract

The application discloses an AI-based line path profile automatic generation method and system, which comprises the following steps: performing spatial interpolation on contour data in a design file along a line path to obtain a traditional interpolation height sequence; extracting contour distribution characteristics, multi-aspect elevation difference characteristics and interpolation reliability characteristics of each sampling point to form a terrain feature matrix; inputting the terrain feature matrix into a pre-trained elevation prediction network to obtain a predicted height sequence and a predicted standard deviation sequence; dividing the sampling points into consistent regions, suspicious regions and abnormal regions according to the point-by-point absolute deviation of the traditional interpolation elevation and the predicted elevation and the corresponding predicted standard deviation, and performing differential weighted fusion or local re-interpolation processing on the regions respectively to obtain a fusion height sequence as the elevation input data for generating the line path profile. The application can improve the accuracy of path elevation reconstruction and the reliability of profile generation under complex terrain conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital design technology for power transmission lines, and more specifically, to an AI-based method and system for automatically generating cross-sectional diagrams of power transmission lines. Background Technology

[0002] With the development of digital design technology for overhead transmission lines, route selection, tower location layout, and plan and profile drawing preparation are increasingly being completed using digital graphic design, measurement software, and drawing platforms. Current technology typically extracts the route path, contour lines, and elevation control points from design files in formats such as DXF, performs spatial interpolation along the path to form a longitudinal profile topographic line, and then combines this with calculations of tower locations, span lengths, turning angles, and conductor sag to create the plan and profile drawing. While this method reduces some manual drawing work, ground elevation relies heavily on contour line interpolation. When the line passes through areas with sparse contour lines, dramatic terrain undulations, abrupt changes in valleys or ridges, or missing local data, the interpolated elevation is prone to errors. Traditional methods often lack quantitative assessment of the reliability of elevations at each sampling point, making it difficult to promptly identify locations requiring re-interpolation or manual verification. For abnormal elevations, designers still need to check each point and correct them based on measured data. Furthermore, terrain processing, sag calculation, layer organization, and DXF plotting are often scattered across different software or processing stages, resulting in repetitive data entry and conversion processes. This can easily lead to inconsistencies between mileage, elevation, tower locations, and sag curves, affecting plotting efficiency and the reliability of map review. Therefore, it is necessary to improve the accuracy of route elevation reconstruction and anomaly identification capabilities, and to achieve integrated automatic generation of plan and profile maps. Summary of the Invention

[0003] This application provides an AI-based method and system for automatically generating cross-sectional diagrams of railway routes, which at least solves some of the technical problems existing in the related technologies described above.

[0004] According to a first aspect of the embodiments of this application, an AI-based method for automatically generating cross-sectional diagrams of railway routes is provided, comprising: Spatial interpolation is performed on the contour data in the design file along the path to obtain the traditional interpolation height sequence of each sampling point along the path; For each sampling point, a terrain feature vector is extracted. The terrain feature vector includes the contour line distribution features around the sampling point, multi-directional elevation difference features, and interpolation confidence features. The terrain feature vectors of all sampling points are combined to form a terrain feature matrix. The terrain feature matrix is ​​input into a pre-trained elevation prediction network for inference, resulting in a prediction elevation sequence and a prediction standard deviation sequence that correspond one-to-one with each sampling point. The point-by-point absolute deviation between the traditional interpolation elevation sequence and the predicted elevation sequence is calculated. The absolute deviation of each sampling point is compared with the prediction standard deviation at the corresponding position. Based on the comparison results, each sampling point is divided into consistent regions, suspicious regions, and abnormal regions. The sampling points in the consistent regions and suspicious regions are weighted and fused with the traditional interpolation elevation and the predicted elevation with different weights. The sampling points in the abnormal regions are subjected to local re-interpolation processing. The fused elevation sequence obtained after processing all sampling points as described above is used as the elevation input data for generating the path cross-section map.

[0005] As an optional approach, the step of inputting the terrain feature matrix into a pre-trained elevation prediction network for inference to obtain a predicted elevation sequence and a predicted standard deviation sequence includes: keeping the randomly deactivated layers in the elevation prediction network active during inference, performing multiple forward propagations on the terrain feature matrix to obtain multiple sets of point-by-point elevation outputs; taking the point-by-point arithmetic mean of the multiple sets of point-by-point elevation outputs as the predicted elevation sequence, and taking the point-by-point sample standard deviation as the predicted standard deviation sequence.

[0006] As an optional scheme, the contour line distribution characteristics include the contour line density, average contour line curvature, and contour line coverage statistically analyzed within a specified radius centered on the sampling point; the multi-azimuth elevation difference characteristics include the normalized difference between the traditional interpolated elevation sampled at specified step sizes along multiple azimuths centered on the sampling point and the elevation of the center point; the interpolation reliability characteristics include the normalized distance from the sampling point to the nearest elevation control point and a marker value indicating whether the sampling point is located in the interpolation hole-filling region.

[0007] As an optional approach, the elevation prediction network is a one-dimensional fully convolutional residual network, comprising an initial convolutional layer, multiple residual blocks, and an output convolutional layer connected in sequence; the initial convolutional layer performs one-dimensional convolution on the terrain feature matrix along the path direction; each residual block contains two layers of one-dimensional convolution and a skip connection connecting the input and output of the residual block; the output convolutional layer maps the output of the last residual block to the point-by-point scalar value corresponding to each sampling point.

[0008] As an optional approach, dividing each sampling point into a consistent region, a suspicious region, and an abnormal region based on the comparison results includes: when the absolute deviation of the sampling point does not exceed the predicted standard deviation of the corresponding position, the sampling point is divided into a consistent region; when the absolute deviation exceeds the predicted standard deviation but does not exceed three times the predicted standard deviation, the sampling point is divided into a suspicious region; and when the absolute deviation exceeds three times the predicted standard deviation, the sampling point is divided into an abnormal region.

[0009] As an optional approach, the weight of traditional interpolation elevation during the weighted fusion of sampling points in the consistent region is the first fusion weight, and the weight of traditional interpolation elevation during the weighted fusion of sampling points in the suspicious region is the second fusion weight; the first fusion weight is greater than the second fusion weight; the first fusion weight and the second fusion weight are respectively obtained by minimizing the mean square error between the fused elevation and the measured elevation on the verification dataset containing the measured elevation for their respective corresponding regions.

[0010] As an optional approach, the local reinterpolation processing for sampling points in the abnormal region includes: expanding the contour line search range to a preset multiple of the original search range with the abnormal sampling point as the center; re-performing spatial interpolation within the expanded range to obtain the reinterpolated elevation; comparing the absolute deviation of the reinterpolated elevation from the predicted elevation at the corresponding location with three times the predicted standard deviation; if the absolute deviation does not exceed three times the predicted standard deviation, then the reinterpolated elevation is used as the fused elevation of the sampling point; otherwise, the sampling point is marked as a point to be manually verified, and the predicted elevation at the corresponding location is used as the fused elevation of the sampling point.

[0011] As an optional approach, the method also includes an incremental update step for the elevation prediction network: counting the number of samples of measured data of elevation control points accumulated during system operation; when the number of samples reaches a preset trigger threshold, projecting each elevation control point to the nearest sampling point on the path; taking the terrain feature vector of the corresponding sampling point as the network input; constructing incremental training samples with the measured elevation of the corresponding elevation control point as the label; and performing parameter fine-tuning on the elevation prediction network; during fine-tuning, adding an elastic weight solidification regularization term on the basis of the mean square error loss; the elastic weight solidification regularization term constrains the degree of parameter deviation based on the Fisher information content of each network parameter in the previous training stage.

[0012] As an optional approach, the training data of the elevation prediction network consists of path cross-section data verified by field measurements from historical route projects. The terrain feature matrix extracted from the design documents of each historical project is used as the training input, and the corresponding measured path elevation is used as the training label. The training uses mean squared error as the loss function, and an adaptive moment estimation optimizer is used to update the network parameters. The learning rate gradually decays from the initial value according to the cosine annealing strategy.

[0013] According to a second aspect of the embodiments of this application, an AI-based automatic generation system for route cross-sectional diagrams is also provided, comprising: The spatial interpolation module is used to perform spatial interpolation on the contour data in the design file along the path to obtain the traditional interpolation height sequence of each sampling point along the path. The terrain feature extraction module is used to extract terrain feature vectors for each sampling point. The terrain feature vectors include contour line distribution features, multi-directional elevation difference features, and interpolation confidence features around the sampling point, and the terrain feature vectors of all sampling points are combined to form a terrain feature matrix. The elevation prediction module is used to input the terrain feature matrix into a pre-trained elevation prediction network for inference, and obtain a prediction elevation sequence and a prediction standard deviation sequence corresponding to each sampling point. The elevation fusion processing module is used to calculate the point-by-point absolute deviation between the traditional interpolation elevation sequence and the predicted elevation sequence, compare the absolute deviation of each sampling point with the prediction standard deviation of the corresponding position, and divide each sampling point into consistent regions, suspicious regions, and abnormal regions based on the comparison results; the traditional interpolation elevation and the predicted elevation are weighted and fused with different weights for the sampling points in the consistent regions and suspicious regions, and local re-interpolation processing is performed on the sampling points in the abnormal regions to obtain the fused elevation sequence. The cross-section data generation module is used to take the fused elevation sequence obtained after all sampling points have been processed by the elevation fusion processing module and use it as the elevation input data for generating the path cross-section map.

[0014] This application, based on traditional contour line spatial interpolation, introduces a terrain feature matrix containing information on contour line distribution, multi-directional elevation differences, and interpolation reliability. It then utilizes a one-dimensional fully convolutional residual network to obtain point-by-point predicted elevations and their standard deviations, providing quantifiable uncertainty data for route elevation reconstruction. By comparing traditional interpolated elevations with predicted elevations point-by-point, regions are categorized as consistent, suspicious, and anomalous based on their predicted standard deviations. Differentiated weighted fusion or local re-interpolation with expanded search ranges is applied to different regions. Sampling points that still do not meet the criteria are written into the output metadata for manual review. This approach, while preserving the geometric basis of traditional interpolation, reduces the risk of significant elevation deviations caused by sparse contour lines, abrupt terrain changes, and interpolation hole filling areas. Combining incremental updates of measured elevation samples with sag calculation, layer drawing, and standard DXF output ensures that the elevation processing results are stably integrated into the plan and profile map generation process, improving the consistency of route design data and the reliability of map review.

[0015] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Furthermore, no embodiment in this disclosure is required to achieve all the effects described above. Attached Figure Description

[0016] 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.

[0017] Figure 1A flowchart illustrating an AI-based method for automatically generating cross-sectional diagrams of railway routes, as provided in this embodiment of the disclosure.

[0018] Figure 2 A flowchart for terrain feature matrix extraction provided in this application embodiment.

[0019] Figure 3 This is a schematic diagram of the elevation prediction network structure provided in an embodiment of this disclosure.

[0020] Figure 4 This is a schematic diagram illustrating the final cross-sectional view effect provided in the embodiments of this disclosure.

[0021] Figure 5 This is a schematic block diagram of an AI-based automatic generation system for route cross-section diagrams, provided in an embodiment of this disclosure.

[0022] Figure 6 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0024] According to this embodiment, the implementation scenario of this solution is the route selection and positioning stage of an overhead transmission line. Designers have completed the elevation data processing in topographic surveying software and exported a DXF format design file containing contour line layers and elevation control point layers. The proposed route polyline and provisional tower locations are marked on a designated layer in this file. The system deployment environment includes an open-source inference framework and supporting computing libraries. After the processing layer reads the path polyline vertices, contour line primitives, and elevation control point coordinates from the DXF file, it can automatically generate the route cross-section diagram from the topographic data according to the following steps.

[0025] The implementation process of the method described in this application will be described in detail below with reference to specific embodiments. It should be noted that this embodiment is only used to explain this application and is not intended to limit the scope of protection of this application. Conventional adjustments or substitutions of each step by those skilled in the art without departing from the concept of this application should be included in the scope of protection of this application.

[0026] Please see Figure 1 , Figure 1 This is a flowchart of an AI-based method for automatically generating cross-sectional diagrams of railway routes according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps: In step 101, the contour data in the design file is spatially interpolated along the path to obtain the traditional interpolation height sequence of each sampling point along the path.

[0027] According to this embodiment, after receiving the DXF design file uploaded by the user, the backend calls the ezdxf library to read the file content. If parsing fails, it automatically switches to fault-tolerant reading mode. The polyline primitives with the layer name "line" are extracted from the model space as path data. The LWPOLYLINE and POLYLINE primitives from the contour line layer are extracted as a contour line set. The points marked with measured elevation values ​​from the elevation control point layer are extracted as an elevation control point set. The distance between adjacent vertices of the path polyline vertex sequence is calculated, and the cumulative mileage of each tower location is obtained by accumulating the distances segment by segment. The span, path azimuth, and turning angle between adjacent tower locations are also calculated to establish a one-dimensional mileage coordinate system with the cumulative distance as the abscissa.

[0028] Valid contour primitives are filtered within a specified search range on both sides of the path. The search half-width can be configured, for example, to 800m. Each contour segment is sampled uniformly at a fixed step size, for example, 5m, resulting in a set of discrete sampling points with elevation attributes. Using the planar coordinates of these sampling points as known points and their corresponding elevations as known values, an open-source library can be called to perform linear triangulation interpolation, generating an elevation grid covering the search range, with a grid resolution of, for example, 10m. Holes in the grid not covered by linear interpolation are supplemented using an inverse distance weighted interpolation method, taking the 8 nearest neighbors with a distance power of 2 for weighted calculation.

[0029] Points are uniformly sampled along the path using a fixed step size, for example, 5 meters. The planar coordinates of each sampling point are obtained by equidistant division of the path segment. For each sampling point, a bilinear interpolation query is performed on the aforementioned elevation grid to obtain the estimated ground elevation value for that point. The elevation values ​​of all sampling points are then arranged by mileage to form a grid of length [length missing]. Traditional interpolation high-order sequence.

[0030] Step 102: Extract terrain feature vectors for each sampling point to form a terrain feature matrix. The terrain feature vectors for each sampling point include contour line distribution features, multi-directional elevation difference features, and interpolation confidence features around the sampling point. The terrain feature vectors of all sampling points are then combined to form a terrain feature matrix.

[0031] The purpose of this step is to encode the topographic spatial information around each sampling point into a numerical vector that the network can process. The problem of decreased interpolation accuracy of contour lines in sparse areas cannot be determined from the traditional interpolation results themselves. However, the information such as contour line density and hole markers contained in the topographic feature vector precisely reflects the reliability of the interpolation results at each location, giving the network a basis for differentiated processing of different regions.

[0032] like Figure 2 As shown, Figure 2 The flowchart for terrain feature matrix extraction provided in this application embodiment shows that in step 201, with each sampling point as the center, within a radius... Statistical contour line distribution characteristics within the range.

[0033] in The radius can be configured, for example, to 200m. Contour density refers to the number of contour line segments within the circular area divided by the area of ​​the circle, reflecting the density of terrain data at the current location. For example, if there are 15 contour lines within a 200m radius, the contour density is 15 divided by the circle's area, approximately 125,664 square meters, or about 0.000119 lines per square meter. The average curvature of the contour lines is the arithmetic mean of the discrete curvatures of each contour line segment within the area. A higher curvature indicates more pronounced contour line bends and more complex terrain changes. Contour line coverage is defined as the ratio of the number of sectors containing contour line data to the total number of sectors, divided into eight equal-angle sectors centered on the sampling point.

[0034] In step 202, multi-directional elevation difference features are extracted. Specifically, with the sampling point as the center, along eight directions (north, northeast, east, southeast, south, southwest, west, and northwest), the traditional interpolated elevation at a step size of 50m is differed from the elevation of the center point. This difference is then divided by the step size of 50m to give each difference value a unified dimension (elevation change rate, dimensionless, in meters per meter), resulting in a total of 8-dimensional difference features. These difference values ​​encode the spatial morphology of the terrain around the sampling point, allowing the network to identify typical terrain patterns such as ridges, valleys, and gentle slopes.

[0035] In step 203, the interpolation confidence feature is extracted, which specifically includes two items: the first item is the Euclidean distance from the sampling point to the nearest elevation control point divided by the search radius. The obtained normalized distance value indicates that the greater the distance, the less actual measurement verification basis there is. The second item is the label value. If the sampling point is generated by the inverse distance weighted hole filling method in the aforementioned spatial interpolation step, the value is 1. Otherwise, the value is 0, which directly reflects the credibility of the interpolation source of the point.

[0036] Optionally, auxiliary features such as normalized elevation values ​​from traditional interpolation, path direction slope, terrain roughness, normalized distances to the nearest contour line in four orthogonal directions, normalized cumulative mileage values, and normalized elevation values ​​of the nearest contour line can also be extracted.

[0037] In step 204, the terrain feature vectors of all sampling points are combined to form a terrain feature matrix. The feature components are then concatenated to form a terrain feature vector with a fixed dimension, for example, 24. The above extraction is performed point-by-point at each sampling point. All vectors are arranged in columns to form a terrain feature matrix, and the data format is as follows: A two-dimensional tensor.

[0038] Before inputting the data into the network, the terrain feature matrix is ​​subjected to minimum-maximum normalization along each feature dimension, mapping each component to the interval between 0 and 1.

[0039] in These are the original values ​​for a certain feature dimension. and The minimum and maximum values ​​of this feature dimension are statistically obtained from the training dataset. During inference, the statistical values ​​fixed during the training phase are used directly.

[0040] Step 103: Input the terrain feature matrix into the pre-trained elevation prediction network for inference to obtain the predicted elevation sequence and the predicted standard deviation sequence corresponding to each sampling point.

[0041] In some embodiments, the elevation prediction network employs a one-dimensional fully convolutional residual network structure, performing one-dimensional convolution operations along the path spatial direction. Terrain elevation is spatially continuous, and there is a high correlation between adjacent sampling points; the one-dimensional convolution kernel can capture this local spatial variation pattern as it slides along the path direction. The network receives a normalized terrain feature matrix as input, and the data format is... (Add a batch dimension during batch processing, in the form of) ).

[0042] like Figure 3 As shown, Figure 3 This is a schematic diagram of the elevation prediction network structure provided in an embodiment of this disclosure. The network structure consists of an initial convolutional layer, three residual blocks, and an output convolutional layer connected in series. The initial convolutional layer uses one-dimensional convolution with a kernel size of 7, a stride of 1, padding of 3, 24 input channels, and 64 output channels. It is followed by a batch normalization layer and a ReLU activation function, and then a random deactivation layer (Dropout). The deactivation probability is... For example, take 0.1.

[0043] The first residual block consists of two one-dimensional convolutional layers, both with a kernel size of 3 and padding of 1, maintaining a channel count of 64. After the first convolutional layer, batch normalization, ReLU activation, and random deactivation are sequentially applied. The second convolutional layer is followed by batch normalization. A skip connection directly adds the input of this residual block to the output of the second convolutional layer, and then performs ReLU activation to obtain the block's output. The second residual block increases the channel count from 64 to 128. The first convolutional layer outputs 128 channels, and the second layer maintains 128 channels. The skip connection maps the channels from 64 to 128 using a convolution with a kernel size of 1. The third residual block reduces the channel count from 128 to 64. The skip connection similarly maps the channels from 128 to 64 using a convolution with a kernel size of 1.

[0044] The output convolutional layer uses a one-dimensional convolution with a kernel size of 1, 64 input channels, and 1 output channel. No activation function is used; it independently maps the 64-dimensional features to a single scalar value for each spatial location. The overall output shape of the network is as follows: Each sampling point corresponds to a point-by-point scalar value. This scalar value is converted into a predicted value in actual elevation units after inverse normalization. The entire network has approximately 50,000 trainable parameters, and the model file is approximately 2.3MB.

[0045] In one embodiment, during the inference phase, to obtain an estimate of the prediction uncertainty, a Monte Carlo random deactivation method is employed: during inference, the randomly deactivated layers in the network are kept active, and the same terrain feature matrix is ​​subjected to... Second forward propagation, For example, take 5.

[0046] Among them, forward propagation number The value of is automatically determined by the system based on the stability of the predicted standard deviation estimate during the inference phase. Specifically, The initial value is set to 10, and the system performs inference according to the sequence number each time. The forward propagation results are accumulated sequentially, and the current value is calculated in real time. The output consists of the sample standard deviation sequence at each sampling point and... The relative rate of change between time standard deviation series ,when and Prematurely terminate forward propagation and retrieve the current state. This result is output; if Reaching the preset maximum value If the convergence condition is still not met, then the statistics of all 20 outputs are taken as the result.

[0047] Each forward propagation produces slightly different outputs due to the random inactivation of different neurons. The next output is taken as the point-by-point arithmetic mean as the prediction high-order sequence:

[0048] in For the first The second forward propagation in the 1st The output values ​​of each sampling point are used as the predicted standard deviation sequence by taking the standard deviation of each point as the standard deviation of the sample:

[0049] As an example, assuming the outputs of a sampling point are 451.2, 452.0, 450.8, 451.5, and 451.0 meters respectively, the predicted elevation is 451.3 meters, and the prediction standard deviation is 0.47 meters. This prediction standard deviation reflects the network's uncertainty about its own output and is used as a criterion for region partitioning in subsequent fusion steps. The total time for the five forward propagations of a single 500-sampling-point path is approximately 400 ms in a CPU environment.

[0050] In one embodiment, the network training data comes from the route cross-section data verified by field measurements in historical route projects. Using the DXF design files of each historical project as the raw data, the terrain feature matrix of each sampling point is extracted as the training input according to the aforementioned steps, and the corresponding measured route elevation (obtained by total station or RTK-GPS along the route) is used as the training label.

[0051] For example, the training dataset may consist of path cross-section data from historical route projects in no fewer than three different terrain regions (including at least five paths each for plains, hills, and mountains), totaling no fewer than 150 independent path samples, with each path having no fewer than 500 sampling points. The dataset is divided by project, with 80% (no fewer than 120 paths) as the training set, 10% (no fewer than 15 paths) as the validation set, and 10% (no fewer than 15 paths) as the test set. All sampling points from the same project must be assigned to the same set to prevent data leakage. The distribution of the number of paths and measured elevation control points in each terrain region is as follows: no fewer than 50 paths in plains, no fewer than 50 paths in hills, and no fewer than 50 paths in mountains. The division of the training, validation, and test sets is done by path, ensuring that all sampling points from the same path belong to the same set, and the proportion of each terrain region in each set is consistent with the total set.

[0052] The measured elevation data for each historical project were obtained through field measurements along the route using a total station or RTK-GPS at sampling intervals not exceeding 10m, with an elevation accuracy of no less than ±5cm. The measured elevation data and the route polyline in the DXF design file were correlated and aligned using mileage markers, meaning that the mileage values ​​in the measured data correspond one-to-one with the cumulative mileage values ​​of the sampling points on the route polyline. Optionally, all training data underwent quality screening before use: sample points with a deviation of more than 50m between the measured elevation and the corresponding traditional interpolated elevation were removed (considered as measurement gross errors or serious misalignment between the design file and the measured location); sample routes with fewer than 20 contour segments within 300m on both sides of the route were removed (considered as having severely insufficient terrain data and lacking training value).

[0053] During training, each path is set to a fixed length. Segmentation, for example Each sampling point forms a training sample pair, with the input format being... The tag format is .

[0054] The training loss function uses mean squared error:

[0055] in For the network in the first The predicted output for each position. The measured elevation label for this location is in meters. The optimizer uses an Adaptive Moment Estimation Optimizer (AdamW), with an initial learning rate of, for example, 0.001, which gradually decays to 0.00001 during training using a cosine annealing strategy. The training epochs range from 80 to 150, and the batch size ranges from 32 to 128. Random deactivation layers (…) During the training phase, the network remains active, consistent with the inference phase, serving a dual purpose of regularization and supporting Monte Carlo inference. After training, the network parameters are fixed into a model file and deployed with the system.

[0056] Therefore, contour density, coverage, and hole markings describe the reliability of traditional interpolation results at this location. Multi-directional difference features and slope encode the spatial morphology of the local terrain. The network learns the statistical mapping relationship between these features and the actual elevation through a large number of historical samples, and can give a more reasonable elevation estimate than traditional interpolation for areas with sparse contour lines.

[0057] Step 104: Calculate the point-by-point absolute deviation, divide the region, and perform weighted fusion or local re-interpolation. Calculate the point-by-point absolute deviation between the traditional interpolation elevation sequence and the predicted elevation sequence. Compare the absolute deviation of each sampling point with the predicted standard deviation at the corresponding position. Based on the comparison results, divide each sampling point into consistent regions, suspicious regions, and abnormal regions. For sampling points in consistent and suspicious regions, perform weighted fusion of the traditional interpolation elevation and the predicted elevation with different weights. For sampling points in abnormal regions, perform local re-interpolation.

[0058] Traditional contour interpolation has a reliable geometric basis in areas with sufficient contour line density, but its accuracy drops significantly in areas with sparse contour lines or abrupt terrain changes, and it cannot assess the reliability of the output itself. This step compares the results of traditional interpolation and network prediction point by point, using the prediction standard deviation of the network output as a reliability criterion, and adopting differentiated fusion strategies for areas with different confidence levels.

[0059] Specifically, for each sampling point Calculate the point-by-point absolute deviation between the value at that point in the traditional interpolation high-order program sequence and the value at that point in the predicted high-order program sequence:

[0060] in For traditional interpolation high-order sequence, the first step is to... The value of the point, To predict the high-order sequence in the first... The values ​​of the points are all in meters. The dimension of this is also meter. The absolute deviation is compared with the predicted standard deviation at the corresponding location. Based on the comparison results, each sampling point is divided into three categories of regions according to the following conditions: when No more than When, the sampling point is divided into a consistent region; when Exceed and not exceeding When the value is 3 times that of the sample, the sampling point is designated as a suspicious area; when Exceed When the deviation exceeds three times the standard deviation, the sampling point is classified as an outlier. The selection of three times the standard deviation is based on the three-standard-deviation rule of the normal distribution; deviations exceeding three times the standard deviation are statistically considered low-probability events.

[0061] For sampling points belonging to the consistent region, the first fusion weight is used. The traditional interpolated elevation and the predicted elevation are weighted and fused; for sampling points belonging to suspicious areas, a second fusion weight is applied. Weighted fusion is performed. The fusion calculation method is as follows:

[0062] in Take in the consistent region Take in suspicious areas , The merged elevation values ​​are the first fusion weights. Greater than the second fusion weight This indicates that traditional interpolation carries a higher weight in consistent regions. Optionally, the two weights are determined as follows: on a validation dataset containing known measured elevations, for all sampling points within their respective regions, solve for the optimal weight value that minimizes the mean square error between the fused elevation and the measured elevation. This optimization problem is a univariate quadratic function seeking its extremum; it can be analytically obtained by differentiating the mean square error with respect to the weights and setting the derivative to zero, which will not be elaborated further here. In one example, based on 30 historical path data points, the calibration is obtained... It is 0.7. It is 0.4. The value range is from 0.5 to 0.9. The value range is from 0.2 to 0.5.

[0063] As an example, for a sampling point, the traditional interpolated elevation is 452.3 meters, the predicted elevation is 449.8 meters, the prediction standard deviation is 3.1 meters, and the absolute deviation is 2.5 meters. Since 2.5 is less than 3.1, this point belongs to a consistent region, and the merged elevation is 0.7 multiplied by 452.3 plus 0.3 multiplied by 449.8, which equals 451.55 meters. For another sampling point, the traditional interpolated elevation is 380.5 meters, the predicted elevation is 374.2 meters, the prediction standard deviation is 2.5 meters, and the absolute deviation is 6.3 meters. Since 6.3 is greater than 2.5 but does not exceed 7.5, it belongs to a suspicious region, and the merged elevation is 0.4 multiplied by 380.5 plus 0.6 multiplied by 374.2, which equals 376.72 meters.

[0064] In one embodiment, for sampling points belonging to anomaly regions, local reinterpolation is performed. Specifically, the contour line search range is expanded to a preset multiple of the original search range, such as 1.5 times (i.e., from 800m to 1200m), centered on the anomaly sampling point. Within this expanded range, contour line data is re-filtered and linear triangular network interpolation is performed to obtain the reinterpolated elevation. The absolute deviation of this reinterpolated elevation from the predicted elevation at the corresponding location is compared to three times the prediction standard deviation. If the absolute deviation does not exceed three times the prediction standard deviation, the reinterpolation result after expanding the range is consistent with the network prediction, and the reinterpolated elevation is used as the fused elevation for the sampling point. Otherwise, the sampling point is marked as a point awaiting manual verification, its mileage position is written into the output metadata, and the predicted elevation at the corresponding location is used as the fused elevation for the sampling point.

[0065] For all After performing the above region determination and fusion processing on each sampling point, a complete fused high-order sequence is obtained, with a length of [length missing]. .

[0066] In some embodiments, the system also includes incremental updates to the elevation prediction network. During continuous system operation, the measured elevation control point data accumulated after each project constitutes a potential training resource. The incremental update step counts the number of samples of measured elevation control point data accumulated during system operation. When this number of samples reaches a preset trigger threshold... The model parameter update is initiated at that time. The determination is based on, for example, dividing the total number of trainable parameters of the network by 250 and rounding up. For a network with approximately 50,000 parameters, The value is set to 200 samples, a proportion that makes the new sample size sufficient relative to the parameter size to produce meaningful gradient directions without overfitting.

[0067] When constructing incremental training samples, each elevation control point is projected to the nearest sampling point on the path, and the terrain feature vector of the corresponding sampling point is taken as the network input, with the measured elevation of that elevation control point as the label. Parameter fine-tuning is performed on the elevation prediction network, and the fine-tuned loss function adds an elastic weight solidification regularization (EWC) term to the mean squared error loss term.

[0068] in The cumulative number of new samples, For the first Measured elevations of each elevation control point For the current number A network parameter value, This is the value of the parameter before fine-tuning. For the total number of parameters, For the first The amount of Fisher information corresponding to each parameter is the regularization coefficient. The loss function is obtained by calculating the mean squared gradient of each parameter on a subset of the training data from the previous stage. Its physical meaning is to measure the importance of that parameter to the learned task. The larger the value, the stronger the constraint on the parameter.

[0069] Specifically, randomly sample from the training dataset of the previous stage. bar sample (and) (with the same value), forming a subset for Fisher information calculation. For each sample Calculate the loss function For the Gradients of network parameters (here) Using mean squared error loss (without EWC regularization term). The estimated value is:

[0070] Right now This is the arithmetic mean of the squared gradients for each sample. This calculation is performed automatically before each incremental update, and the computational cost is... Proportional ( The subgradient calculation takes approximately 2-3 seconds in a GPU environment. The calculated... The values ​​are stored along with the model parameters for use during the next fine-tuning.

[0071] The value is determined by a grid search on the validation set, ranging from 0.01 to 10, and selects the value that minimizes the sum of the old data error degradation and the new data error; the example value is 1.0.

[0072] For example, fine-tuning uses the AdamW optimizer with a learning rate of 0.00001, 5 training epochs, and a batch size of 16. The updated model parameters are written to a versioned storage path, and the latest version is automatically loaded for subsequent inference.

[0073] Step 105: Use the fused elevation sequence obtained after processing all sampling points as the elevation input data for generating the path cross-section map.

[0074] The integrated elevation sequence is used as the elevation data input for the longitudinal profile of the route. Before binding the profile map, elevation control point correction can be optionally performed on the integrated elevation sequence: the elevation control points of the current project are projected to the nearest position on the route, the deviation between the integrated elevation and the measured elevation is calculated, only valid control points with an absolute deviation of no more than 30 meters are adopted, and the full-route elevation correction is generated by piecewise linear interpolation and superimposed on the integrated elevation sequence; slope limiting extrapolation is performed on the last segment of the route that exceeds the coverage of contour lines.

[0075] When generating the longitudinal profile, the mileage of sampling points marked as requiring manual verification is read from the output metadata. A red triangle warning label is placed at these mileage locations on the longitudinal profile to remind designers that the elevation data at these locations needs to be verified in conjunction with the actual site conditions. The longitudinal profile also includes grid lines, elevation scales, terrain polylines, tower location markers, and tables. The sag of the guide rails under various spans and working conditions is calculated according to relevant standards and specifications, and then drawn in color-coded layers on the longitudinal profile. The final output is a standard DXF format plan view for designers to review in the drawing software.

[0076] like Figure 4 As shown, Figure 4This is a schematic diagram of the final cross-sectional view provided in the embodiments of this disclosure. The cross-sectional view consists of a longitudinal section area, a parameter table area, and a plan view area. The longitudinal section area uses mileage as the abscissa and elevation as the ordinate, sets grid lines and elevation scales, and draws terrain polylines, tower location markers, and sag curves of the catenary under different working conditions for each span.

[0077] Therefore, this method superimposes a deep learning-based elevation prediction channel onto traditional contour interpolation. It utilizes the prediction standard deviation of the network output to perform point-by-point confidence assessment and differential fusion of elevation results from the two sources, enabling the system to automatically identify areas with insufficient accuracy in traditional interpolation and provide corrections or markings. An incremental update mechanism allows the elevation prediction network to be continuously optimized as project data accumulates, gradually enhancing its adaptability to different terrain regions. The overall solution integrates design document parsing, elevation reconstruction, sag calculation, and cross-section mapping into a unified workflow. Designers no longer need to manually convert data between multiple software programs; the entire process, from path determination to cross-section generation, is completed within a single interface.

[0078] Please see Figure 5 , Figure 5 This is a structural block diagram of an AI-based automatic generation system for route cross-section diagrams provided in an embodiment of this application. For example... Figure 5 As shown, the system includes: Spatial interpolation module 501 is used to perform spatial interpolation on contour data in the design file along the path to obtain traditional interpolation height sequence of each sampling point along the path. The terrain feature extraction module 502 is used to extract terrain feature vectors for each sampling point. The terrain feature vectors include contour line distribution features, multi-directional elevation difference features and interpolation confidence features around the sampling point, and the terrain feature vectors of all sampling points are combined to form a terrain feature matrix. The elevation prediction module 503 is used to input the terrain feature matrix into a pre-trained elevation prediction network for inference, and obtain a prediction elevation sequence and a prediction standard deviation sequence corresponding to each sampling point. The elevation fusion processing module 504 is used to calculate the point-by-point absolute deviation between the traditional interpolation elevation sequence and the predicted elevation sequence, compare the absolute deviation of each sampling point with the prediction standard deviation of the corresponding position, and divide each sampling point into consistent regions, suspicious regions, and abnormal regions according to the comparison results; weight the traditional interpolation elevation and the predicted elevation with different weights for the sampling points in the consistent regions and suspicious regions, and perform local re-interpolation processing on the sampling points in the abnormal regions to obtain the fused elevation sequence. The cross-section data generation module 505 is used to take the fused elevation sequence obtained after all sampling points have been processed by the elevation fusion processing module as the elevation input data for generating the path cross-section map.

[0079] Each processing unit and / or module in the embodiments of this application can be implemented by an analog circuit that implements the functions described in the embodiments of this application, or by software that executes the functions described in the embodiments of this application.

[0080] Please see Figure 6 It shows a schematic block diagram of an electronic device according to an embodiment of this application, which can be used to implement... Figure 1 The method in the illustrated embodiment. (As shown) Figure 6 As shown, the electronic device may include: The system includes at least one processor 601, at least one network interface 604, a user interface 603, a memory 605, and at least one communication bus 602. The communication bus 602 is used to enable connection and communication between the components. The user interface 603 may include buttons, and optionally include a standard wired or wireless interface. The network interface 604 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.

[0081] The processor 601 may include one or more processing cores and connect to various parts within the electronic device through various interfaces and lines. It implements various functions and data processing of the electronic device by running or executing instructions, programs, code sets, or instruction sets stored in the memory 605, and by accessing data in the memory 605. Optionally, the processor 601 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 601 may also integrate one or more combinations of CPU, GPU, and modem.

[0082] Memory 605 may include random access memory (RAM) or read-only memory (ROM). Optionally, memory 605 includes a non-transitory computer-readable medium for storing instructions, programs, code, code sets, or instruction sets. Memory 605 may be divided into a program storage area and a data storage area, wherein the program storage area can be used to store instructions for implementing an operating system and instructions for implementing the foregoing method embodiments; the data storage area can be used to store data related to the relevant method embodiments. Memory 605 may also be at least one storage device located remotely from processor 601. Figure 6 As shown, the memory 605, which serves as a computer storage medium, may contain an operating system, a network communication module, a user interface module, and program instructions.

[0083] In particular, the methods and / or embodiments in this application can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by processor 601, it performs the functions defined in the methods of this application.

[0084] Another embodiment of this application provides a storage medium storing computer program instructions thereon, which can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of this application.

[0085] In the above embodiments, the descriptions of each embodiment have different focuses. Parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The above descriptions are merely preferred embodiments of this application and explanations of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by specific combinations of the above technical features, but should also cover other technical solutions formed by arbitrary combinations of the above technical features or their equivalent features without departing from the inventive concept.

Claims

1. A method for automatically generating cross-sectional diagrams of railway routes based on AI, characterized in that, include: Spatial interpolation is performed on the contour data in the design file along the path to obtain the traditional interpolation height sequence of each sampling point along the path; For each sampling point, a terrain feature vector is extracted. The terrain feature vector includes the contour line distribution features around the sampling point, multi-directional elevation difference features, and interpolation confidence features. The terrain feature vectors of all sampling points are combined to form a terrain feature matrix. The terrain feature matrix is ​​input into a pre-trained elevation prediction network for inference, resulting in a prediction elevation sequence and a prediction standard deviation sequence that correspond one-to-one with each sampling point. The point-by-point absolute deviation between the traditional interpolation elevation sequence and the predicted elevation sequence is calculated. The absolute deviation of each sampling point is compared with the prediction standard deviation at the corresponding position. Based on the comparison results, each sampling point is divided into consistent regions, suspicious regions, and abnormal regions. The sampling points in the consistent regions and suspicious regions are weighted and fused with the traditional interpolation elevation and the predicted elevation with different weights. The sampling points in the abnormal regions are subjected to local re-interpolation processing. The fused elevation sequence obtained after processing all sampling points as described above is used as the elevation input data for generating the path cross-section map.

2. The method according to claim 1, characterized in that, The step of inputting the terrain feature matrix into a pre-trained elevation prediction network for inference to obtain a predicted elevation sequence and a predicted standard deviation sequence includes: keeping the randomly deactivated layer in the elevation prediction network active during inference, performing multiple forward propagations on the terrain feature matrix to obtain multiple sets of point-by-point elevation outputs; taking the point-by-point arithmetic mean of the multiple sets of point-by-point elevation outputs as the predicted elevation sequence, and taking the point-by-point sample standard deviation as the predicted standard deviation sequence.

3. The method according to claim 1, characterized in that, The contour line distribution features include the contour line density, average contour line curvature, and contour line coverage statistically analyzed within a specified radius centered on the sampling point; the multi-azimuth elevation difference features include the normalized difference between the traditional interpolated elevation sampled at specified step sizes along multiple azimuths centered on the sampling point and the elevation of the center point; the interpolation reliability features include the normalized distance from the sampling point to the nearest elevation control point and a marker value indicating whether the sampling point is located in the interpolation hole filling region.

4. The method according to claim 1, characterized in that, The elevation prediction network is a one-dimensional fully convolutional residual network, comprising an initial convolutional layer, multiple residual blocks, and an output convolutional layer connected in sequence. The initial convolutional layer performs one-dimensional convolution on the terrain feature matrix along the path direction. Each residual block contains two layers of one-dimensional convolution and a skip connection connecting the input and output of the residual block. The output convolutional layer maps the output of the last residual block to the point-by-point scalar value corresponding to each sampling point.

5. The method according to claim 1, characterized in that, The step of dividing each sampling point into a consistent region, a suspicious region, and an abnormal region based on the comparison results includes: when the absolute deviation of the sampling point does not exceed the predicted standard deviation of the corresponding position, the sampling point is divided into a consistent region; when the absolute deviation exceeds the predicted standard deviation but does not exceed three times the predicted standard deviation, the sampling point is divided into a suspicious region; when the absolute deviation exceeds three times the predicted standard deviation, the sampling point is divided into an abnormal region.

6. The method according to claim 5, characterized in that, When weighting and fusing sampling points in a consistent region, the weight of traditional interpolation elevation is the first fusion weight, and when weighting and fusing sampling points in a suspicious region, the weight of traditional interpolation elevation is the second fusion weight; the first fusion weight is greater than the second fusion weight; the first fusion weight and the second fusion weight are respectively obtained by minimizing the mean square error between the fused elevation and the measured elevation in their respective corresponding regions on a verification dataset containing measured elevations.

7. The method according to claim 1, characterized in that, The local reinterpolation process for sampling points in the abnormal region includes: expanding the contour search range to a preset multiple of the original search range with the abnormal sampling point as the center; re-performing spatial interpolation within the expanded range to obtain the reinterpolated elevation; comparing the absolute deviation of the reinterpolated elevation from the predicted elevation at the corresponding location with three times the predicted standard deviation; if the absolute deviation does not exceed three times the predicted standard deviation, then the reinterpolated elevation is used as the fused elevation of the sampling point; otherwise, the sampling point is marked as a point to be manually verified and the predicted elevation at the corresponding location is used as the fused elevation of the sampling point.

8. The method according to claim 1, characterized in that, The system also includes an incremental update step for the elevation prediction network: counting the number of samples of measured data of elevation control points accumulated during system operation; when the number of samples reaches a preset trigger threshold, projecting each elevation control point to the nearest sampling point on the path; taking the terrain feature vector of the corresponding sampling point as the network input; constructing incremental training samples with the measured elevation of the corresponding elevation control point as the label; and performing parameter fine-tuning on the elevation prediction network. During fine-tuning, an elastic weight solidification regularization term is superimposed on the mean square error loss. The elastic weight solidification regularization term imposes constraints on the deviation of parameters based on the Fisher information content of each network parameter in the previous training stage.

9. The method according to claim 4, characterized in that, The training data for the elevation prediction network consists of path cross-section data verified by field measurements from historical route projects. The terrain feature matrix extracted from the design documents of each historical project is used as the training input, and the corresponding measured path elevation is used as the training label. The training uses mean squared error as the loss function, and an adaptive moment estimation optimizer is used to update the network parameters. The learning rate gradually decays from the initial value according to the cosine annealing strategy.

10. An AI-based automatic generation system for railway route cross-section diagrams, characterized in that, include: The spatial interpolation module is used to perform spatial interpolation on the contour data in the design file along the path to obtain the traditional interpolation height sequence of each sampling point along the path. The terrain feature extraction module is used to extract terrain feature vectors for each sampling point. The terrain feature vectors include contour line distribution features, multi-directional elevation difference features, and interpolation confidence features around the sampling point, and the terrain feature vectors of all sampling points are combined to form a terrain feature matrix. The elevation prediction module is used to input the terrain feature matrix into a pre-trained elevation prediction network for inference, and obtain a prediction elevation sequence and a prediction standard deviation sequence corresponding to each sampling point. The elevation fusion processing module is used to calculate the point-by-point absolute deviation between the traditional interpolation elevation sequence and the predicted elevation sequence, compare the absolute deviation of each sampling point with the prediction standard deviation of the corresponding position, and divide each sampling point into consistent regions, suspicious regions, and abnormal regions based on the comparison results; the traditional interpolation elevation and the predicted elevation are weighted and fused with different weights for the sampling points in the consistent regions and suspicious regions, and local re-interpolation processing is performed on the sampling points in the abnormal regions to obtain the fused elevation sequence. The cross-section data generation module is used to take the fused elevation sequence obtained after all sampling points have been processed by the elevation fusion processing module and use it as the elevation input data for generating the path cross-section map.