A Multi-Preference Processing Trajectory Intelligent Planning Method Based on Semantic Recognition Using Large Language Models

By constructing a dataset of CNC machine tool machining drawings and training an enhanced large language model, intelligent mapping from unstructured drawings to geometric contours and adaptive process decision-making were achieved. This solved the problem of insufficient flexibility of CAM systems under multi-preference conditions and improved the level of automated machining of CNC machine tools.

CN122085863BActive Publication Date: 2026-07-31ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2026-04-21
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing CAM systems struggle to intelligently parse unstructured engineering drawings, resulting in high levels of human intervention and insufficient flexibility in process planning, making it difficult to meet adaptive process decision-making under multiple preference conditions.

Method used

A dataset of CNC machine tool machining drawings is constructed, an enhanced large language model is trained, and the mapping from workpiece drawings to intermediate representations of geometric contours is realized. Combined with the directed constraint graph of machining features and the machining process decision model, a computable machining execution sequence and G-code are generated.

Benefits of technology

It enables intelligent recognition and parsing of engineering drawings, reduces the uncertainty of manual analysis, improves the adaptability and consistency of process planning, and enhances the automation level and production efficiency of CNC machine tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122085863B_ABST
    Figure CN122085863B_ABST
Patent Text Reader

Abstract

This application discloses a multi-preference intelligent machining trajectory planning method based on semantic recognition using a large language model, relating to the field of machining trajectory planning technology. The method first constructs a CNC machine tool machining drawing dataset containing samples of machined workpiece drawings and corresponding intermediate representations of geometric contours. Based on this dataset, a large language model is trained to learn the mapping relationship between machining drawings and intermediate representations of geometric contours. The drawing of the workpiece to be machined is input into the trained model, generating corresponding intermediate representations of geometric contours end-to-end. A directed constraint graph of machining features is constructed based on the validated intermediate representations, encoding multiple machining preferences as computable parameters. The machining process decision model determines the machining implementation sequence, ultimately generating machining G-code adapted to the CNC system. This application enables intelligent parsing of unstructured semantics in engineering drawings, achieving adaptive process decision-making while considering multiple machining preferences, effectively improving the consistency of process planning and the level of machine tool automation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of processing trajectory planning technology, and in particular to a multi-preference intelligent processing trajectory planning method based on semantic recognition of a large language model. Background Technology

[0002] In CNC machine tool machining, machining process planning and tool path generation are key steps in achieving automated machining. Determining the machining process usually requires comprehensive consideration of geometric features, machining dependencies, and different machining strategies and preferences, and the results directly affect machining efficiency, machining stability, and final machining quality.

[0003] However, in actual production environments, the structural information of workpieces often exists in unstructured forms such as physical drawings or images, making it difficult for existing CAM (Computer-Aided Manufacturing) software systems to directly parse it into calculable machining feature data. This significantly increases the degree of human intervention in process planning and the uncertainty of the results. Furthermore, existing CAM systems mostly generate machining sequences and toolpaths based on preset rules or fixed processes. While they can achieve a certain degree of automated programming, their rule systems are complex and lack flexibility, making it difficult to simultaneously consider different machining strategies, stage division requirements, and machining stability preferences. When machining conditions or process objectives change, it is often necessary to readjust rule parameters or perform manual intervention, making it difficult to achieve adaptive process decisions oriented towards multiple preferences. Therefore, how to intelligently extract semantic information from drawings and achieve machining trajectory planning that satisfies multiple machining preferences is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0004] The purpose of this application is to provide a multi-preference intelligent planning method for processing trajectories based on semantic recognition of a large language model. This method can realize the intelligent recognition and parsing of unstructured semantic information in engineering drawings, while taking into account multiple processing preferences to achieve adaptive processing technology decision-making and trajectory planning.

[0005] To achieve the above objectives, this application provides the following solution: A multi-preference processing trajectory intelligent planning method based on semantic recognition of large language models includes the following steps: Construct a CNC machine tool machining drawing dataset; the CNC machine tool machining drawing dataset includes several machining workpiece drawing samples, as well as intermediate representations of the workpiece geometric contours that correspond one-to-one with each machining workpiece drawing sample.

[0006] Based on the CNC machine tool machining drawing dataset, an enhanced large language model is trained to obtain the trained enhanced large language model. The enhanced large language model is used to learn to extract semantic information from the machining workpiece drawings and establish a mapping relationship between the machining workpiece drawings and the intermediate representation of the workpiece geometric contour.

