Railway longitudinal section alignment reconstruction method, medium and equipment based on converter model
Through the railway longitudinal section alignment reconstruction method based on the converter model, logistic regression and multi-head attention mechanism are used to process the pile point data, which solves the problems of low efficiency and insufficient precision in the existing technology and realizes efficient and intelligent alignment reconstruction.
Patent Information
- Application Number
- CN202510953516.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-07-11
AI Technical Summary
Existing railway longitudinal profile reconstruction methods are inefficient and rely on manual design, making it difficult to meet the requirements of high precision and high reliability. In addition, the optimization algorithm has a low level of intelligence and cannot balance global optimization with local details.
A railway longitudinal profile reconstruction method based on a converter model is adopted. By obtaining the original stake point data of the railway line, the type of measuring point is identified using a logistic regression model, and the data is processed in combination with a multi-head attention mechanism and a feedforward neural network to output a high-precision adjusted line.
It significantly improves the speed and accuracy of railway longitudinal section alignment reconstruction, reduces manual intervention, realizes intelligent alignment reconstruction, and provides technical support for railway design and maintenance.
Smart Images

Figure CN120449722B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of railway design, and in particular to a method, medium and equipment for reconstructing railway longitudinal section alignment based on a converter model. Background Art
[0002] Currently, the design of existing railway longitudinal alignment reconstruction primarily relies on manual experience. However, with the increase in railway operating mileage and the sharp rise in line maintenance needs, the limitations of traditional manual design methods are becoming increasingly apparent. On the one hand, manual design consumes a lot of time and resources, resulting in low efficiency. On the other hand, due to the high number of subjective factors in the design process, quality issues are prone to occur, making it difficult to meet the high precision and high reliability requirements of modern railways. Therefore, the research of an intelligent and automated method for reconstructing the longitudinal alignment of existing railways has become a key focus in the field of railway engineering.
[0003] In recent years, domestic and international scholars have conducted extensive research on the problem of reconstructing the alignment of existing railway longitudinal sections, proposing many feasible solutions, such as alignment optimization methods based on traditional mathematical models and intelligent optimization methods based on genetic algorithms. However, existing methods still have many shortcomings: 1. Inaccurate identification of measurement point attribution: When processing measurement point data, existing methods have difficulty accurately distinguishing between straight segments and vertical curves, resulting in insufficient reconstruction accuracy; 2. High degree of manual assistance: Many methods still rely on manual intervention and have a low degree of automation, making them difficult to adapt to the needs of large-scale railway alignment maintenance; 3. Low intelligence of optimization algorithms: When dealing with complex alignments, traditional optimization algorithms often struggle to balance global optimization with local details, resulting in reconstruction results that fail to meet actual engineering requirements.
[0004] In summary, existing technologies struggle to meet the efficiency, high precision, and intelligent requirements for reconstructing existing railway longitudinal alignments. Therefore, there is an urgent need to design an end-to-end intelligent maintenance method for existing railway longitudinal alignments to address these challenges and provide technical support for the safety and efficiency of railway transportation. Summary of the Invention
[0005] The present invention aims to provide an efficient, high-precision, and intelligent railway longitudinal section alignment reconstruction method to meet the demand for rapid traffic opening after an earthquake. The specific technical solution is as follows:
[0006] A railway longitudinal section alignment reconstruction method based on a converter model comprises the following steps:
[0007] Step 1: Obtain original stake point data of the railway line and input it into the slope change point segment model to obtain stake point data for input into the improved converter model;
[0008] Step 2: Input the pile point data obtained in step 1 into the improved converter model to output the complete adjusted line, which specifically includes:
[0009] Step 2.1, standardize the pile point data input into the improved converter model;
[0010] Step 2.2: Process the standardized point data with a multi-head attention mechanism and input it into the encoder to obtain its position information. The number of attention heads should not exceed the input feature dimension of the encoder.
[0011] Step 2.3: After adding regularization and normalization to the feedforward neural network part of the encoder, it is used to process and calculate the pile point data and slope change point data to obtain the encoder output data;
[0012] Step 2.4: The data output by the encoder is input to the decoder and then output. The decoder also performs regularization and normalization operations of the feedforward neural network.
[0013] Step 2.5: After the decoder outputs, it enters the mapping layer and outputs the data of the slope change point coordinates and curvature radius through the mapping layer;
[0014] Step 2.6: After traversing the data of each slope change point, connect them to obtain the complete adjusted line.
[0015] Preferably, the step 1 includes:
[0016] Step 1.1: Inputting the original stake point data into the logistic regression model, wherein the original stake point data includes mileage data and elevation data, and using the logistic regression model to determine whether the original stake point belongs to a straight line measurement point or a vertical curve measurement point;
[0017] Step 1.2: Select the stake point data near the slope change point as the input data for the improved converter model. Specifically:
[0018] Take the middle point position of adjacent vertical curve measuring points and combine them to get the position list as follows:
[0019] ;
[0020] in, Represents the number of vertical curve measuring points, The middle point position of each adjacent vertical curve measuring point;
[0021] Map the position of each point in the position list to the corresponding original pile point data position on the line, and take The length of the pile point data is used as the pile point data for the input improved converter model;
[0022] Indicates the data length of the input model;
[0023] like is an even number, the length on the left is , the length on the right is ;like is an odd number, and the length on the left is , the length on the right is ; If the number of pile points on the left and right lines is insufficient, the remaining input pile points will be replaced by the last pile point data.
[0024] Preferably, the step 2.1 specifically includes:
[0025] Based on the stake point data that needs to be input into the improved converter model, the positional relationship between the stake mileage and the existing track surface elevation is obtained. The existing track surface elevation does not need to be position-coded, and redundant zero elements are not coded.
[0026] Define the following four parameters:
[0027] Model hidden layer dimension ;
[0028] The sequence length , ensuring that the sequence length is greater than the number of sample points;
[0029] The position vector of each stake point ,in R Represents the dimension of the data;
[0030] Precomputed scaling factors ,in , is the dimension index in the longitudinal section;
[0031] The calculation formula is as follows:
[0032] ;
[0033] in, is 2, corresponding to mileage and elevation, equivalent to: ;
[0034] Each pile point position is processed with sine and cosine functions and then input into a position coding matrix PE , the expression is as follows:
[0035] ;
[0036] ;
[0037] Represents the position encoding matrix PE The Column 1 of the row, Represents the position encoding matrix PE The Column 2 of the row;
[0038] Position vector Contains and ;
[0039] Combining the pile point data input into the improved converter model with the position encoding matrix, the final position encoding matrix is as follows:
[0040] .
[0041] Preferably, the step 2.2 is specifically:
[0042] Let the input sequence be ;
[0043] Perform a linear transformation on X to generate the query matrix Q, key matrix K and value matrix V;
[0044] ;
[0045] in, is the weight matrix that can be learned;
[0046] is the key / query vector dimension for each attention head, , is the number of heads;
[0047] Perform multi-head splitting and ensure the number of attention heads Less than ,Will The matrix is divided into multiple sub-matrices according to the number of heads as follows:
[0048] ;
[0049] The dimensions of each matrix are ;
[0050] For each attention head i, the attention weight is calculated and the weight vector is added as follows:
[0051] ;
[0052] in, Respectively represent The query matrix, key matrix and value matrix of each head; Indicates the similarity between the query and the key; is the scaling factor; represents the attention weight; Represents the normalization function, which is used to normalize the key dimension to the probability distribution and generate the weight matrix;
[0053] Use attention weights Weighted sum, output ;
[0054] Combine multiple outputs and perform linear transformation at the same time:
[0055] ;
[0056] ;
[0057] in, , refers to the data output by multi-head operations; is the activation function; Indicates multi-headed attention; Represents a function for merging matrices or vectors; Refers to the linear transformation function after the multi-head output is merged, and All represent network weights; and Both represent offset terms, which are obtained by network self-learning; Represents the output of the attention head; represents a learnable linear projection weight matrix.
[0058] Preferably, the step 2.3 is specifically:
[0059] The regularization formula is: ;
[0060] in, are the weights in the weight matrix, represents the regularization coefficient;
[0061] The normalization formula is: ;
[0062] and are the mean and variance of the current batch respectively; and are the learnable scaling and translation parameters, represents the normalized data, Represents the original data, represents a constant used to prevent the denominator from being zero, Indicates adjusted data.
[0063] Preferably, the step 2.4 is specifically:
[0064] Input the data output by the encoder and the adjusted measuring point data into the decoder;
[0065] Feedforward neural network and regularization normalization operations are also performed in the decoder;
[0066] The pile point data processed by several encoders are input into the decoder together with the slope change point data;
[0067] When the multi-head attention mechanism is processed for the first time in the decoder, the slope change point data replacement value matrix is as follows:
[0068] ;
[0069] Among them, Q and K Marked as encoder output data, V Marked as slope change point data;
[0070] After the first decoder output, subsequent decoder operations are the same as the encoder until the output enters the mapping layer.
[0071] Preferably, the step 2.5 is specifically:
[0072] The mapping layer is set to multiple layers. The mapping layer formula is the same as the feedforward neural network layer. The number of mapping layers reflects the upper limit of the order of the circuit represented by the polynomial. The multi-layer calculation is as follows:
[0073] ;
[0074] The characteristics of the longitudinal section are reflected by the mapping layer, ensuring that the number of mapping layers is greater than 2 or 3. represents the weight, d is the offset term, ensuring that the coefficients of higher-order terms tend to zero;
[0075] Get the processed slope change point data , and stored in sequence.
[0076] Preferably, the step 2.6 is specifically:
[0077] Connect the slope change point data in the position list in the form of straight lines and vertical curves to obtain a complete adjusted route;
[0078] The cost function is used to process the data of each point on the adjusted line and the original pile point data. The formula is as follows:
[0079] ;
[0080] in, is the value of the cost function; is the number of pile points; For the original line Elevation of each stake point; After adjustment, the line Pile point elevation ;
[0081] The cost function is used to minimize the entire line adjustment amount, and the cost function value is output. J After that, back propagation learning is performed to update the parameters.
[0082] The present invention also provides a readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implements the railway longitudinal section alignment reconstruction method based on the converter model as described above.
[0083] The present invention also provides an electronic device comprising: at least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, the railway longitudinal section alignment reconstruction method based on the converter model is performed.
[0084] The application of the technical solution of the present invention has the following beneficial effects:
[0085] (1) A method for reconstructing the longitudinal alignment of a railway based on a converter model, comprising the following steps: Step 1, obtaining the original stake point data of the railway line and inputting it into a slope change point segmentation model to obtain stake point data for input into an improved converter model; Step 2, inputting the stake point data obtained in Step 1 into the improved converter model to output a complete adjusted alignment. The method of the present invention takes into account the geometric identification of the measurement points in the longitudinal alignment and the data segmentation for input into the improved converter model. The on-site measurement point data is input into the model and the reconstructed longitudinal alignment is directly output, which greatly reduces data processing and manual intervention, and significantly improves the speed of designing the reconstruction and adjustment scheme of the existing railway longitudinal alignment. The present invention significantly improves the learning accuracy of the model through standardized processing and deep learning technology, realizes the high-precision and high-accuracy reconstruction of the existing railway longitudinal alignment, and provides an intelligent solution for railway design and maintenance.
[0086] (2) In this invention, the inputs of the decoder and encoder do not require word embedding processing and are directly input as digital tensors. The inputs of the decoder and encoder are then positionally encoded to reflect the sequential relationship between each pile point, ensuring the flexibility of the input model sequence and the linear relationship between each pile point.
[0087] In addition to the above-described objects, features and advantages, the present invention has other objects, features and advantages. The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:
[0089] Figure 1 The intention of the railway line before and after adjustment in the embodiment of the present invention;
[0090] Figure 2 This is a flow chart of the improved converter model in Example 1;
[0091] Figure 3 This is a flow chart of the slope change point segment division in Example 1;
[0092] Figure 4 This is the schematic diagram of the adjusted longitudinal section line to be output in Example 1. DETAILED DESCRIPTION
[0093] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. However, the present invention can be implemented in many different ways as defined and covered by the claims.
[0094] In one embodiment, see Figure 1 ,A railway longitudinal section alignment reconstruction method based on a converter model includes the following steps:
[0095] Step 1: Construct a segment model for dividing the slope change points, see Figure 3 , obtain the original stake point data of the railway line and input it into the slope change point segmentation model, and divide the stake point data segments that are input into the improved converter, specifically including:
[0096] Step 1.1: Establish a straight-curved segmentation model for the longitudinal section based on logistic regression and input the original stake point data, which includes mileage data and elevation data, and determine whether the original stake point is a straight line measurement point or a vertical curve measurement point (1 for a straight line measurement point and 0 for a vertical curve measurement point);
[0097] ;
[0098] During training, the logistic regression model starts backpropagation learning from this point. After the model training is completed, the middle point positions of adjacent vertical curve measurement points are taken and combined into a position list as follows:
[0099] ;
[0100] Step 1.2: Use the logistic regression model after back-propagation learning to locate the vertical curve measurement points and obtain the curve segment’s stake point data as the input to the improved converter model. Specifically:
[0101] Take the middle point position of adjacent vertical curve measuring points and combine them to get the position list as follows:
[0102] ;
[0103] in, Represents the number of vertical curve measuring points, The middle point position of each adjacent vertical curve measuring point;
[0104] Map the position of each point in the position list to the corresponding original pile point data position on the line, and take The length of the pile point data is used as the pile point data for the input improved converter model;
[0105] Indicates the data length of the input model;
[0106] like is an even number, the length on the left is , the length on the right is ;like is an odd number, and the length on the left is , the length on the right is ; If the number of pile points on the left and right lines is insufficient, the remaining input pile points will be replaced by the last pile point data.
[0107] Step 2: First, substitute the training samples for training to obtain an improved converter model suitable for this purpose. A test portion can also be added during training. Generally, 90% of the samples are divided into a training set and 10% into a test set. During training, test samples are input and the difference between the output value and the real data is checked to facilitate model convergence in the desired direction. After the training and testing are completed, a converter model suitable for intelligent reconstruction of existing railway longitudinal profiles is obtained. Figure 2 , input the pile point data obtained in step 1 into the improved converter model, and output the complete adjusted line, which specifically includes:
[0108] Step 2.1: Input pre-processing: standardize the pile point data input to the improved converter model, and then perform the feedforward process after inputting the model;
[0109] In the improved converter model constructed in this embodiment, the inputs of the decoder and encoder do not require word embedding processing and should be directly input as digital tensors. The inputs of the decoder and encoder are then positionally encoded to reflect the sequential relationship between each pile point, ensure the flexibility of the input model sequence, and ensure the linear relationship between each pile point.
[0110] For the sample pile point data, only columns 1 and 2 need to be obtained, that is, the positional relationship between the center pile mileage and the existing track surface elevation. Column 0, the existing track surface elevation, does not need to be positionally encoded, and the redundant zero elements are not encoded.
[0111] The step 2.1 is specifically:
[0112] Based on the stake point data that needs to be input into the improved converter model, the positional relationship between the stake mileage and the existing track surface elevation is obtained. The existing track surface elevation does not need to be position-coded, and redundant zero elements are not coded.
[0113] Define the following four parameters:
[0114] Model hidden layer dimension ;
[0115] The sequence length , this is the customizable input length of the model, ensuring that the sequence length is greater than the number of sample points;
[0116] The position vector of each stake point ,in R Represents the dimension of the data;
[0117] Precomputed scaling factors ,in , is the dimension index in the longitudinal section;
[0118] The calculation formula is as follows:
[0119] ;
[0120] in, is 2, corresponding to mileage and elevation, equivalent to: ;
[0121] Each pile point position is processed with sine and cosine functions and then input into a position coding matrix PE , the expression is as follows:
[0122] ;
[0123] ;
[0124] Represents the position encoding matrix PE The Column 1 of the row, Represents the position encoding matrix PE The Column 2 of the row;
[0125] Position vector Contains and ;
[0126] Combining the pile point data input into the improved converter model with the position encoding matrix, the final position encoding matrix is as follows:
[0127] ;
[0128] The original data is combined with the position code and enters the first encoder.
[0129] Step 2.2: Process the standardized point data with a multi-head attention mechanism and input it into the encoder to obtain its position information. The number of attention heads should not exceed the input feature dimension of the encoder.
[0130] The step 2.2 is specifically:
[0131] Let the input sequence be ;
[0132] Perform a linear transformation on X to generate the query matrix Q, key matrix K and value matrix V;
[0133] ;
[0134] in, is the weight matrix that can be learned;
[0135] is the key / query vector dimension for each attention head, , is the number of heads;
[0136] Perform multi-head splitting and ensure the number of attention heads Less than ,Will The matrix is divided into multiple sub-matrices according to the number of heads as follows:
[0137] ;
[0138] The dimensions of each matrix are ;
[0139] For each attention head i, the attention weight is calculated and the weight vector is added as follows:
[0140] ;
[0141] in, Respectively represent The query matrix, key matrix and value matrix of each head; Indicates the similarity between the query and the key; is the scaling factor; represents the attention weight; Represents the normalization function, which is used to normalize the key dimension to the probability distribution and generate the weight matrix;
[0142] Use attention weights Weighted sum, output ;
[0143] Combine multiple outputs and perform linear transformation at the same time:
[0144] ;
[0145] ;
[0146] in, , refers to the data output by multi-head operations; is the activation function; Indicates multi-headed attention; Represents a function for merging matrices or vectors; Refers to the linear transformation function after the multi-head output is merged, and All represent network weights; and Both represent offset terms, which are obtained by network self-learning; Represents the output of the attention head; represents a learnable linear projection weight matrix.
[0147] Step 2.3: After adding regularization and normalization to the feedforward neural network part of the encoder, it is used to process and calculate the pile point data and slope change point data to obtain the encoder output data;
[0148] The step 2.3 is specifically:
[0149] The regularization formula is: ;
[0150] in, are the weights in the weight matrix, represents the regularization coefficient;
[0151] The normalization formula is: ;
[0152] and are the mean and variance of the current batch respectively; and are the learnable scaling and translation parameters, represents the normalized data, Represents the original data, represents a constant used to prevent the denominator from being zero, Indicates adjusted data.
[0153] Step 2.4: The data output by the encoder is input to the decoder and then output. The decoder also performs regularization and normalization operations of the feedforward neural network.
[0154] The step 2.4 is specifically:
[0155] Input the data output by the encoder and the adjusted measuring point data into the decoder;
[0156] Feedforward neural network and regularization normalization operations are also performed in the decoder;
[0157] The pile point data processed by several encoders are input into the decoder together with the slope change point data;
[0158] When the multi-head attention mechanism is processed for the first time in the decoder, the slope change point data replacement value matrix is as follows:
[0159] ;
[0160] Among them, Q and K Marked as encoder output data, V Marked as slope change point data;
[0161] After the first decoder output, subsequent decoder operations are the same as the encoder until the output enters the mapping layer.
[0162] In this embodiment, after the pile point data is processed by several encoders, the encoder output data and the slope change point data are input into the decoder together. The slope change point data does not need to be position-encoded like the traditional converter model when it is input.
[0163] Step 2.5: After the decoder outputs, it enters the mapping layer and outputs the data of the slope change point coordinates and curvature radius through the mapping layer;
[0164] The step 2.5 is specifically:
[0165] The mapping layer is set to multiple layers in order to better fit the linear and nonlinear characteristics of the line. For example, the second-layer formula is as follows:
[0166] ;
[0167] The mapping layer formula is the same as the feedforward neural network layer, but the functions are not exactly the same. The number of mapping layers reflects the upper limit of the order of the circuit represented by the polynomial. The calculation of multiple layers is as follows:
[0168] ;
[0169] The single layer calculation is as follows:
[0170] ;
[0171] The characteristics of the longitudinal section are reflected by the mapping layer, ensuring that the number of mapping layers is greater than 2 or 3. represents the weight, d is the offset term, ensuring that the coefficients of higher-order terms tend to zero;
[0172] represents the weight of a single layer, b represents the offset term of a single layer;
[0173] Get the processed slope change point data , and stored in sequence.
[0174] Step 2.6: After traversing the data of each slope change point, connect them to obtain the complete adjusted line.
[0175] The step 2.6 is specifically:
[0176] See also Figure 4 , connect the slope change point data in the position list in the form of straight lines and vertical curves to obtain a complete adjusted route;
[0177] The cost function is used to process the data of each point on the adjusted line and the original pile point data. The formula is as follows:
[0178] ;
[0179] in, is the value of the cost function; For the original line Elevation of each stake point; After adjustment, the line Pile point elevation ;
[0180] The cost function is used to minimize the entire line adjustment amount, and the cost function value is output. J After that, back propagation learning is performed to update the parameters.
[0181] This embodiment further includes a readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the above-mentioned railway longitudinal section alignment reconstruction method based on the converter model is implemented.
[0182] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0183] This embodiment also includes an electronic device, including: at least one processor, at least one memory, and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the railway longitudinal profile alignment reconstruction method based on the converter model as described above is performed.
[0184] The electronic device may be a computing device such as a mobile phone, desktop computer, laptop, PDA, or cloud server. The electronic device may include, but is not limited to, a processor and memory. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0185] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A railway longitudinal section alignment reconstruction method based on a converter model, characterized in that: The steps include: Step 1: Obtain original stake point data of the railway line and input it into the slope change point segment model to obtain stake point data for input into the improved converter model; Step 2: Input the pile point data obtained in step 1 into the improved converter model to output the complete adjusted line, which specifically includes: Step 2.1, standardize the pile point data input into the improved converter model; Step 2.2: Process the standardized point data with a multi-head attention mechanism and input it into the encoder to obtain its position information. The number of attention heads should not exceed the input feature dimension of the encoder. Step 2.3: After adding regularization and normalization to the feedforward neural network part of the encoder, it is used to process and calculate the pile point data and slope change point data to obtain the encoder output data; Step 2.4: The data output by the encoder is input to the decoder and then output. The decoder also performs regularization and normalization operations of the feedforward neural network. Step 2.5: After the decoder outputs, it enters the mapping layer and outputs the data of the slope change point coordinates and curvature radius through the mapping layer; Step 2.6: After traversing the data of each slope change point, connect them to obtain the complete adjusted line.
2. The railway longitudinal section alignment reconstruction method based on the converter model according to claim 1, characterized in that: The step one comprises: Step 1.1: Inputting the original stake point data into the logistic regression model, wherein the original stake point data includes mileage data and elevation data, and using the logistic regression model to determine whether the original stake point belongs to a straight line measurement point or a vertical curve measurement point; Step 1.2: Select the stake point data near the slope change point as the input data for the improved converter model. Specifically: Take the middle point position of adjacent vertical curve measuring points and combine them to get the position list as follows: ; in, n Represents the number of vertical curve measuring points, The middle point position of each adjacent vertical curve measuring point; Map the position of each point in the position list to the corresponding original pile point data position on the line, and take The length of the pile point data is used as the pile point data for the input improved converter model; Indicates the data length of the input model; like is an even number, the length on the left is , the length on the right is ;like is an odd number, and the length on the left is , the length on the right is ; If the number of pile points on the left and right lines is insufficient, the remaining input pile points will be replaced by the last pile point data.
3. The railway longitudinal section alignment reconstruction method based on the converter model according to claim 2, characterized in that: The step 2.1 is specifically: Based on the stake point data that needs to be input into the improved converter model, the positional relationship between the stake mileage and the existing track surface elevation is obtained. The existing track surface elevation does not need to be position-coded, and redundant zero elements are not coded. Define the following three parameters: Model hidden layer dimension ; The sequence length , ensuring that the sequence length is greater than the number of sample points; Precomputed scaling factors ,in , is the dimension index in the longitudinal section; The calculation formula is as follows: ; in, is 2, corresponding to mileage and elevation, equivalent to: ,in R Represents the dimension of the data; Based on Python programming language, each pile point position is processed by sine function and cosine function and then input into a position coding matrix PE , the expression is as follows: ; ; Represents the position encoding matrix PE The Column 1 of the row, Represents the position encoding matrix PE The Column 2 of the row; Combining the pile point data input into the improved converter model with the position encoding matrix, the final position encoding matrix is as follows: 。 4. The railway longitudinal section alignment reconstruction method based on the converter model according to claim 3, characterized in that: The step 2.2 is specifically: Let the input sequence be ; Perform a linear transformation on X to generate the query matrix Q, key matrix K and value matrix V; ; in, is the weight matrix that can be learned; is the key / query vector dimension for each attention head, , is the number of heads; Perform multi-head splitting and ensure the number of attention heads Less than ,Will The matrix is divided into multiple sub-matrices according to the number of heads as follows: ; The dimensions of each matrix are ; For each attention head i, the attention weight is calculated and the weight vector is added as follows: ; in, Respectively represent The query matrix, key matrix and value matrix of each head; Indicates the similarity between the query and the key; is the scaling factor; represents the attention weight; Represents the normalization function, which is used to normalize the key dimension to the probability distribution and generate the weight matrix; Use attention weights Weighted sum, output ; Combine multiple outputs and perform linear transformation at the same time: ; ; in, , refers to the data output by multi-head operations; is the activation function; Indicates multi-headed attention; Represents a function for merging matrices or vectors; Refers to the linear transformation function after the multi-head output is merged, and All represent network weights; and Both represent offset terms, which are obtained by network self-learning; Represents the output of the attention head; represents a learnable linear projection weight matrix.
5. The railway longitudinal section alignment reconstruction method based on the converter model according to claim 4, characterized in that: The step 2.3 is specifically: The regularization formula is: ; in, are the weights in the weight matrix, represents the regularization coefficient; The normalization formula is: ; and are the mean and variance of the current batch respectively; and are the learnable scaling and translation parameters, represents the normalized data, Represents the original data, represents a constant used to prevent the denominator from being zero, Indicates adjusted data.
6. The railway longitudinal section alignment reconstruction method based on the converter model according to claim 5, characterized in that: The step 2.4 is specifically: Input the data output by the encoder and the adjusted measuring point data into the decoder; Feedforward neural network and regularization normalization operations are also performed in the decoder; The pile point data processed by several encoders are input into the decoder together with the slope change point data; When the multi-head attention mechanism is processed for the first time in the decoder, the slope change point data replacement value matrix is as follows: ; Among them, Q and K Marked as encoder output data, V Marked as slope change point data; After the first decoder output, subsequent decoder operations are the same as the encoder until the output enters the mapping layer.
7. The railway longitudinal section alignment reconstruction method based on the converter model according to claim 6, characterized in that: The step 2.5 is specifically: The mapping layer is set to multiple layers. The mapping layer formula is the same as the feedforward neural network layer. The number of mapping layers reflects the upper limit of the order of the circuit represented by the polynomial. The multi-layer calculation is as follows: ; The characteristics of the longitudinal section are reflected by the mapping layer, ensuring that the number of mapping layers is greater than 2 or 3. represents the weight, is the offset term, ensuring that the coefficients of higher-order terms tend to zero; Get the processed slope change point data y , and stored in sequence.
8. The railway longitudinal section alignment reconstruction method based on the converter model according to claim 7, characterized in that: The step 2.6 is specifically: Connect the slope change point data in the position list in the form of straight lines and vertical curves to obtain a complete adjusted route; The cost function is used to process the data of each point on the adjusted line and the original pile point data. The formula is as follows: ; in, is the value of the cost function; For the original line Elevation of each stake point; After adjustment, the line Pile point elevation ; The cost function is used to minimize the entire line adjustment amount, and the cost function value is output. J After that, back propagation learning is performed to update the parameters.
9. A readable storage medium, characterized in that: Computer program instructions are stored thereon, and when the computer program instructions are executed by a processor, a railway longitudinal section alignment reconstruction method based on a converter model as claimed in any one of claims 1 to 8 is implemented.
10. An electronic device, characterized in that: include: At least one processor, at least one memory, and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, a railway longitudinal section alignment reconstruction method based on a converter model as described in any one of claims 1 to 8.