A method for generating a profile line in a highway tunnel by natural language parameter driving

The method for generating the inner contour of highway tunnels driven by natural language models, by utilizing drawing script programming and computational reasoning, solves the problem of the difficulty in responding to natural language parameters in existing technologies, and achieves efficient and accurate tunnel design.

CN120930253BActive Publication Date: 2026-01-23湖南省高速公路集团有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511475280.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2026-01-23
Estimated Expiration
2045-10-15

AI Technical Summary

Technical Problem

Existing technologies lack methods to understand and respond to engineering design parameters input in natural language and intelligently generate highway tunnel outlines that meet engineering requirements, resulting in low design efficiency and results that are easily affected by human error.

Method used

By generating drawing script program code, parsing the contour line metafile into a text dataset, and using a natural language model for computational reasoning, a computational chain of question, parameter, thinking, and answer modules is established to optimize model parameters in order to generate the contour line inside the highway tunnel.

Benefits of technology

It enables effective understanding and response to natural language parameters, generates tunnel outlines that meet engineering requirements, improves design efficiency and quality, and avoids human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120930253B_ABST
    Figure CN120930253B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of contour line generation methods in highway tunnel driven by natural language parameter.The method includes: according to the drawing script program coding of the contour line in tunnel generated according to preset specification standard, text dataset is generated according to drawing script program coding.Text data includes question module, parameter module, thinking module and answering module.After establishing the calculation chain between the content of parameter module and answering module according to question module, the content of thinking module is supplemented, and the thinking chain text is obtained.The text dataset is calculated and inferred by natural language model, and after the content of each text data in text dataset is marked according to the thinking chain text, the model parameter of natural language model is optimized according to preset combination parameter, and the natural language model after fine tuning is obtained.The contour line in highway tunnel is generated by the natural language model after fine tuning.The method is used to improve the efficiency and quality of highway tunnel contour line generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of highway tunnel engineering design technology, and in particular to a method for generating the inner contour line of a highway tunnel driven by natural language parameters. Background Technology

[0002] As a crucial transportation infrastructure, the design of the internal contour of highway tunnels is a key aspect of tunnel engineering. Precise and reasonable internal contour design not only affects the structural safety and stability of the tunnel, directly influencing the stress and deformation of the surrounding rock, but also determines the tunnel's traffic capacity, operational safety, and the space available for internal facilities. Furthermore, accurate contour definition forms the basis for subsequent construction surveying, excavation control, and post-construction digital management, and is essential for achieving automation and intelligentization in tunnel construction.

[0003] Traditional methods for designing the internal profile of highway tunnels typically rely on established design specifications, standard drawing sets, and the experience of engineers. In current technologies, the design process often involves tedious manual drafting and parameter calculations, requiring designers to make comprehensive judgments and manual adjustments based on factors such as geological conditions, traffic demands, and structural requirements. While this approach is mature, it has limitations in efficiency, making it difficult to quickly respond to complex and ever-changing design needs or to conduct multi-scheme comparison and optimization. Furthermore, the design process is highly dependent on the experience of engineers, potentially influenced by subjective factors, and has limited capacity to handle the linkage between massive amounts of geological data, operational data, and design parameters, making it difficult to fully utilize the convenience brought by modern information technology.

[0004] In recent years, machine learning and deep learning technologies have demonstrated tremendous potential in the field of tunnel engineering and have been applied in multiple areas. These applications mainly focus on the prediction, monitoring, analysis, and risk assessment of tunnel construction processes, as well as the modeling and inspection of completed tunnels, showcasing the advantages of artificial intelligence technology in processing complex tunnel engineering data and automating specific tasks.

[0005] While artificial intelligence (AI) technology has made significant progress in the analysis and prediction of tunnel engineering, its application in the design phase, particularly in intelligent generative design, remains in the exploratory stage. Existing intelligent generative methods, while demonstrating the potential of data-driven generative design, also highlight current limitations, namely the "lack of input for complex design parameters with significant engineering implications (such as structural, functional, and performance parameters)." Directly applying these methods to tunnel profile generation may fail to effectively integrate the engineering constraints, regulatory requirements, and the vague or qualitative design intentions expressed by designers using natural language specific to tunnel design.

[0006] Therefore, existing technologies lack an effective method to understand and respond to engineering design parameters input in natural language form, and intelligently generate highway tunnel outlines that meet engineering requirements. Summary of the Invention

[0007] Therefore, it is necessary to provide a method for generating the inner contour of a highway tunnel by driving natural language parameters, which can improve the efficiency and quality of generating the outer contour of the highway tunnel and address the above-mentioned technical problems.

[0008] A method for generating the inner contour of a highway tunnel driven by natural language parameters, the method comprising:

[0009] The script program code for generating the tunnel's inner contour line is generated according to preset specifications and standards. This code then enables the parsed contour line metadata file to generate a text dataset. Each text dataset includes a question module, a parameter module, a thought module, and an answer module.

[0010] After establishing a calculation chain between the parameter module and the answer module based on the question module, the content of the thinking module is supplemented to obtain the thought chain text.