[0007] The machining workpiece drawing is input into the trained augmented language model to generate the corresponding intermediate representation of the workpiece geometric contour, and the structural legality and geometric consistency of the intermediate representation of the geometric contour are verified.

[0008] Based on the verified intermediate representation of the geometric contour, a directed constraint graph of processing features is constructed. Multiple preset processing preferences are encoded as computable parameters. The directed constraint graph of processing features and the computable parameters are input into a pre-trained processing technology decision model to obtain the processing sequence of the workpiece to be processed.

[0009] Based on the machining sequence of the workpiece, the tool path is expanded and interpolation parameters are calculated, and machining G-code compatible with the CNC system of the CNC machine tool is output to complete the machining trajectory planning.

[0010] Optionally, the machining workpiece drawing sample is a turning workpiece drawing sample, which includes the two-dimensional rotational contour of the axisymmetric part and the corresponding dimensioning information; the intermediate representation of the workpiece geometric contour includes geometric feature information and dimensioning association information. The geometric feature information is used to describe the type and order relationship of each contour segment, and the dimensioning association information is used to record the dimensioning information in the drawing and its correspondence with the geometric feature information.

[0011] Optionally, based on the CNC machine tool machining drawing dataset, an enhanced large language model is trained to obtain the trained enhanced large language model, specifically including the following steps: A general pre-trained large language model is selected as the base model. A parameter-efficient fine-tuning method is adopted, and a low-rank trainable parameter matrix is ​​introduced into some attention layers and feedforward layers of the base model to freeze the original parameters of the base model.

[0012] The basic model is fine-tuned by using the content of the machining workpiece drawing sample and preset prompt words as model input, and the intermediate representation of the corresponding workpiece geometric contour as supervisory output, until the preset termination condition is met, resulting in a trained enhanced large language model.

[0013] Optionally, during the training of the enhanced large language model, a joint loss function consisting of a weighted average of cross-entropy loss and geometric feature loss is used; the cross-entropy loss is used to constrain the overall correctness of the intermediate representation sequence generated by the model, and the geometric feature loss is used to constrain the contour segment type recognition error and size prediction error of the model's generated results.

[0014] Optionally, structural legality and geometric consistency verification specifically includes the following: Verify whether the generated contour segment type combination conforms to the basic composition rules of machined parts.

[0015] Verify whether the endpoint diameters and axial dimensions between adjacent contour segments are continuous.

[0016] Verify whether the arc parameters meet the preset geometric relationships.

[0017] Check for structures with negative dimensions or zero length.

[0018] Optionally, a directed constraint graph of processing features is constructed based on the verified intermediate representation of the geometric contour, specifically including the following steps: Structural features with independent processing significance in the intermediate representation of the validated geometric contour are divided into processing feature units.

[0019] Using each processing feature unit as a node, directed connections are established between nodes based on the axial adjacency relationship between structural features and the roughing and finishing dependency relationship, thus constructing a directed constraint graph of processing features.

[0020] Optionally, the training process of the machining process decision model includes: constructing a training dataset based on historical machining samples, the training dataset including directed constraint graph samples of machining features, machining preference parameter samples, and corresponding actual machining sequence labels; using the directed constraint graph samples of machining features and machining preference parameter samples as model inputs, and the corresponding actual machining sequence labels as supervision signals, to train the machining process decision model so that the model learns the determination rules of machining sequence under different structural conditions.

[0021] Optionally, toolpath expansion and interpolation parameter calculation are performed according to the machining sequence of the workpiece to be machined, and machining G-code compatible with the CNC system of the CNC machine tool is output to complete the machining trajectory planning, specifically including the following steps: According to the processing sequence of the workpiece, the tool path is unfolded sequentially for each processing feature unit; for the outer circular segment and the conical segment, a straight feed trajectory is generated along the axial direction; for the arc segment, an arc interpolation trajectory is generated according to the arc radius parameter.

[0022] Based on the dimensional parameters and processing stage attributes of each processing feature unit, the starting coordinates, ending coordinates, and feed parameters of the corresponding trajectory are calculated, and the corresponding interpolation command is generated.

[0023] Organize all machining program segments corresponding to interpolation instructions according to the instruction format of the CNC system, and output complete machining G-code.