[0011] The text dataset is computed and reasoned using a natural language model. During the computational reasoning process, each text data in the text dataset is labeled with content based on the thought chain text. The model parameters of the natural language model are then optimized according to preset combination parameters to obtain a fine-tuned natural language model.

[0012] The inner contour lines of the highway tunnel are generated using a finely tuned natural language model.

[0013] In one embodiment, the method further includes: encoding a drawing script program for the tunnel's inner contour line using a set of calculation tools according to a preset highway tunnel engineering specification standard. The set of calculation tools includes a first calculation tool and a second calculation tool. The first calculation tool uses a center-radius-angle algorithm to determine the coordinates of all discrete sampling points of the arc within the tunnel's inner contour.

[0014] ;

[0015] in, Let be the coordinates of the center of the circle within the tunnel's outline. Let be the radius of the tunnel's inner contour. The starting angle of the arc. The terminating angle of the arc. The arc angle of the discrete sampling points. The x-coordinate of the discrete sampling point. Here, represents the ordinate of the discrete sampling point. The second calculation tool uses the line segment interception method to obtain the coordinates of the discrete sampling point corresponding to the new line segment intercepted on the radius:

[0016] ;

[0017] ;

[0018] in, The coordinates of the discrete sampling points corresponding to the new line segment. For radius The coordinates of the starting point of the straight line segment. For radius The coordinates of the endpoint of the straight line segment. This is the length of the new line segment.

[0019] In one embodiment, the method further includes: parsing a contour metafile using a text file format, and generating a text dataset from the sequence of discrete sampling point coordinates of the contour lines within the tunnel and the coordinates of all discrete sampling points in the contour metafile.

[0020] In one embodiment, the system further includes: a questioning module for generating drawing instructions for the tunnel's inner contour line; a parameter module for transmitting engineering design parameters for the drawn tunnel inner contour line; a thinking module for determining key geometric parameters of the tunnel inner contour line by describing the calculation process using the engineering design parameters in natural language; and an answering module for expressing, in text form, the coordinates of discrete sampling points, the retrieval number of the discrete sampling points, and the sequence number arrangement of the inner contour line formed by concatenating the discrete sampling points.

[0021] In one embodiment, the method further includes: establishing a calculation chain based on the drawing instructions from the questioning module, using the content of the parameter module as the calculation link from four dimensions, and using the closed contour line formed during the continuous arc drawing process as the recursive order of the answer module's content. The question-and-answer text obtained through the calculation chain is added to the content of the thinking module to obtain the thought chain text.

[0022] In one embodiment, the method further includes: performing computational inference on the text dataset using a natural language model, and recursively calculating the key geometric parameters of each arc segment in the tunnel's inner contour line during the continuous arc drawing process, based on the equivalence relationship of the first and last endpoints of the two-way connection segments in the spatial topology.

[0023] ;

[0024] ;

[0025] ;

[0026] in, The coordinates of the endpoint of the arc corresponding to the current recursive iteration. Let these be the coordinates of the starting point of the arc corresponding to the previous iteration. The sequence number is the one used in the recursive order. The radian angle of the previous recursive iteration. For each arc segment, the center of the circle is... For each arc segment, specify the coordinates of its center. The radius of the arc corresponding to the previous recursive iteration. The radius of the arc of the sealing segment. The center of the arc corresponding to the sealing segment. The coordinates of the endpoint of the arc of the sealing segment. Let be the arc angle of the closed segment. The equivalent relation is:

[0027] ;

[0028] in, The geometry of all discrete sampling points in the current geometric space. As the geometric starting point, The geometric endpoint As an equivalent new element, and These are the start and end points of adjacent line segments. During computational inference, the key content of each text data point in the text dataset is labeled based on the thought chain text and key geometric parameters:

[0029] ;

[0030] in, For the first i The input text data pair of the first j Label-enhanced weights for each output text data N For the total number of tag types, For the first t The importance weighting coefficient of class tags For the label mask function, For similarity function, For temperature parameters, L The sequence length is given.

[0031] In one embodiment, the method further includes: selecting text structured syntax stepwise to optimize the model parameters of the natural language model according to preset combination parameters, obtaining optimized model parameters, training a loss function with the optimized model parameters, and obtaining a fine-tuned natural language model.

[0032] In one embodiment, the method further includes: after reasoning about the newly acquired text dataset through a fine-tuned natural language model, driving the UI module to generate the inner contour line of the highway tunnel.

[0033] The aforementioned method for generating highway tunnel contour lines driven by natural language parameters first generates a drawing script program based on preset standards, parsing the tunnel contour line metafile into a text dataset containing question, parameter, thought, and answer modules. The question module corresponds to engineering design parameter input in natural language form, the parameter module is associated with specific engineering values, and the answer module corresponds to the contour line generation result. This step establishes a basic mapping between natural language, engineering parameters, and design results, solving the core prerequisite problem of "understanding natural language input." Next, the computational chain between the parameter and answer modules is constructed through the question module, and a thought module is added to form a thought chain text. This process makes explicit the implicit logic of "how parameters are transformed into contour lines" in engineering design, enabling the model to grasp the reasoning path from natural language parameters to engineering results. This ensures that the generation process conforms to engineering logic and solves the reasoning gap problem of "responding to natural language parameters and generating contour lines that meet requirements." Subsequently, a natural language processing model is used to perform computational inference on the text dataset. Combined with text tagging based on thought chains and optimized model parameters, the fine-tuned model can accurately understand industry-specific natural language expressions, directly converting engineering design parameters into outlines. This eliminates intermediate steps such as manual parameter conversion and logic verification, significantly improving generation efficiency. Simultaneously, because the model training data strictly adheres to preset specifications, the generated results avoid deviations that may occur during manual operation, ensuring the stability and compliance of the outline quality. In summary, this solution, through a progressive design of data mapping, logic explicitness, and model optimization, not only achieves understanding and response to natural language engineering parameters but also improves the generation efficiency and quality of highway tunnel outlines through an intelligent process. Attached Figure Description

[0034] Figure 1 This is a flowchart of a method for generating the inner contour of a highway tunnel using natural language parameters, as described in one embodiment.

[0035] Figure 2 This is a flowchart of a method for drawing the outline of the inner contour of a tunnel cross section in one embodiment;

[0036] Figure 3 This is a schematic diagram of the inner contour of an .obj file expressed in text format in one embodiment.

[0037] Figure 4 This is a sample text diagram illustrating the computational inference between engineering design parameters and the tunnel's inner contour line in one embodiment.

[0038] Figure 5 Here is a sample image of the obj text content after annotation in one embodiment;

[0039] Figure 6 This is a sample image of question-and-answer text marked in HTML format, as shown in one embodiment.

[0040] Figure 7 This is a graph showing the final loss value changes after fine-tuning training at different epochs in one embodiment.

[0041] Figure 8 The inner contour plots of the large model after fine-tuning at different Epochs in one embodiment are compared with the results of the standard control group.

[0042] Figure 9 This is a comparison chart of the fine-tuned training loss values ​​after being marked with "#" in one embodiment. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0044] In one embodiment, such as Figure 1 As shown, a method for generating the inner contour of a highway tunnel driven by natural language parameters is provided, including the following steps:

[0045] Step 102: Generate the drawing script program code for the tunnel inner contour line according to the preset standard, so that the parsed contour line metafile generates a text dataset according to the drawing script program code.

[0046] Each piece of text data includes a question module, a parameter module, a thought module, and an answer module.

[0047] Specifically, according to the pre-defined "Specifications for Design of Highway Tunnels" (Volume 1, Civil Engineering) (JTG 3370.1-2018), there are many options. The drawing process for the tunnel's inner contour line can follow the "Specifications for Design of Highway Tunnels" (Volume 1, Civil Engineering) (JTG 3370.1-2018), using a horseshoe-shaped cross-section and a "right half four-circle arc combined with y-axis mirroring" drawing process. The drawing script program for the tunnel's inner contour line is coded using the secondary development APIs of CAD and other software, including calling functions for drawing arcs, lines, and curves with equal length segments or node segments.

[0048] Furthermore, the plotting script program coding requires the use of two calculation tools:

[0049] Calculation tool 1) Center-radius-angle method, given the center of the circle ,radius r Starting angle Termination angle The expression for determining the coordinates of all discrete sampling points of the arc is:

[0050] .

[0051] Calculation tool 2) Line segment interception method, given the length is... r The straight segment, starting point and the end point Then the length of the segment to be cut is r’ Discrete sampling points of the new line segment The coordinate expression is:

[0052] , .

[0053] Furthermore, parsing the contour line metafile to express content in text form, in preferred implementations, includes but is not limited to those targeting... The .obj file format allows the outline to be generated by first expressing point coordinates and then expressing point sequences, ultimately forming a plain text outline metafile.

[0054] Step 104: After establishing a calculation chain between the parameter module and the answer module based on the question module, supplement the content of the thinking module to obtain the thought chain text.

[0055] Specifically, the process uses natural language to describe how to perform step-by-step calculations using engineering design parameters to ultimately determine the key geometric parameters of the tunnel's inner contour. These key geometric parameters include the start and end points of each arc segment and the coordinates of its center. The calculation process involves seven steps: 1) calculating the cumulative rotation angle of each arc segment; 2) calculating the start and end point coordinates of each arc segment; 3) calculating the center of each arc segment; 4) defining the final sealing arc segment; 5) defining the right half of the complete arc; 6) drawing; and 7) summarizing the key parameters. Step 6) involves drawing each arc segment sequentially, then symmetrically merging them about the Y-axis to form a closed contour line. Finally, the contour line is divided into 100 equidistant segments, generating 100 point objects.

[0056] Furthermore, regarding the aforementioned continuous arc drawing process, the recursive formula for the endpoint coordinates of each arc segment is as follows:

[0057] ;

[0058] in, i The sequence number is used, and the starting point of the first arc is... , The recursive formula for the coordinates of the center of each arc segment is:

[0059] .

[0060] Furthermore, regarding the central angle of the aforementioned sealing segment arc... θ 4 is:

[0061] ;

[0062] in θ 1. θ 2. θ 3. These are the central angles of the first three arc segments. The radius and center coordinates of the closing arc segment are:

[0063] ;

[0064] in, R 4 is the radius. O 4c Let the coordinates be the center coordinates, ( X D , Y D ) represents the coordinates of the endpoint of the previous arc segment.

[0065] Furthermore, the principle behind forming the closed contour line utilizes the set equivalence relation in spatial topology, that is, the beginning and end endpoints of any pairwise connected segments form an equivalence relation as follows:

[0066] ;

[0067] Where X is the set of all points in the domain space, B 1 and B 2 represents the first and last endpoints of adjacent line segments. Under equivalence relations, all segments connected to { B 1, B 2} An equivalent point is considered a new element, denoted as [ B ].

[0068] Furthermore, for the response module in the text dataset, it primarily expresses three pieces of content in text form: the coordinates of the 100 equally divided points of the inner contour line and the retrieval sequence number of each point, and the sequence number arrangement of the points forming the inner contour line. The text content must be formatted according to the .obj file format. The purpose of generating the thinking text is specifically to supplement the content of the thinking module. Its aim is to establish a computational chain between the parameter module and the response module, accurately drawing the inner contour line object.

[0069] Step 106: Perform computational reasoning on the text dataset using a natural language model. During the computational reasoning process, after labeling the content of each text data in the text dataset according to the thought chain text, optimize the model parameters of the natural language model according to the preset combination parameters to obtain the fine-tuned natural language model.

[0070] Specifically, the text dataset is subjected to computational inference using a natural language model. The relevant computational components include: 1) cumulative turning angles; 2) endpoints of the arc segment; 3) center of the arc segment; 4) bottom arc segment; 5) right half arc; 6) CAD drawing; and 7) summary of key parameters. Furthermore, the text needs to be labeled for each computational component.

[0071] Furthermore, text content labeling also includes using specific symbols and letters to label specific content within the combined 2000 sets of question-and-answer text dataset samples. Labeling specific content is for the purpose of implementing weighted label attention.

[0072] ;

[0073] in, Indicates the first i The input text pair of the first j Tag-enhanced weighting of each output text N Indicates the total number of tag types (including node sequence number tags, symmetric point annotation tags, etc.). Indicates the first t The importance weighting coefficient of class tags This represents the tag mask function. It is a similarity function that measures the input. i With output j In tag type t The degree of correlation below It's a temperature parameter that controls the sharpness of attention distribution. L It is the sequence length.

[0074] Furthermore, regarding the method mentioned above for using symbols and letters to mark up question-and-answer text content, it can be done, but is not limited to, referring to HTML or Markdown syntax. The purpose of this is to prevent large language models from exhibiting hallucinations or failing to stop after fine-tuning training.

[0075] Furthermore, the parameter settings for the fine-tuning process include four requirements: 1) the sample size needs to exceed 2000; 2) the parameter size of the large language model needs to reach 7B (7 billion); 3) the maximum text training length is 8192 (characters); and 4) the number of epochs is at least 1500. Other parameters for the fine-tuning process can be set to the default values.

[0076] Step 108: Generate the inner contour line of the highway tunnel using the fine-tuned natural language model.

[0077] Specifically, deploying the fine-tuned large model using U1 includes, but is not limited to, using function libraries like Docker for storage and retrieval. Regarding the dialogue prompts provided by U1 for the fine-tuned large model, it is necessary to ask questions and pass engineering design parameters for the inner contour lines. The questions must include four parts: Who-What-How-Result, and the engineering design parameters must be passed strictly according to the structured data format corresponding to the parameter module.

[0078] In the aforementioned method for generating highway tunnel contour lines driven by natural language parameters, the first step is to generate a drawing script program code based on preset standards. This code then parses the tunnel contour line metafile into a text dataset containing question, parameter, thought, and answer modules. The question module corresponds to engineering design parameter inputs in natural language form, the parameter module is associated with specific engineering values, and the answer module corresponds to the contour line generation result. This step establishes a basic mapping between natural language, engineering parameters, and design results, solving the core prerequisite problem of "understanding natural language input." Next, the question module constructs a computational chain between the parameter and answer modules, and a thought module is added to form a thought chain text. This process makes explicit the implicit logic of "how parameters are transformed into contour lines" in engineering design, enabling the model to grasp the reasoning path from natural language parameters to engineering results. This ensures that the generation process conforms to engineering logic and solves the reasoning gap problem of "responding to natural language parameters and generating contour lines that meet requirements." Subsequently, a natural language processing model is used to perform computational inference on the text dataset. Combined with text tagging based on thought chains and optimized model parameters, the fine-tuned model can accurately understand industry-specific natural language expressions, directly converting engineering design parameters into outlines. This eliminates intermediate steps such as manual parameter conversion and logic verification, significantly improving generation efficiency. Simultaneously, because the model training data strictly adheres to preset specifications, the generated results avoid deviations that may occur during manual operation, ensuring the stability and compliance of the outline quality. In summary, this solution, through a progressive design of data mapping, logic explicitness, and model optimization, not only achieves understanding and response to natural language engineering parameters but also improves the generation efficiency and quality of highway tunnel outlines through an intelligent process.