[0024] Optionally, the machining preferences include the principles for dividing machining stages, the requirements for machining continuity, and the types of machining tools; each machining preference is encoded into a corresponding vector or numerical parameter to form a computable parameter.

[0025] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a multi-preference intelligent planning method for machining trajectories based on semantic recognition using a large language model. First, a CNC machine tool machining drawing dataset is constructed, containing several machining workpiece drawing samples and their corresponding intermediate representations of geometric contours. This dataset provides standardized paired supervision data for subsequent model training, laying a reliable data foundation for intelligent semantic parsing of the drawings. Then, an enhanced large language model is trained based on this dataset, enabling the model to learn to extract semantic information from the machining workpiece drawings and establish a mapping relationship between drawings and intermediate representations of geometric contours. This achieves intelligent recognition and accurate parsing of unstructured semantic information in engineering drawings, generating unified structured data that can directly participate in machining calculations. This breaks down the barrier between drawing information and automated process planning, reducing the uncertainty of results caused by manual parsing. Finally, the engineering drawings of the workpieces to be processed are input into the trained enhanced large language model to generate corresponding intermediate representations of geometric contours and perform structural legality and geometric consistency checks, effectively ensuring the accuracy of subsequent processing. To ensure the accuracy of the basic data used in process planning and avoid machining deviations caused by erroneous contour data, a directed constraint graph of machining features is constructed based on the verified intermediate representation of the geometric contour. Multiple preset machining preferences are encoded as computable parameters. The directed constraint graph and computable parameters are then input into a pre-trained machining process decision model to obtain the machining sequence of the workpiece. This breaks through the flexibility limitations of the fixed rule system in existing CAM systems, transforming subjective machining preferences into quantifiable parameters. While meeting workpiece structural constraints, it also considers multi-dimensional machining needs, achieving adaptive process decision-making and improving the consistency and scenario adaptability of process planning. Finally, based on the determined machining sequence, toolpath unfolding and interpolation parameter calculation are performed, outputting machining G-code compatible with the CNC machine tool system to complete machining trajectory planning. This achieves fully automated machining trajectory generation that conforms to workpiece geometric constraints and multiple machining preferences, significantly improving the automation level and production efficiency of CNC machine tool machining. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1This is a flowchart illustrating an intelligent planning method for multi-preference processing trajectories based on semantic recognition of a large language model, provided as an embodiment of this application.

[0028] Figure 2 This is a flowchart of step A2 in a multi-preference processing trajectory intelligent planning method based on semantic recognition of a large language model, provided as an embodiment of this application.

[0029] Figure 3 This is a flowchart of step A4 in a multi-preference processing trajectory intelligent planning method based on semantic recognition of a large language model, provided as an embodiment of this application.

[0030] Figure 4 This is a flowchart of step A5 in a multi-preference processing trajectory intelligent planning method based on semantic recognition of a large language model, provided as an embodiment of this application. Detailed Implementation

[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] This application provides an intelligent planning method for multi-preference processing trajectories based on semantic recognition of large language models. In one exemplary embodiment, such as... Figure 1 As shown, it includes the following steps: A1. Construct a CNC machine tool machining drawing dataset; the CNC machine tool machining drawing dataset includes several machining workpiece drawing samples, as well as intermediate representations of the workpiece geometric contours that correspond one-to-one with each machining workpiece drawing sample.

[0034] In this embodiment, turning is used as the application scenario. A sample drawing of a turning workpiece is constructed. The workpiece contour is formed by a combination of cylindrical, conical, and circular arc structures. By randomly combining and parameterizing the above basic geometric units, two-dimensional rotational contours of axisymmetric parts with different structural forms are generated. Based on the generated geometric structure, the corresponding engineering drawing representation is automatically generated, including dimensional information such as diameter annotation, length annotation, and arc radius annotation. The dimension annotation can correspond to a single geometric structure or be combined across multiple adjacent geometric structures to simulate the representation method in actual engineering drawings.

[0035] While generating drawing samples, a geometric contour intermediate representation corresponding to each drawing is constructed. This geometric contour intermediate representation consists of geometric feature information and dimension annotation association information. The geometric feature information describes the type and order of each contour segment, while the dimension annotation association information records the dimension annotations in the drawing and their correspondence with the geometric features. In this embodiment, the geometric contour intermediate representation uses a JSON file format to describe the content of the machining drawing in text form, including the geometric types of each component of the workpiece and their positional relationships, as well as the specific dimensions described by the dimension annotations. By pairing drawing samples with their corresponding geometric contour intermediate representations, a CNC machine tool machining drawing dataset is formed for subsequent model training.