[0079] In one embodiment, a script program for drawing the tunnel's inner contour is coded using a set of calculation tools according to a preset highway tunnel engineering standard. The calculation tools set includes a first calculation tool and a second calculation tool. The first calculation tool uses a center-radius-angle algorithm to determine the coordinates of all discrete sampling points of the arc within the tunnel's inner contour.

[0080] ;

[0081] in, Let be the coordinates of the center of the circle within the tunnel's outline. Let be the radius of the tunnel's inner contour. The starting angle of the arc. The terminating angle of the arc. The arc angle of the discrete sampling points. The x-coordinate of the discrete sampling point. Here, represents the ordinate of the discrete sampling point. The second calculation tool uses the line segment interception method to obtain the coordinates of the discrete sampling point corresponding to the new line segment intercepted on the radius:

[0082] ;

[0083] ;

[0084] in, The coordinates of the discrete sampling points corresponding to the new line segment. For radius The coordinates of the starting point of the straight line segment. For radius The coordinates of the endpoint of the straight line segment. This is the length of the new line segment.

[0085] In one embodiment, a text dataset is generated from the contour metafile parsed in text file format, consisting of the coordinates of discrete sampling points of the contour lines within the tunnel and the coordinates of all discrete sampling points.

[0086] In one embodiment, a question module is used to generate drawing instructions for the tunnel's inner contour line. A parameter module is used to pass the engineering design parameters of the drawn tunnel inner contour line. A thinking module is used to describe the calculation process using the engineering design parameters in natural language to determine the key geometric parameters of the tunnel inner contour line. An answer module is used to express in text form the coordinates of discrete sampling points, the retrieval number of the discrete sampling points, and the sequence number arrangement of the inner contour line formed by concatenating the discrete sampling points.

[0087] In one embodiment, based on the drawing instructions from the questioning module, calculations are performed from four dimensions using the content of the parameter module as the calculation link, and a calculation chain is established by recursively analyzing the closed contour lines drawn during the continuous arc drawing process as the content of the answer module. The question-and-answer text obtained through the calculation chain is added to the content of the thinking module to obtain the thought chain text.

[0088] In one embodiment, a natural language model is used to perform computational inference on the text dataset. Based on the equivalence relationship of the first and last endpoints of the connection segments in the spatial topology, the key geometric parameters of each arc segment in the tunnel's inner contour line are recursively calculated during the continuous arc drawing process.

[0089] ;

[0090] ;

[0091] ;

[0092] in, The coordinates of the endpoint of the arc corresponding to the current recursive iteration. Let these be the coordinates of the starting point of the arc corresponding to the previous iteration. The sequence number is the one used in the recursive order. The radian angle of the previous recursive iteration. For each arc segment, the center of the circle is... For each arc segment, specify the coordinates of its center. The radius of the arc corresponding to the previous recursive iteration. The radius of the arc of the sealing segment. The center of the arc corresponding to the sealing segment. The coordinates of the endpoint of the arc of the sealing segment. Let be the arc angle of the closed segment. The equivalent relation is:

[0093] ;

[0094] in, The geometry of all discrete sampling points in the current geometric space. As the geometric starting point, The geometric endpoint As an equivalent new element, and These are the start and end points of adjacent line segments. During computational inference, the key content of each text data point in the text dataset is labeled based on the thought chain text and key geometric parameters:

[0095] ;

[0096] in, For the first i The input text data pair of the first j Label-enhanced weights for each output text data N For the total number of tag types, For the first t The importance weighting coefficient of class tags For the label mask function, For similarity function, For temperature parameters, L The sequence length is given.

[0097] In one embodiment, the model parameters of the natural language model are optimized step by step according to the preset combination parameters by selecting the text structured grammar, so as to obtain the optimized model parameters. The loss function is then trained with the optimized model parameters to obtain the fine-tuned natural language model.

[0098] In one embodiment, after reasoning about the newly acquired text dataset through a fine-tuned natural language model, the UI module is driven to generate the inner contour lines of the highway tunnel.

[0099] In one embodiment, such as Figure 2 As shown, a method for outlining the inner contour of a tunnel cross section is provided, and the specific steps are as follows:

[0100] T1: Code the drawing script program for the tunnel outline according to the "Specifications for Design of Highway Tunnels" (Volume 1, Civil Engineering) (JTG 3370.1-2018);

[0101] T2: Parse the outline metafile to form a text file format;

[0102] T3: The content structure of the text dataset (questions, parameters, thoughts, answers);

[0103] T4: Mind chain text generated for tunnel outline;

[0104] L1: Output text content tagging based on thought chain;

[0105] F1: Parameter settings for fine-tuning the large language model;

[0106] U1: Deployment of the fine-tuned large language model and dialogue prompts.

[0107] In this embodiment, the method for drawing the inner contour line of the highway tunnel refers to the "Specifications for Design of Highway Tunnels" (Volume 1, Civil Engineering) (JTG 3370.1-2018), following the horseshoe-shaped cross-section, i.e., the process of "right half with 4 circular arcs combined with y-axis mirroring". T3 is for completing the content structure of the text dataset system.

[0108] Regarding the coding of the drawing script program for the inner contour line of the horseshoe-shaped tunnel cross section, this embodiment preferably utilizes secondary development through software with parametric modeling capabilities, such as AutodeskCAD, CATIA, and Rhino, to complete the coding of the drawing script program, thereby automating the generation of inner contour line design examples. The script program coding requires two calculation tools:

[0109] Calculation tool 1) Center-radius-angle method, given the center of the circle ,radius r Starting angle Termination angle The expression for determining the coordinates of all discrete sampling points of the arc is:

[0110] .

[0111] Calculation tool 2) Line segment interception method, given the length is... r The straight segment, starting point and the end point Then the length of the segment to be cut is r’ Discrete sampling points of the new line segment The coordinate expression is:

[0112] , .

[0113] The specific script command flow is as follows:

[0114] Input: Engineering design parameters for the inner contour of the horseshoe-shaped tunnel, namely O1_R, O1_angle, O2_R, O2_angle, O3_R, O3_angle.

[0115] Output: Coordinates of 100 equally divided points of the horseshoe-shaped tunnel's inner contour, stored in a two-dimensional array format.

[0116] 1. With (0,0) as the center and O1_R as the radius, generate an arc segment with a central angle of O1_angle from the starting point A(0,O1_R), which is called Arc_1;

[0117] 2. Extract the end point of Circle_1 and use it as B;

[0118] 3. On the straight line between the center (0,0) and B, extract the center point of the circle with radius O2_R using the above line segment interception method, and take it as O2c;

[0119] 4. Using O2c as the center and the line segment between points O2c and O2_R as the radius, draw an arc segment with a center angle of O2_angle using the center-radius-angle method described above, and use it as Arc_2;

[0120] 5. Extract the end points of Arc_2 and use them as C;

[0121] 6. On the straight line containing O2c and C, extract the center point of a circle with radius O3_R, and take it as O3c;

[0122] 7. Using O3c as the center and the line segment between points O3c and O3_R as the radius, draw an arc segment with a center angle of O3_angle using the center-radius-angle method described above, and use it as Arc_3;

[0123] 8. Extract the endpoints of Arc_3 and use them as D;

[0124] 9. Extend the line containing point D and O3c to intersect the Y-axis at point O4c;

[0125] 10. Using the line segment between points O4c and D as the radius and point O4c as the center, draw an arc segment Arc_4 clockwise using the center-radius-angle method described above, intersecting the Y-axis and point E;

[0126] 11. Connect the above four arc segments, ABCDE, in sequence to form a four-arc splice, which is Arc_0;

[0127] 12. Copy Arc_0 symmetrically with the Y-axis to form a closed outline, which serves as the Circle;

[0128] 13. Divide the Circle curve into 100 equal points and extract the point coordinates (XYZ) into a 100×3 two-dimensional array object.

[0129] Furthermore, the script program coded above automatically draws 2000 contour line examples. Preferably, the six engineering design parameters O1_R, O1_angle, O2_R, O2_angle, O3_R, and O3_angle are defined using random values ​​from a uniform probability density distribution. To ensure prediction and convergence performance, the value ranges are as follows:

[0130] The range of O1_R is 5000mm~10000mm;

[0131] The range of O1_angle is 30°~60°;

[0132] The range of O2_R is (O1_R / 2) mm ~ (4 O1_R / 5)mm;

[0133] The range of O2_angle is (90-O1_angle)° to (120-O1_angle)°;

[0134] The range of O3_R is (O2_R / 5) mm to (O2_R / 4) mm;

[0135] The range of O3_angle is 45° to 60°.

[0136] Furthermore, the coordinates (X, Z, Y) of the inner contour line points stored in 2000 three-dimensional arrays (3×100) are stored in 2000 .obj files, with each .obj file containing text formatted as follows: Figure 3 As shown.

[0137] Furthermore, 2000 sets of text datasets were formed, with each set containing text content modules including questions, parameters, thoughts, and answers.