[0036] A2. Based on the CNC machine tool machining drawing dataset, an enhanced large language model is trained to obtain the trained enhanced large language model. This enhanced large language model is used to learn how to extract semantic information from the machining workpiece drawings and establish a mapping relationship between the machining workpiece drawings and the intermediate representation of the workpiece's geometric contour. For example... Figure 2 As shown, step A2 specifically includes the following steps: A21. Select a general pre-trained large language model as the base model. Employ an efficient parameter fine-tuning method by introducing low-rank trainable parameter matrices into some attention layers and feedforward layers of the base model, while freezing the original parameters of the base model. While maintaining the original model parameters of the pre-trained large language model, introduce low-rank trainable parameter matrices into some attention layers and feedforward layers to efficiently fine-tune the model's parameters. Use the turning machining drawing dataset constructed in step A1 as training data. The content of the turning part engineering drawings and preset prompts are used as model input, and the corresponding intermediate representation of the geometric contour is used as supervised output, enabling the model to learn the mapping relationship between the expression of the turning part drawings and its contour structure.

[0037] A22. Using the content of the machining workpiece drawing sample and preset prompt words as model input, and the corresponding intermediate representation of the workpiece geometric contour as supervisory output, fine-tune the basic model until the preset termination condition is met, and obtain the trained enhanced large language model.

[0038] In training the enhanced large language model, a joint loss function consisting of weighted cross-entropy loss and geometric feature loss is employed. Cross-entropy loss constrains the overall correctness of the intermediate representation sequence generated by the model; geometric feature loss constrains the prediction errors of the generated results in contour segment type recognition and dimensional values ​​such as diameter, length, and arc parameters, thereby strengthening the model's ability to learn the structural composition relationships and dimensional consistency of turned parts. Through this training, a structurally constrained enhanced large language model is obtained. This model can identify geometric structural units and their dimensional relationships from turning drawings and output the corresponding intermediate geometric contour representations.

[0039] A3. Input the machining workpiece drawing to be processed into the trained enhanced large language model to generate the corresponding intermediate representation of the workpiece geometric contour, and perform structural validity and geometric consistency verification on the intermediate representation of the geometric contour. The structural validity and geometric consistency verification specifically includes the following: verifying whether the generated contour segment type combination conforms to the basic composition rules of machined parts; verifying whether the endpoint diameters and axial dimensions between adjacent contour segments are continuous; verifying whether the arc parameters meet the preset geometric relationships; and verifying whether there are negative dimensions or zero-length structures. If the verification fails, an error message is output, and the drawing is re-entered for processing; if the verification passes, proceed to the next step.

[0040] A4. Based on the validated intermediate representation of the geometric contour, a directed constraint graph of processing features is constructed. Multiple pre-defined processing preferences are encoded as computable parameters. The directed constraint graph of processing features and the computable parameters are input into a pre-trained processing technology decision model to obtain the processing sequence of the workpiece. For example... Figure 3 As shown, step A4 specifically includes the following steps: A41. Divide the structural features with independent processing significance in the intermediate representation of the verified geometric contour into processing feature units.

[0041] A42. Using each processing feature unit as a node, establish directed connections between nodes based on the axial adjacency relationship between structural features and the roughing and finishing dependency relationship, and construct a directed constraint graph of processing features.

[0042] A43. Encode each machining preference into a corresponding vector or numerical parameter to form a computable parameter; machining preferences include machining stage division principles, machining continuity requirements, and machining tool types.

[0043] A44. Input the directed constraint graph of processing features and computable parameters into the pre-trained processing technology decision model to obtain the processing sequence of the workpiece to be processed.

[0044] Specifically, the structural features with independent machining significance in the verified intermediate representation of the geometric contour are first divided into machining feature units, such as the outer circle segment, chamfer, and arc transition segment in turning, and each machining feature unit is used as a node. Directed connections are established based on the axial adjacency relationship and roughing and finishing dependency relationship between features to construct a directed constraint graph of machining features.