[0138] The question module includes the meanings of the above WWHR4 layers, for example: [You are a highway tunnel engineering expert proficient in CAD drawing.] + [Please draw the internal outline of the tunnel for me according to the requirements of the "Highway Tunnel Design Specification" (Volume 1, Civil Engineering) (JTG 3370.1-2018).] + [The drawing process is: first complete the drawing of the right half of the outline, then mirror it along the centerline to obtain the left half of the outline.] + [This drawing only involves the tunnel's internal outline and does not include sidewalls, road surfaces, or other structural lines.]

[0139] The content of the question module for each set of texts does not need to be completely identical, but it should correspond to the four levels of meaning: Who, What, How, and Result. Preferably, synonym substitution can be used to make the question modules of each set of texts slightly different, preventing overfitting during subsequent model training.

[0140] The parameter module includes definitions for six parameters: O1_R, O1_angle, O2_R, O2_angle, O3_R, and O3_angle. To meet specific data transmission format requirements, this embodiment preferably uses JSON format for parameter transmission, as follows:

[0141] {

[0142] "O1_R": 8600,

[0143] "O1_angle": 33.7,

[0144] "O2_R": 5009,

[0145] "O2_angle": 77.8,

[0146] "O3_R": 1129,

[0147] "O3_angle": 59.3

[0148] }

[0149] The thinking module is structured around seven steps: 1) calculating the cumulative rotation angle of each arc segment; 2) calculating the start and end coordinates of each arc segment; 3) calculating the center of each arc segment; 4) defining the final bottom arc segment; 5) defining the right half of the complete arc; 6) drawing the arc; and 7) summarizing key parameters. Regarding the continuous arc drawing process described above, the recursive formula for the endpoint coordinates of each arc segment is:

[0150] ;

[0151] in, i The sequence number is used, and the starting point of the first arc is... , The recursive formula for the coordinates of the center of each arc segment is:

[0152] .

[0153] Regarding the central angle of the aforementioned closed arc segment θ 4 is:

[0154] ;

[0155] in θ 1. θ 2. θ 3. These are the central angles of the first three arc segments. The radius and center coordinates of the closing arc segment are:

[0156] ;

[0157] in, R 4 is the radius. O 4c Let the coordinates be the center coordinates, ( X D , Y D ) represents the coordinates of the endpoint of the previous arc segment.

[0158] The principle behind forming the closed contour line mentioned above utilizes the set equivalence relation in spatial topology, that is, the beginning and end endpoints of each pair of connected segments form an equivalence relation:

[0159] ;

[0160] Where X is the set of all points in the domain space, B 1 and B 2 represents the first and last endpoints of adjacent line segments. Under equivalence relations, all segments connected to { B 1, B 2} An equivalent point is considered a new element, denoted as [ B Finally, a sample of a thinking module in this embodiment is as follows: Figure 4 As shown.

[0161] Preferably, the reasoning module text content in this embodiment needs to be structured using Markdown syntax. For each group of text reasoning modules, the six parameters O1_R, O1_angle, O2_R, O2_angle, O3_R, and O3_angle need to be calculated step by step. In order to prepare 2000 groups of thinking modules as training samples, this embodiment preferably uses a large model to perform 2000 inferences, generating 2000 batches of thinking module text.

[0162] The answer module directly uses the text content of the .obj file. In this embodiment, it is preferable to use "#" comments to mark the text content, specifically as follows: Figure 5 As shown.

[0163] Once the four content modules—questions, parameters, thoughts, and answers—for the 2000 datasets are ready, the four modules need to be combined. Labeling specific content is for implementing weighted label attention.

[0164] ;

[0165] in, Indicates the first i The input text pair of the first j Weighted tag enhancement for each output text;

[0166] N Indicates the total number of marker types (including node sequence markers, symmetric point annotation markers, etc.);

[0167] Indicates the first t Importance weighting coefficients for class tags;

[0168] This represents the tag mask function;

[0169] It is a similarity function that measures the input. i With output j In tag type t The degree of correlation;

[0170] It is a temperature parameter that controls the sharpness of attention distribution;

[0171] L It is the sequence length.

[0172] In this embodiment, specific content is preferably marked using HTML format, such as... Figure 6 As shown.

[0173] After preparing a dataset of 2000 question-and-answer text sets, this embodiment preferably deploys a large model for fine-tuning. The maximum text training length (max_seq_length) is 8192, and the training epochs are 1500.

[0174] As a comparison with this embodiment, the changes in the loss value of the final fine-tuning training were tested when the epochs were 750, 1500, and 3000, respectively. The results are as follows: Figure 7 As shown. Correspondingly, the inner contour diagrams generated by the large model after different rounds of fine-tuning are as follows. Figure 8As shown, ensuring an Epoch of 1500 not only satisfies the training requirements but also places moderate demands on server computing resources.

[0175] As a comparison with this embodiment, the effect of the "#" annotation marker on the loss value after fine-tuning training was also tested. Figure 9 As shown, while keeping max_steps=1500 constant, using "#" annotations can not only solve the illusion phenomenon of large language models, but also significantly reduce the loss value of the final training.

[0176] As a comparison with this embodiment, an ANN model was trained. Considering that the coordinates of the 100 nodes of the inner contour line are essentially only represented in a two-dimensional plane, the output neurons of the ANN model are 2 × 100 (corresponding to the X, Y two-dimensional array node coordinates of the above-mentioned response module), and the input neurons are 6 (corresponding to the above-mentioned parameter module). After testing, it was found that coordinate deviations still exist, and the final node stringing command cannot be output. It is evident that the method of parameter-driven generation of the inner contour line of a highway tunnel based on a large language model has advantages.

[0177] It should be understood that, although Figures 1-2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 1-2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0178] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0179] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0180] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A method for generating the inner contour of a highway tunnel driven by natural language parameters, characterized in that, The method includes: The drawing script program code for the tunnel inner contour line is generated according to the preset standard, so that the parsed contour line metafile generates a text dataset according to the drawing script program code; each text dataset includes a question module, a parameter module, a thinking module, and an answer module; After establishing a calculation chain between the content of the parameter module and the answer module based on the question module, the content of the thinking module is supplemented to obtain the thought chain text. Based on the drawing instructions of the question module, the calculation chain is established from four dimensions with the content of the parameter module as the calculation link, and the closed contour line of the continuous arc drawing process is used as the recursive order of the content of the answer module. The question-and-answer text obtained through the computational chain is added to the content of the thinking module to obtain the thinking chain text; By performing computational inference on the text dataset using a natural language model, and based on the equivalence relationship of the first and last endpoints of each pair of connected segments in the spatial topology, the key geometric parameters of each arc segment in the tunnel's inner contour line during the continuous arc drawing process are recursively calculated: in, The coordinates of the endpoint of the arc corresponding to the current recursive iteration. Let these be the coordinates of the starting point of the arc corresponding to the previous iteration. The sequence number is the one used in the recursive order. The radian angle of the previous recursive iteration. For each arc segment, the center of the circle is... For each arc segment, specify the coordinates of its center. The radius of the arc corresponding to the previous recursive iteration. The radius of the arc of the sealing segment. The center of the arc corresponding to the sealing segment. The coordinates of the endpoint of the arc of the sealing segment. The arc angle of the sealing segment; The equivalence relation is as follows: in, The geometry of all discrete sampling points in the current geometric space. As the geometric starting point, The geometric endpoint As an equivalent new element, and These are the first and last endpoints of adjacent line segments; During computational reasoning, the key content of each text data in the text dataset is labeled based on the thought chain text and the key geometric parameters: in, For the first i The input text data pair of the first j Label-enhanced weights for each output text data N For the total number of tag types, For the first t The importance weighting coefficient of class tags For the label mask function, For similarity function, For temperature parameters, L The sequence length; The text dataset is computed and reasoned using a natural language model. During the computed and reasoned process, each text data in the text dataset is labeled with content according to the thought chain text. The model parameters of the natural language model are then optimized according to preset combination parameters to obtain a fine-tuned natural language model. The fine-tuned natural language model is used to generate the inner contour line of the highway tunnel.