[0045] Subsequently, the processing stage division principles, processing continuity requirements, and tool types, among other processing preferences, are transformed into computable parameters to represent the roughing and finishing stage attributes, tool compatibility, and processing sequence constraints of each processing feature. In this embodiment, subjective processing preferences are encoded as parameters that can be input into the neural network model. For example, processing stages can be divided into roughing, semi-finishing, and finishing, encoded as one-hot vectors, with one dimension set to 1 and the rest to 0, representing the selected processing stage; tool types include 90-degree left-hand tools, 75-degree right-hand tools, etc., encoded as corresponding one-hot vectors, representing the selected tool type; processing continuity is encoded as a value between 0 and 1, representing the preference weight for continuous processing between features, ultimately forming multi-dimensional computable parameters.

[0046] The training process of the machining process decision model includes: constructing a training dataset based on historical machining samples, which includes directed constraint graph samples of machining features, machining preference parameter samples, and corresponding actual machining sequence labels; using the directed constraint graph samples of machining features and machining preference parameter samples as model inputs, and the corresponding actual machining sequence labels as supervision signals, to train the machining process decision model so that the model learns the determination rules of machining sequence under different structural conditions.

[0047] A5. Based on the machining sequence of the workpiece, perform toolpath expansion and interpolation parameter calculation, and output machining G-code compatible with the CNC system of the CNC machine tool to complete the machining trajectory planning. For example... Figure 4 As shown, step A5 specifically includes the following steps: A51. According to the processing sequence of the workpiece to be processed, the tool path is unfolded for each processing feature unit in sequence; among them, for the outer circular segment and the conical segment, a straight feed trajectory is generated along the axial direction; for the arc segment, an arc interpolation trajectory is generated according to the arc radius parameter.

[0048] A52. Based on the dimensional parameters and processing stage attributes of each processing feature unit, calculate the starting coordinates, ending coordinates, and feed parameters of the corresponding trajectory, and generate the corresponding interpolation command.

[0049] A53. Organize the machining program segments corresponding to all interpolation instructions according to the instruction format of the CNC system, output the complete machining G code, and complete the machining trajectory planning.

[0050] Specifically, after completing the path expansion and interpolation parameter calculation for all machining features, the machining program segments are organized according to the instruction format of the CNC lathe control system, and the complete turning machining G-code is output. This ensures that the generated machining trajectory meets the geometric requirements while conforming to the predetermined machining preference constraints, ultimately completing the intelligent planning of multi-preference machining trajectories.

[0051] The multi-preference machining trajectory intelligent planning method based on semantic recognition of a large language model provided in the above embodiments of this application realizes intelligent recognition and parsing of unstructured semantic information in engineering drawings by constructing a large language model with enhanced structural constraints. It generates a unified intermediate representation of geometric contours, enabling the semantic information of the drawings to directly participate in subsequent process decisions and trajectory generation calculations in a structured form, thereby improving the accuracy and stability of information conversion. At the same time, this application transforms machining preferences into computable parameters and constructs corresponding machining process decision models, so that the determination of the machining sequence no longer depends on a fixed rule system. It can take into account the needs of different machining strategies while satisfying structural constraints, improving the adaptability and consistency of process planning. Finally, it realizes intelligent planning of machining trajectories that conform to geometric contour constraints and multiple machining preferences, significantly improving the automation level of machine tool processing.

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

[0053] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A multi-preference machining track intelligent planning method based on large language model semantic recognition, characterized in that, include: Construct a dataset of CNC machine tool machining drawings; The CNC machine tool machining drawing dataset includes several machining workpiece drawing samples, and intermediate representations of workpiece geometric contours corresponding one-to-one with each of the machining workpiece drawing samples; the machining workpiece drawing samples are turning workpiece drawing samples, and the turning workpiece drawing samples contain two-dimensional rotational contours of axisymmetric parts, as well as corresponding dimension annotation information; the intermediate representations of workpiece geometric contours include geometric feature information and dimension annotation association information, the geometric feature information is used to describe the type and order relationship of each contour segment, and the dimension annotation association information is used to record the dimension annotation information in the drawing and its correspondence with the geometric feature information; Based on the CNC machine tool machining drawing dataset, an enhanced large language model is trained to obtain the trained enhanced large language model; the enhanced large language model is used to learn to extract semantic information from the machining workpiece drawings and establish a mapping relationship between the machining workpiece drawings and the intermediate representation of the workpiece geometric contour; The machining workpiece drawing of the workpiece to be processed is input into the trained enhanced large language model to generate the corresponding intermediate representation of the workpiece geometric contour, and the structural legality and geometric consistency of the intermediate representation of the geometric contour are verified. Based on the verified intermediate representation of the geometric contour, a directed constraint graph of processing features is constructed. Multiple preset processing preferences are encoded as computable parameters. The directed constraint graph of processing features and the computable parameters are input into a pre-trained processing technology decision model to obtain the processing implementation sequence of the workpiece to be processed. Based on the processing sequence of the workpiece to be processed, the tool path is expanded and the interpolation parameters are calculated, and the machining G-code compatible with the CNC system of the CNC machine tool is output to complete the machining trajectory planning; Based on the verified intermediate representation of the geometric contour, a directed constraint graph of processing features is constructed, specifically including: The structural features with independent processing significance in the intermediate representation of the geometric contour that has passed the verification are divided into processing feature units; Using each of the aforementioned processing feature units as nodes, directed connections are established between nodes based on the axial adjacency relationship between structural features and the roughing and finishing dependency relationship, thus constructing a directed constraint graph of processing features.

2. The multi-preference machining trajectory intelligent planning method based on large language model semantic recognition according to claim 1, characterized in that, Based on the CNC machine tool machining drawing dataset, an enhanced large language model is trained to obtain the trained enhanced large language model, specifically including: A general pre-trained large language model is selected as the base model. A parameter-efficient fine-tuning method is adopted to introduce a low-rank trainable parameter matrix into some attention layers and feedforward layers of the base model and freeze the original parameters of the base model. The basic model is fine-tuned and trained using the content of the machining workpiece drawing sample and preset prompt words as model input, and the corresponding intermediate representation of the workpiece geometric contour as supervisory output, until the preset termination condition is met, thus obtaining the trained enhanced large language model.

3. The multi-preference machining trajectory intelligent planning method based on large language model semantic recognition according to claim 2, characterized in that, During the training of the enhanced large language model, a joint loss function consisting of a weighted average of cross-entropy loss and geometric feature loss is used. The cross-entropy loss is used to constrain the overall correctness of the intermediate representation sequence generated by the model, and the geometric feature loss is used to constrain the contour segment type recognition error and size prediction error of the model's generated results.

4. The multi-preference machining trajectory intelligent planning method based on large language model semantic recognition according to claim 1, characterized in that, Structural validity and geometric consistency verification specifically include: Verify whether the generated contour segment type combination conforms to the basic composition rules of machined parts; Verify the continuity of the endpoint diameters and axial dimensions between adjacent contour segments; Verify whether the arc parameters meet the preset geometric relationships; Check for structures with negative dimensions or zero length.

5. The multi-preference machining trajectory intelligent planning method based on large language model semantic recognition according to claim 1, characterized in that, The training process of the machining process decision model includes: constructing a training dataset based on historical machining samples, the training dataset including directed constraint graph samples of machining features, machining preference parameter samples, and corresponding actual machining sequence labels; using the directed constraint graph samples of machining features and machining preference parameter samples as model inputs, and the corresponding actual machining sequence labels as supervision signals, to train the machining process decision model so that the model learns the determination rules of machining sequence under different structural conditions.

6. The multi-preference machining trajectory intelligent planning method based on large language model semantic recognition according to claim 5, characterized in that, Based on the machining sequence of the workpiece to be machined, toolpath expansion and interpolation parameter calculation are performed, and machining G-code compatible with the CNC system of the CNC machine tool is output to complete machining trajectory planning, specifically including: According to the processing sequence of the workpiece to be processed, the tool path is unfolded sequentially for each processing feature unit; among them, for the outer circular segment and the conical segment, a straight feed trajectory is generated along the axial direction; for the arc segment, an arc interpolation trajectory is generated according to the arc radius parameter. Based on the dimensional parameters and processing stage attributes of each processing feature unit, the starting coordinates, ending coordinates, and feed parameters of the corresponding trajectory are calculated, and the corresponding interpolation command is generated. Organize all machining program segments corresponding to interpolation instructions according to the instruction format of the CNC system, and output complete machining G-code.

7. The intelligent planning method for multi-preference processing trajectories based on semantic recognition of a large language model according to claim 1, characterized in that, The processing preferences include processing stage division principles, processing continuity requirements, and processing tool types; each processing preference is encoded into a corresponding vector or numerical parameter to form a computable parameter.