2. The method according to claim 1, characterized in that, The script program code for generating the tunnel's inner contour line according to preset specifications includes: The drawing script program for the tunnel's inner contour line was coded using a set of calculation tools according to the pre-set highway tunnel engineering specifications and standards. The computing tool set includes a first computing tool and a second computing tool; The first calculation tool uses a center-radius-angle algorithm to determine the coordinates of all discrete sampling points of the arc in the tunnel's inner contour: in, Let be the coordinates of the center of the circle within the tunnel's outline. Let be the radius of the tunnel's inner contour. The starting angle of the arc. The terminating angle of the arc. The arc angle of the discrete sampling points. The x-coordinate of the discrete sampling point. The ordinate of the discrete sampling point; The second calculation tool is to obtain the coordinates of discrete sampling points corresponding to the new line segment intercepted on the radius using the line segment interception method: in, The coordinates of the discrete sampling points corresponding to the new line segment. For radius The coordinates of the starting point of the straight line segment. For radius The coordinates of the endpoint of the straight line segment. This is the length of the new line segment.

3. The method according to claim 1, characterized in that, The parsed contour metafile is encoded into a text dataset according to the drawing script program, including: A text dataset is generated from the contour line metafile parsed using a text file format, consisting of the coordinates of discrete sampling points of the contour line within the tunnel and the coordinates of all discrete sampling points.

4. The method according to any one of claims 1 to 3, characterized in that, The question module is used to generate drawing instructions for the tunnel's inner contour lines; The parameter module is used to transmit the engineering design parameters of the drawn tunnel inner contour line; The thinking module is used to determine the key geometric parameters of the tunnel's inner contour line by describing the calculation process using the engineering design parameters in natural language. The answer module is used to express in text form the coordinates of discrete sampling points, the retrieval number of the discrete sampling points, and the sequence number arrangement of the inner contour line formed by the concatenation of the discrete sampling points.

5. The method according to claim 4, characterized in that, The model parameters of the natural language model are optimized according to preset combination parameters to obtain a fine-tuned natural language model, including: The model parameters of the natural language model are optimized step by step by selecting text structured grammar according to the preset combination parameters, and the optimized model parameters are used to train the loss function to obtain the fine-tuned natural language model.

6. The method according to claim 5, characterized in that, The fine-tuned natural language model is used to generate the inner contour line of the highway tunnel, including: After reasoning about the newly acquired text dataset using the finely tuned natural language model, the UI module is driven to generate the inner contour lines of the highway tunnel.

Citation Information

Patent Citations

  • Parameterized railway tunnel model establishment method

    CN113343329A

  • Railway tunnel parametric modeling method and device

    CN115525990A