A method and system for recovering interrupted machine tool processing files

By constructing knowledge graphs and neural symbol reasoning to understand the processing intention behind G code, combined with self-evolution learning optimization recovery strategy, the problem of insufficient semantic understanding in traditional machine tool interrupt recovery methods is solved, and high-precision and automated interrupt recovery are achieved, which improves production efficiency and success rate.

CN120276918BActive Publication Date: 2025-08-22昆山台功精密机械有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510761744.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-08-22
Estimated Expiration
2045-06-09

AI Technical Summary

Technical Problem

Traditional machine tool interrupt recovery methods lack a deep understanding of the semantics and processing intentions of G codes, resulting in low recovery accuracy and success rate, making it difficult to accurately identify interrupt recovery points in complex machining scenarios, affecting processing quality and efficiency.

Method used

The knowledge graph is constructed through G code semantic analysis and graph structure transformation, combined with neural symbol reasoning to understand processing intentions, and optimize recovery strategies using self-evolution learning to accurately find the optimal recovery location and generate interrupt recovery strategies.

Benefits of technology

It improves the recovery success rate and accuracy of complex parts processing, reduces the risk of workpiece scrapping, improves the degree of automation and production efficiency, has the ability to evolve and saves resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276918B_ABST
    Figure CN120276918B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of machine tool processing technology, and discloses a method and system for recovering machine tool processing files from interruption, wherein a method for recovering machine tool processing files from interruption comprises: performing G-code semantic analysis and graph structure conversion to convert a G-code processing program into a structured knowledge graph with semantic association; performing processing intent reasoning based on neural symbolic reasoning to understand the deep processing intent behind the program; realizing self-evolutionary learning of processing experience, and continuously learning and optimizing from historical experience; locating interruption recovery points based on intent graphs to accurately find the optimal recovery position; generating and executing interruption recovery strategies to achieve smooth recovery of the processing process; the present invention improves the success rate and accuracy of interruption recovery by deeply understanding the G-code semantics and processing intent, and is suitable for high-value parts processing scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine tool processing, and more particularly to a method and system for recovering interrupted machine tool processing files. Background Art

[0002] In modern intelligent manufacturing environments, particularly in the aerospace industry, complex structural parts machining processes can require hundreds of thousands of lines of G-code, encompassing multiple process stages and features. The machining of these high-value parts can last for hours or even days. If a power failure, system crash, or other unforeseen circumstances interrupts the process, the inability to accurately restore the machining state can lead to serious consequences, including scrapped workpieces, wasted materials, and decreased production efficiency.

[0003] Traditional machine tool interrupt recovery methods mainly rely on simple program counters or line number positioning for interrupt recovery, and lack a deep understanding of the semantics of the machining program and the machining intent, resulting in the following technical problems in complex machining scenarios: it is impossible to accurately understand the high-level semantics and implicit machining intent in the G-code program, especially the non-standard programming patterns written by expert programmers, which are difficult to correctly interpret; it is difficult to construct and express the internal dependencies of complex machining programs, which affects the accurate identification of interrupt recovery points; there is a lack of adaptive learning ability and it is impossible to draw knowledge from historical machining experience to optimize future interrupt recovery strategies; there is insufficient perception of the machining context, which leads to deviations from the expected machining trajectory after recovery, affecting the machining quality. Summary of the Invention

[0004] The present invention provides a method and system for recovering interrupted machine tool processing files, which solves the technical problem in related technologies of low recovery accuracy and success rate caused by lack of deep understanding of G code semantics and processing intent.

[0005] The present invention provides a method for recovering interrupted machine tool processing files, comprising the following steps:

[0006] Perform G-code semantic analysis and graph structure conversion to convert the G-code processing program into a structured knowledge graph with semantic associations;

[0007] Perform neural symbolic reasoning based on knowledge graphs, perform processing intention reasoning based on neural symbolic reasoning, understand the deep processing intention behind the program, and build an intention graph;

[0008] Combine historical data to achieve self-evolutionary learning of processing experience, and continuously learn and optimize recovery strategies from historical experience;

[0009] Locate the interruption recovery point based on the intent map and learned experience to accurately find the optimal recovery location;

[0010] Generate and execute the interruption recovery strategy based on the located recovery point to achieve smooth recovery of the processing process.

[0011] In a preferred embodiment, the G-code semantic parsing and graph structure conversion comprises the following steps:

[0012] G code preprocessing and lexical analysis, dividing the original G code file into basic morpheme units;

[0013] Syntactic structure analysis and semantic extraction, building a syntax tree and mapping it to a predefined semantic model;

[0014] Knowledge graph construction and structured representation, establishing a graph structure that represents the semantic units of the processing program and their relationships.

[0015] In a preferred embodiment, the processing intention reasoning based on neural symbolic reasoning includes the following steps:

[0016] Construct a neural-symbolic joint representation model that integrates neural networks and symbolic reasoning;

[0017] Establish a bidirectional mapping relationship between program processing and understand the correspondence between code segments and processing behaviors;

[0018] Mining processing intentions based on causal reasoning and identifying causal structures in programs;

[0019] Build an adaptive recovery strategy generation system to generate the optimal recovery plan based on the intention.

[0020] In a preferred embodiment, the neural-symbolic joint representation model includes a neural representation learning module and a symbolic reasoning module, which interact through an attention mechanism to form a joint representation. The joint representation vector is composed of a weighted combination of the neural representation and the symbolic reasoning results according to an adaptive weight coefficient, and the adaptive weight coefficient is dynamically adjusted according to the confidence of the neural representation and the symbolic reasoning results.

[0021] In a preferred embodiment, the self-evolution learning of processing experience in combination with historical data includes the following steps:

[0022] Construct an experience representation framework based on multi-source data to structure processing experience;

[0023] Realize adaptive experience extraction and fusion to improve the quality of experience learning;

[0024] Establish a self-evolution mechanism for experiential knowledge to achieve continuous optimization and updating of knowledge.

[0025] In a preferred embodiment, the interruption recovery point location based on the intention map and learned experience includes the following steps:

[0026] Interruption status detection and feature extraction to obtain key information at the moment of interruption;

[0027] Accurately locate the interruption point in the knowledge graph and identify the semantic context in which the interruption occurred;

[0028] Apply the optimal recovery point identification algorithm to determine the most suitable location for recovery;

[0029] Consider the processing characteristics and process continuity constraints to ensure the rationality of the recovery point.

[0030] In a preferred embodiment, the optimal recovery point identification adopts the shortest path algorithm on the graph, and selects the point with the smallest weighted path distance to the actual interruption point from the candidate recovery point set as the optimal recovery point. The weighted path distance comprehensively considers feature integrity, process continuity and safety factors.

[0031] In a preferred embodiment, generating and executing an interruption recovery strategy based on the located recovery point includes the following steps:

[0032] Perform recovery path planning and process parameter optimization to design a safe approach path;

[0033] Perform program reorganization and code generation to generate a modified program containing a recovery sequence;

[0034] Execution monitoring and real-time adjustments are performed to adjust the recovery process based on feedback.

[0035] In a preferred embodiment, the process parameters are transitioned using a smooth function so that the parameter value smoothly transitions from the starting value to the target value, wherein an S-shaped smooth function is used to ensure the continuity and stability of the parameter change.

[0036] In a preferred embodiment, a system for recovering machine tool processing files from interruption is used to execute a method for recovering machine tool processing files from interruption, including:

[0037] G-code semantic parsing and graph structure conversion module, used to convert G-code machining programs into structured knowledge graphs with semantic associations;

[0038] Neural symbolic reasoning module, used to understand the deep processing intentions behind the program and build an intention map;

[0039] Processing experience self-evolution learning module, used to continuously learn and optimize recovery strategies from historical experience;

[0040] The interruption recovery point positioning module is used to accurately find the optimal recovery location based on the intent map and learned experience;

[0041] The recovery strategy generation and execution module is used to generate and execute the interruption recovery strategy according to the located recovery point to achieve a smooth recovery of the processing process.

[0042] The beneficial effects of the present invention are:

[0043] Improve recovery success rate: The recovery success rate is improved in complex parts processing, reducing the risk of workpiece scrapping.

[0044] Achieve high-precision recovery: Based on deep semantic understanding and processing intent reasoning, the system can accurately identify the optimal recovery point to meet the processing requirements of high-precision parts in the aerospace field.

[0045] Improved automation: The system can complete the recovery process without human intervention, reducing the need for manual operations and the reliance on operator expertise.

[0046] Improve time efficiency: By accurately locating recovery points and optimizing recovery paths, interruption recovery time is shortened, improving production efficiency.

[0047] Possessing self-evolution capability: The system can continuously learn and optimize from practice, and its adaptability is constantly improving.

[0048] Resource conservation: By accurately understanding the semantics and intent of the machining program, unnecessary repetitive machining can be avoided, saving raw materials and machining time, and reducing production costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 The present invention is a flowchart of a method for recovering interrupted machine tool processing files. DETAILED DESCRIPTION

[0050] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that these embodiments are discussed solely to enable those skilled in the art to better understand and implement the subject matter described herein, and that the functions and arrangements of the elements discussed may be varied without departing from the scope of this specification. Various examples may omit, substitute, or add various processes or components as needed. Furthermore, features described in some examples may be combined in other examples.

[0051] At least one embodiment of the present invention discloses a method for recovering interrupted machine tool processing files, such as Figure 1 As shown, the following steps are included:

[0052] Step 1: Perform G-code semantic analysis and graph structure conversion to convert the G-code processing program into a structured knowledge graph with semantic associations;

[0053] It includes the following sub-steps:

[0054] Step 1.1, G code preprocessing and lexical analysis;

[0055] The system uses an improved lexical analysis algorithm to process G code text and divide the original G code file into basic morpheme units, including instruction codes, coordinate parameters, feed speed, spindle speed, etc.

[0056] The lexical analysis process takes into account the special format and comment information of G code and adopts state transition automaton for effective recognition.

[0057] During the lexical analysis process, the system will type-tag each instruction to form a formatted lexical unit sequence. ,in, 、 、 Respectively represent 、 、 A lexical unit, which contains type label, content value and position information; Represents the lexical unit sequence obtained after parsing the entire G code file; Indicates the total number of tokens.

[0058] Step 1.2: grammatical structure analysis and semantic extraction;

[0059] Based on the lexical unit sequence, this application adopts a bottom-up grammatical analysis method to construct a syntax tree of the G code and identify the basic structural units of the machining program, such as linear interpolation segments, circular interpolation segments, drilling cycles, etc.

[0060] In addition, based on the syntax tree, a semantic extraction process is performed to map the syntax tree to a predefined semantic model and parse out the semantic information of each instruction segment, including:

[0061] Operation type: such as cutting operation, rapid positioning, tool changing operation, etc.;

[0062] Processing features: such as plane milling, contour processing, cavity processing, etc.;

[0063] Process parameters: such as cutting depth, feed rate, cutting speed, etc.;

[0064] Spatial relations: spatial continuity and interdependence between instruction segments.

[0065] Semantic extraction uses a multi-level semantic parsing model, which is defined as:

[0066] ;

[0067] in, is the extracted semantic information, which represents the semantic content of the G code at time point t; The result of syntax analysis includes the grammatical structure and organization of G code instructions; Context information, which represents the related instructions and environmental information around the current instruction; Historical instruction information, including previously executed instruction sequences and their effects; is the semantic mapping function, which is responsible for converting syntactic, contextual, and historical information into meaningful semantic representations. This formula describes how the system extracts a complete semantic understanding of G-code from multi-dimensional information.

[0068] Step 1.3: knowledge graph construction and structured representation;

[0069] According to the embodiment of the present application, based on the extracted semantic information, the system constructs a knowledge graph of the processing program .in, Represents a set of nodes in a graph, where each node represents a semantic unit (such as an instruction segment, a processing feature, or an operation); Represents the set of edges between nodes, indicating the relationship between semantic units, such as temporal relationship, spatial relationship or dependency relationship; Represents the attribute matrix, which contains the attribute information of nodes and edges.

[0070] The construction of the knowledge graph adopts an incremental approach and is completed through the following steps:

[0071] Initialize an empty graph structure;

[0072] Process each semantic unit in turn and create the corresponding node;

[0073] Analyze the relationship between semantic units and establish corresponding edges;

[0074] Assign attribute values ​​to nodes and edges.

[0075] For non-standard programming patterns, the system of this application uses a special pattern recognition algorithm to parse them. This algorithm uses a combination of statistical pattern matching and rule-based reasoning to identify common non-standard programming practices and special techniques, such as parameterized programming, macro calls, or custom subroutines, and correctly maps them to the semantic model.

[0076] Therefore, through the above processing, the complex G-code machining program is converted into a structured knowledge graph, laying the foundation for subsequent machining intention reasoning and interruption recovery strategy generation.

[0077] Step 2: Perform neural symbolic reasoning based on the knowledge graph, perform processing intention reasoning based on neural symbolic reasoning, understand the deep processing intention behind the program, and build an intention graph;

[0078] It includes the following sub-steps:

[0079] Step 2.1, neural symbolic joint representation model construction;

[0080] This application builds a joint representation model that integrates neural networks and symbolic reasoning to learn the mapping relationship between G-code segments and processing behaviors. The model consists of two key parts:

[0081] Neural representation learning module: uses the Graph Neural Network (GNN) structure to learn the distributed representation of nodes and edges in the knowledge graph. , which represents the vector Update via:

[0082] ;

[0083] in, Representation node In the The representation vector of the layer, Representation node The set of neighbor nodes of is an aggregation function used to summarize neighbor node information. Representation node In the The feature representation vector of the layer, is the weight matrix of neighbor information, is the weight matrix of its own information, both of which are learnable parameter matrices. is a nonlinear activation function, used to introduce nonlinear transformation. Representation node In the The updated representation vector of the layer. This formula describes how nodes in a graph neural network update their representations by aggregating neighbor information and their own information, thus enabling information transfer in the graph structure.

[0084] In a specific implementation, according to an embodiment of the present application, the graph neural network adopts a multi-layer structure, including three graph convolutional layers. Each layer includes three stages: input mapping, message passing, and information aggregation. The input dimension of the graph convolutional layer is 64, the output dimension is 128, and the dimension of the intermediate hidden layer is 96.

[0085] The aggregation function uses the attention weighted average method, and the calculation formula is:

[0086] ;

[0087] in, is the attention weight, representing the node To its neighboring nodes The degree of attention is calculated through node features; Representation node In the The feature representation vector of the layer; Representation node The set of all neighbor nodes of It is an aggregation function used to summarize neighbor node information; Represents the weighted sum operation of all neighbor nodes; the role of this aggregation function is to aggregate the information of neighbor nodes to the central node according to the weighted importance.

[0088] ;

[0089] in, Representation node For neighbor nodes The attention weight of and Respectively represent Nodes in the layer and nodes The eigenvector of Indicates the concatenation operation of these two feature vectors; It is a learnable weight matrix used to transform the concatenated features; It is a rectified linear unit activation function with a small slope, which is used to introduce nonlinear transformations; represents the natural exponential function; Representation node The denominator is the set of all neighbor nodes Perform a summation operation to normalize the attention weights and ensure that the sum of all weights is 1.

[0090] In aerospace parts processing scenarios, such as complex structure turbine blade processing, the neural representation learning module can identify high-level features such as "spiral milling" and "cavity processing" from G-code and represent them as dense vectors for subsequent processing.

[0091] Symbolic reasoning module: Based on predefined processing knowledge rules, it performs symbolic reasoning on the representations generated by the neural network. This module uses a weighted rule set , each rule Contains premises and reasoning conclusions, as well as associated weights .in, represents the entire set of symbolic rules; 、 、 Respectively represent 、 、 rules, Indicates the total number of rules.

[0092] According to one embodiment of the present application, the symbolic reasoning module includes two types of rules:

[0093] Deterministic rules: For example, "If the instruction is G00, the operation type is rapid positioning";

[0094] Probabilistic rules: For example, "If the tool moves inside the cavity and the speed is slow, the operation intention is probably finishing, with a confidence level of 0.8";

[0095] Symbolic rules are expressed in the form of Horn clauses, for example:

[0096] ;

[0097] in, The identifier of the current instruction or operation, Indicates an operation The type is "Quick Positioning", Indicates instructions The type is "G00", which means that when a G00 instruction is detected, the system will interpret it as a rapid positioning operation.

[0098] ;

[0099] in, The identifier of the current instruction or operation, Indicates an operation The intention is "finishing", Indicates an operation The position is "inside the cavity", Indicates an operation The feed rate is "low speed", Represents a logical AND operation. This rule states that when the tool is inside the pocket and the feed rate is low, the system infers that the machining intent is finishing.

[0100] In practical applications, such as the machining of aircraft engine blades, the symbolic reasoning module can infer, based on the tool motion trajectory and machining parameters, that the programmer's intention is to "avoid overcutting at the blade root," thereby maintaining the appropriate entry angle and feed rate when resuming the interruption.

[0101] The neural representation and symbolic rules interact through the attention mechanism to form a joint representation:

[0102] ;

[0103] in, is the joint representation vector, which represents the final fused knowledge representation; is the neural representation, that is, the distributed representation vector learned through the graph neural network; It is the result of symbolic reasoning, that is, the structured knowledge representation obtained by symbolic rule reasoning; is an adaptive weight coefficient used to dynamically adjust the importance ratio of neural representation and symbolic reasoning results in the final joint representation. Its value range is [0, 1]. When it is close to 1, it is more inclined to the representation ability of the neural network. When it is close to 0, it is more inclined to interpretability of symbolic reasoning.

[0104] In the embodiment of the present application, the adaptive weight coefficient The confidence level of the neural representation and symbolic reasoning results is dynamically adjusted and calculated as follows:

[0105] ;

[0106] in, is the adaptive weight coefficient, ranging from 0 to 1; It is a S-type activation function, which is used to map the output to the range of 0-1; is the weight matrix, which controls the influence of confidence on the fusion weight; represents the vector concatenated with the neural representation confidence and the symbolic reasoning confidence, It is a vector concatenation operation; Representation vector generated by the neural network Confidence score of Representing symbolic reasoning results Confidence score of is a bias term used to adjust the baseline value of the fusion weight. When the value is close to 1, it means that the result of the neural network is more likely to be adopted; when When the value is close to 0, the result of symbolic reasoning is more likely to be adopted.

[0107] Step 2.2, program processing bidirectional mapping relationship is established;

[0108] According to the embodiment of the present application, based on the joint representation model, the system constructs a bidirectional mapping relationship between the G code segment and the actual processing behavior The mapping relationship is established through the following steps:

[0109] Split the processing program into semantically coherent code segments ,in, Represents the set of all code sections, 、 、 Respectively represent 、 、 A code paragraph, Indicates the total number of code sections. These code sections are divided according to semantic relevance to ensure that the G code instructions within each section are consistent in function and purpose;

[0110] Define the processing behavior ontology, including the basic processing operation set ,in, represents the set of all basic machining operations, 、 、 Respectively represent 、 、 processing operations, Indicates the total number of processing operations; each processing operation It is further defined as a parameterized behavior description, which includes the operation type, process parameters (feed rate, spindle speed, cutting depth, etc.), spatial position information and process constraints;

[0111] According to one embodiment of the present application, semantically coherent code segments are determined using a hierarchical clustering algorithm, with the following specific steps:

[0112] Calculate the similarity matrix between G-code lines based on instruction type, spatial continuity, and process parameters;

[0113] Apply a hierarchical clustering algorithm to merge similar lines of code from bottom to top;

[0114] The clustering tree is truncated at a suitable threshold to obtain semantically coherent code segments.

[0115] The processing behavior ontology is represented by a three-layer structure:

[0116] Top level: machining operation type (e.g. milling, drilling, tapping, etc.);

[0117] Middle layer: processing features (such as planes, cavities, hole systems, etc.);

[0118] Bottom layer: specific parametric operations (e.g. "milling a plane with a depth of 5 mm at a feed rate of 10 mm / min").

[0119] In one implementation of the present application, the mapping function It is implemented through a deep neural network, consisting of two parts: encoder and decoder:

[0120] Coder: Translate code snippets Encoded into semantic vectors ;

[0121] Decoder: Transform the semantic vector Decoding into processing behavior .

[0122] Mapping Function The optimization is performed by minimizing the following objective function:

[0123] ;

[0124] in, is the mapping function The overall loss function is, Indicates that all The code paragraphs are summed. Indicates the total number of code sections, Indicates the A code paragraph, Represents the mapping function to the code paragraph The prediction results, For code sections The standard processing behavior (true label), The loss function is used to measure the difference between the predicted result and the true label. To prevent the model from overfitting, the regularization term is the regularization coefficient that controls the regularization strength.

[0125] Loss Function Using weighted combination form:

[0126] ;

[0127] in, Represents the loss function that measures the difference between the predicted result and the true label, which is used to evaluate the accuracy of the mapping function; represents the operation type loss function, which is used to measure the difference between the predicted machining operation type (such as milling, drilling, etc.) and the actual operation type; Represents the machining feature loss function, which is used to measure the difference between the predicted machining features (such as planes, cavities, hole systems, etc.) and the actual features; represents the parameter loss function, which is used to measure the difference between the predicted specific parameters (such as feed rate, cutting depth, etc.) and the actual parameters; 、 、 Represents the weight coefficients of the operation type loss function, processing feature loss function and parameter loss function respectively, which are used to adjust the importance ratio of the three losses in the total loss, usually satisfying and .

[0128] In specific application scenarios, such as cavity processing of aviation structural parts, the program processing bidirectional mapping system of this application can identify the following mapping relationships:

[0129] G code segment "G01X100Y100Z-5F200" → "Face milling at position (100, 100) at a feed rate of 200 mm / min, depth 5 mm";

[0130] G code segment "G02X120Y120I10J10F150" → "Profile milling along a clockwise arc trajectory at a feed rate of 150 mm / min";

[0131] This type of mapping relationship provides semantic-level understanding for interrupt recovery. When the machine tool is interrupted while executing the second code segment mentioned above, the system can understand that the "contour milling" operation is currently being performed and select an appropriate recovery strategy based on the characteristics of the operation.

[0132] Step 2.3, processing intention mining based on causal reasoning;

[0133] This application uses counterfactual analysis to identify the causal structure in the program and explore the implicit processing intentions. The specific implementation is through the following steps:

[0134] Constructing a cause-effect diagram model for machining programs ,in, is a set of semantic nodes, is the causal relationship edge set;

[0135] For each program segment , calculate its conditional intervention probability:

[0136] ;

[0137] in, Indicates program parameters, Indicates the processing results, Indicates program parameters A specific value of Indicates processing results A specific observation value of Indicates that the parameter value is And the processing result is The joint probability of Indicates that the parameters are artificially Set to intervention operations, Indicates that the processing result under the intervention operation is The conditional probability of Indicates that when the current parameter is observed And the result is In the case of The counterfactual conditional probability of the processing outcome.

[0138] Based on the probability of conditional intervention, key causal relationships are identified and the programmer’s intentions are inferred. For example, by analyzing the parameter change patterns in certain G-code sections, it is possible to infer that the programmer’s likely intention was to “avoid overcutting” or “ensure surface finish”.

[0139] According to one embodiment of the present application, the causal graph model construction process is as follows:

[0140] Node Set Contains program parameter nodes (such as feed rate, cutting depth) and machining result nodes (such as surface roughness, tool life);

[0141] Edge Set Represents the causal relationship from parameter nodes to result nodes, which is learned through historical processing data;

[0142] Use Bayesian network structure learning algorithm to automatically discover the causal relationship between variables and make corrections based on domain knowledge;

[0143] To obtain more accurate causal relationships, this application adopts a hybrid strategy:

[0144] Initialization of prior graph structure based on expert knowledge;

[0145] Structure learning based on observational data;

[0146] Verify key causal edges through intervention experiments (such as systematically changing a parameter and observing the results).

[0147] When calculating the conditional intervention probability, this application uses a two-stage estimation method:

[0148] Phase 1: Calculate joint probability using Bayesian estimation ,in, Indicates program parameters, Indicates a specific value of a parameter. Indicates the processing results, Represents a specific observed value of the result. The joint probability describes the probability of the parameter value and the processing result occurring at the same time.

[0149] Phase 2: Estimate intervention probability using the Monte Carlo method based on the causal graph structure ,in, Indicates the processing results, represents a specific observation of the outcome, Indicates that the parameters are artificially Set to value The intervention probability describes the conditional probability of the processing result after forcibly setting the parameter value, which is used to distinguish between correlation and causality.

[0150] In practical application scenarios, such as titanium alloy aviation structural parts processing, the causal reasoning module of this application can identify the processing intent from the following G-code paragraph:

[0151] For the code snippet:

[0152] G01X100Y100Z-1F50;

[0153] G01X200Y100Z-1F50;

[0154] G01X200Y200Z-1F30;

[0155] G01X100Y200Z-1F30;

[0156] G01X100Y100Z-1F50;

[0157] System analysis revealed that the feed rate decreased from F50 to F30 when moving in the Y direction, while remaining constant at F50 when moving in the X direction. Through cause-and-effect diagram analysis, the system inferred a causal relationship between this parameter change and poor Y-direction rigidity, thereby recognizing that the programmer's intention was to reduce Y-direction vibration to improve machining accuracy.

[0158] This recognition of the intention is crucial for interrupt recovery. When an interruption occurs during the Y-direction feed, the system automatically maintains a lower feed rate F30 for recovery, rather than simply reverting to the default rate, thus maintaining consistency with the original programmer's intention. Figure 1 Consistent processing strategy.

[0159] The intent recognition result is expressed in the form of a triple: ,in, Indicates the operation subject, which is a G code instruction. For example, G01X100Y100 means linear interpolation motion at the X100Y100 position. Indicates the intention type, describing the purpose of the instruction, such as avoiding collision, improving accuracy, reducing vibration, etc. Indicates the object of the intention and specifies the specific entity to which the intention is directed, such as workpiece fixtures, specific surfaces, tools, etc.

[0160] For example, the triple This structured representation enables the system to accurately understand the machining intent behind each instruction.

[0161] Therefore, through the above-mentioned neural symbolic reasoning process, the system can deeply understand the processing intention behind the G code, including process requirements, special processing and safety considerations, etc., providing a key basis for the generation of subsequent interruption recovery strategies.

[0162] Step 2.4, adaptive recovery strategy generation system;

[0163] Based on the output of the above semantic parsing, bidirectional mapping, and intention mining modules, this application constructs an adaptive recovery strategy generation system. The specific implementation steps are as follows:

[0164] According to the interruption point status information Construct the current processing environment model, where For location information, is the processing tool status, For environmental conditions;

[0165] Retrieve similar historical case databases based on case similarity Select the most relevant historical recovery experience, among which, Indicates the current breakpoint status information. Represents the status information in the historical case library, Represents the similarity calculation function between two states, which is used to evaluate the matching degree between the current interruption state and the historical case;

[0166] Adaptive strategy generation algorithm Based on target processing intention and current status Generate an optimal recovery strategy:

[0167] ;

[0168] in, represents the adaptive policy generation algorithm, which is a function that maps inputs to recovery policies; Indicates the target processing intention, including the original processing purpose and process requirements of the programmer; Indicates the current state, represented by location information , processing tool status and environmental conditions composition; Represents the generated optimal recovery strategy, including recovery path, process parameters, and execution steps.

[0169] The generated strategies are verified for safety and effectiveness to ensure that they meet processing requirements.

[0170] The adaptive recovery strategy generation system in this application adopts a hierarchical decision-making architecture, which includes the following three key components:

[0171] Condition Assessment Module:

[0172] This module is responsible for analyzing the exact state at the time of the interruption. The implementation method is as follows:

[0173] Obtain real-time status data through the machine tool sensor network, including tool position, spindle load, cutting force, etc.

[0174] Use Kalman filtering algorithm to fuse multi-source sensor data and reduce the impact of noise;

[0175] Constructing the state vector , accurately characterize the processing environment at the time of interruption.

[0176] The key to implementing this module is the precise alignment of sensor data with the progress of G-code execution. This application uses an event-based synchronization mechanism to insert feature points into the G-code and achieve precise alignment by monitoring the sensor responses corresponding to these feature points.

[0177] For example, when a position instruction (such as G01X100Y100) is executed, the system records all sensor data at that moment and associates it with this G-code line, forming a state snapshot. When an interrupt occurs, the system can accurately locate the last executed G-code line and the corresponding machine status.

[0178] Case library construction and retrieval module:

[0179] In order to utilize historical experience, this application builds a structured case library, which is implemented as follows:

[0180] Case representation: Each case contains a four-tuple , 、 、 、 Representing status, intention, recovery strategy and effect evaluation respectively;

[0181] Similarity calculation: weighted Euclidean distance is used to calculate state similarity, and the weights are automatically adjusted based on the importance of the attributes;

[0182] Retrieval algorithm: KD tree is used to accelerate the nearest neighbor search, combined with semantic similarity filtering.

[0183] The case library supports incremental learning. Each time the system successfully handles an interruption, it automatically adds new cases to the library and updates the weight parameters for similarity calculation.

[0184] In practical applications, such as when processing complex surface milling interrupts, the system may retrieve the following cases:

[0185] Case ID: 135:

[0186] Interruption status: {position: (X: 156.3, Y: 89.7, Z: -15.2), cutting status: "surface milling", tool: "ball end mill φ10"};

[0187] Processing intention: {maintain surface smoothness and avoid step marks};

[0188] Recovery strategy: {Retraction height: 2mm, Return path: "Arc approach", Pre-cut distance: 5mm, Recovery feed rate: 80%};

[0189] Effect evaluation: {Success rate: 95%, Surface defects: "No visible traces"}.

[0190] Based on the similarity between the current interruption status and the case, the system can refer to its recovery strategy and make adaptive adjustments according to the specific differences.

[0191] Strategy generation and optimization module:

[0192] This module generates the optimal recovery strategy based on the current state, identified intent, and similar cases. The implementation is as follows:

[0193] Multi-objective optimization framework: considering processing quality, efficiency and safety simultaneously;

[0194] Policy parameterization: Parameterize the recovery policy as a vector ;

[0195] Optimization algorithm: A model-based reinforcement learning method is used to optimize parameters by simulating the effects of different recovery strategies.

[0196] The specific optimization objective function is defined as:

[0197] ;

[0198] in, Represents the recovery strategy parameter vector The comprehensive evaluation function of 、 、 They represent the weight coefficients of the quality evaluation function, efficiency evaluation function, and safety evaluation function, respectively, and are automatically adjusted according to the specific requirements of the processing task; is the quality evaluation function, which is used to evaluate the impact of the recovery strategy on the processing quality; is the efficiency evaluation function, which is used to evaluate the time efficiency and resource consumption of the recovery strategy; It is a security evaluation function used to evaluate the security risk and reliability of the recovery strategy; is the recovery strategy parameter vector, which includes key parameters such as retraction height, approach path type, pre-cut distance, and recovery feed rate.

[0199] In application scenarios, such as handling interruptions during deep cavity machining, the system generates a recovery strategy that includes the following elements:

[0200] Safe retraction path: Considering the cavity shape, calculate the collision-free retraction trajectory;

[0201] Tool inspection program: Verify tool integrity and calculate possible wear;

[0202] Re-entry point determination: Select the best re-entry point based on the interruption location and processing intention;

[0203] Approach trajectory planning: Design a smooth transition trajectory to avoid cut-in impact;

[0204] Parameter adjustment strategy: Dynamically adjust cutting parameters according to the length of interruption time.

[0205] Through the above-mentioned hierarchical decision-making framework, this application realizes the generation of adaptive recovery strategies for different processing scenarios, effectively improving the success rate of interruption recovery and processing quality.

[0206] Step 3: Combine historical data to achieve self-evolutionary learning of processing experience, and continuously learn and optimize recovery strategies from historical experience;

[0207] It includes the following sub-steps:

[0208] Step 3.1, empirical characterization based on multi-source data;

[0209] First, a unified experience representation framework is constructed to structure complex processing experience into a computable form:

[0210] The empirical data sources include: historical interruption recovery records, expert knowledge rule base, online learning data and simulation verification results;

[0211] Each experience record is represented as a six-tuple ,in, Description of the interrupt status; To represent processing intention; the recovery strategy adopted; is the observed execution result; It is a quality assessment indicator; Analysis of explainable failure / success factors.

[0212] Use graph structure to organize experience and build experience knowledge graph , where the vertex For empirical entities, For the relationship between entities;

[0213] Design a graph convolutional network based on attention mechanism to achieve efficient encoding and retrieval of experience representation.

[0214] For example, for the experience of interruption recovery during the processing of aluminum alloy thin-walled parts, the system will construct the following representation:

[0215] Experience ID: E-20230512-007

[0216] Interrupt status(S): {

[0217] "Processing stage": "Finishing",

[0218] "position": [125.36, 78.92, -5.2],

[0219] "Tool": "Flat bottom milling cutter Φ8",

[0220] "Cutting parameters": {"Feed rate": 800, "Spindle speed": 6000, "Deep cut": 0.5},

[0221] "Workpiece Features": "Thin-wall structure (thickness 3mm)",

[0222] "Interruption reason": "Temporary power outage"

[0223] }

[0224] Processing Intention (I): {

[0225] "Main goal": "Ensure surface finish Ra ≤ 1.6",

[0226] "Secondary constraints": ["Avoid thin wall deformation", "Maintain dimensional accuracy ±0.05mm"]

[0227] }

[0228] Recovery Strategy (R): {

[0229] "Approach Path": "Progressive oblique approach",

[0230] "Pre-cut distance": 8.5,

[0231] "Feed rate adjustment": "Initial 70%, gradually restored to 100%",

[0232] "Cooling Strategy": "Enhanced Cooling",

[0233] “Exit strategy”: “Smooth transition to the next tool path”

[0234] }

[0235] Execution result (O): "Restoration completed successfully, no obvious seams"

[0236] Quality Assessment (Q): {

[0237] "Surface finish": 1.4,

[0238] "Position accuracy": 0.03,

[0239] Recovery time: 45 seconds

[0240] }

[0241] Factor analysis (F): "Sufficient pre-cutting distance avoids impact caused by direct cutting; progressive feed rate prevents thin wall deformation."

[0242] Step 3.2, adaptive experience extraction and fusion;

[0243] To improve the quality and efficiency of experience learning, this system has developed the following key algorithms:

[0244] The empirical priority evaluation algorithm based on uncertainty sampling quantifies the empirical value:

[0245] ;

[0246] in, Represents the priority evaluation value of experience, which is used to determine the importance of experience in the learning process; Indicates the novelty of the experience, measuring the degree of difference between the experience and the experience in the existing knowledge base. The higher the value, the more unique the experience. Indicates the success of the experience, quantifying the effect of the experience after application. The higher the value, the better the recovery effect. Indicates the scope of application of the experience, evaluating the breadth of scenarios in which the experience can be applied. A higher value indicates greater applicability. 、 、 They represent the weight coefficients of novelty, success and scope of application respectively. These coefficients will be dynamically adjusted according to the system operation stage to adapt to the needs of different learning stages.

[0247] Use the Bayesian reasoning framework to integrate experiences and resolve experience conflicts:

[0248] ;

[0249] in, It is the integrated experience knowledge, which means the comprehensive experience formed by the integration of multiple experiences; The actual processing interruption data observed, including interruption status, process parameters and other measured information; is the prior experience distribution, which indicates the system's initial confidence in the experience knowledge before acquiring new data; Is the likelihood function, which means that given the empirical knowledge The data were observed under the conditions probability; is the posterior probability, which means that when the data is observed Post-experiential knowledge The updated confidence of . This Bayesian formula realizes the dynamic update and integration of empirical knowledge.

[0250] Design a weighted multi-instance learning algorithm to learn from both success and failure cases:

[0251] ;

[0252] in, is the total loss function of experience learning, represents the total number of experience samples, For the The weight of the experience sample, The loss function is used to measure the difference between the model prediction value and the true value. It can be a mean square error function, a cross entropy function, or a custom recovery strategy evaluation function. Different loss function forms are selected according to different recovery scenarios. Represents the model's input The predicted output of For the The formula comprehensively considers various types of experience samples in a weighted manner, enabling the system to learn from both success and failure cases.

[0253] Step 3.3, self-evolution mechanism of experiential knowledge;

[0254] This system realizes the continuous optimization and updating of experience knowledge, mainly including the following mechanisms:

[0255] A rule extraction algorithm based on differential evolution automatically discovers recovery strategy rules from accumulated experience;

[0256] Experience forgetting mechanism, which eliminates outdated or low-value experience through the time decay function:

[0257] ;

[0258] in, Express experience At the current time The correlation value of Express experience The initial correlation value of is the current time, Gain time for experience, is the decay coefficient (controlling the rate at which empirical correlations decay over time), is the base of the natural logarithm. This formula implements a mechanism whereby the value of experience decays exponentially over time, allowing the system to gradually eliminate outdated experience knowledge.

[0259] Knowledge distillation technology compresses the experience learned by complex models into lightweight models to improve response speed;

[0260] Active learning strategy, the system actively identifies weak areas in the experience knowledge graph and generates learning tasks.

[0261] Step 3 Application Example:

[0262] Taking the machining of aircraft engine blades as an example, the self-evolutionary learning process of the system is demonstrated:

[0263] Initial stage: The system only has basic recovery rules and limited response to special interruption situations. When first handling a tool breakage interruption during high-speed cutting, the system uses a general strategy, which results in poor recovery and obvious surface marks.

[0264] Learning process: The system records the failure experience and extracts the key factors from it: under high-speed cutting conditions, direct recovery leads to excessive impact; after expert intervention, the successful recovery strategy is recorded: pre-cut deceleration + path optimization.

[0265] Knowledge fusion: The system integrates newly acquired experience with existing knowledge, updates the parameters of the recovery strategy generation algorithm, and establishes new rules: for carbide high-speed cutting interruptions, a "two-stage recovery" strategy should be adopted.

[0266] In subsequent similar situations, the system automatically applies the improved strategy.

[0267] Through similarity analysis, the system generalizes the experience of blade disk processing to the processing of other thin-walled complex parts, and automatically adjusts parameters according to material and structural differences.

[0268] Through the above-mentioned self-evolutionary learning mechanism, the system can accumulate experience from each interruption recovery practice, continuously improve the recovery strategy, and ultimately realize the intelligence and self-optimization of the machine tool processing interruption recovery process.

[0269] Step 4: Locate the interruption recovery point based on the intent map and learned experience to accurately find the optimal recovery location;

[0270] It includes the following sub-steps:

[0271] Step 4.1, interruption state detection and feature extraction;

[0272] In one embodiment of the present application, the system first detects the specific state of the interruption and obtains key information at the moment of the interruption, including:

[0273] Program execution position: Determine the program line number executed at the time of interruption by reading the program counter value recorded by the machine tool control system;

[0274] Machine tool status parameters: including the position of each coordinate axis, feed speed, spindle speed, etc.;

[0275] Process parameters: such as cutting force, temperature, vibration and other sensor data;

[0276] Interruption type judgment: Based on the error code or abnormal signal, determine the specific cause of the interruption, such as power outage, emergency shutdown, program error, etc.

[0277] In addition, feature extraction is performed on the acquired status information to construct the interrupt feature vector ,in, 、 、 Respectively represent 、 、 Characteristics of a specific dimension, such as position deviation, parameter abnormality, etc. Indicates the total number of interrupt features.

[0278] Step 4.2, accurately locate the interruption point in the knowledge graph;

[0279] This application uses the interruption feature vector to accurately locate the interruption point in the knowledge graph constructed in the first step. The specific steps are as follows:

[0280] Initial positioning: Find the corresponding node in the knowledge graph based on the program counter value ;

[0281] Contextual Analysis: Examining Nodes The local graph structure of and subsequent node sets ,analyze the semantic environment of the interruption point;

[0282] Status verification: interrupt feature vector With node Compare with the expected state and calculate the state matching degree:

[0283] ;

[0284] in, Represents the breakpoint node in the knowledge graph, represents the interruption feature vector, Indicates the state matching degree; The first character vector of the interruption A quantity, Representation node The expected eigenvalue of is a similarity function used to calculate the similarity between the actual eigenvalue and the expected eigenvalue; is the feature weight, indicating the The importance of each feature in the matching calculation; Represents the dimension of the feature vector, that is, the total number of features. This formula calculates the weighted average feature matching degree, which is used to evaluate the degree of match between the detected interruption state and the expected state of the node in the knowledge graph.

[0285] Correction positioning: If the state matching degree is lower than the threshold, consider the node The neighboring nodes of the .

[0286] Step 4.3, optimal recovery point identification algorithm;

[0287] After accurately locating the interruption point, the system of this application needs to determine the optimal recovery point, which may be different from the interruption point. The identification of the optimal recovery point is based on the following considerations:

[0288] Machining feature integrity: tends to recover at the boundary of the machining feature and avoid discontinuity caused by recovery within the feature;

[0289] Process continuity: Consider the continuity of process parameters and avoid recovery at the point where the parameters change sharply;

[0290] Safety: Consider safe paths for tool approach and exit.

[0291] The optimal recovery point is identified using the shortest path algorithm on the graph, which is defined as:

[0292] ;

[0293] in, represents the optimal recovery point, represents any point in the set of candidate recovery points, represents the set of all candidate recovery points, Indicates the actual break point, represents the independent variable that makes the objective function achieve the minimum value, is the weighted path distance from the actual interruption point to the candidate recovery point, defined as:

[0294] ;

[0295] in, Represents a slave node To Node The shortest weighted path distance; Represents a slave node To Node The set of all possible paths; express A specific path in Indicates the path An edge on It means finding the path with the smallest weight among all possible paths; Indicates the path The sum of the weights of all edges on .

[0296] Each edge on the path Weight Consider the following factors:

[0297] ;

[0298] in, Represents each edge on the path The weight of Represents an edge The weight on the machining feature completeness dimension reflects the degree to which the machining feature will be incompletely executed if the edge is passed; Represents an edge The weight on the process continuity dimension measures the smoothness of the changes in process parameters (such as cutting speed, feed rate, etc.) when passing through the edge; Represents an edge The weight on the safety dimension evaluates the risk of collision or possibility of tool damage caused by passing through the edge; 、 、 They represent the balance coefficients of the three dimensions of feature integrity, process continuity, and safety, respectively, and are used to adjust the relative importance of the three factors in the final path selection, and meet the normalization constraints: By adjusting these coefficients, the system can flexibly determine the optimal recovery point based on different processing task characteristics and interruption situations.

[0299] Step 4.4, processing features and process continuity constraints;

[0300] To ensure the rationality of the recovery point, the system further imposes the following constraints:

[0301] Machining feature integrity constraints:

[0302] In this application, the processing feature set is defined as ,in, 、 、 Respectively represent 、 、 machining features; Indicates the total number of machining features. In the internal case, the system prioritizes the starting node of the feature as the recovery point, that is:

[0303] ;

[0304] in, Indicates the selected recovery point, Representation characteristics The starting operation node, Indicates the machining feature where the current interruption occurs. This formula indicates that the system will set the recovery point at the starting position of the current machining feature to ensure the integrity and continuity of the machining feature.

[0305] Process continuity constraints:

[0306] For areas where process parameters change significantly, this application defines process sensitive areas , the system avoids setting recovery points in sensitive areas, namely:

[0307] ;

[0308] in, Represents a set of process sensitive areas, including multiple sensitive areas; Indicates the recovery point selected by the system; It means that the selected recovery point should not be located in any process-sensitive area. This is to ensure a smooth transition when resuming processing and avoid recovery at a point where process parameters change drastically, which may cause processing quality problems.

[0309] Therefore, through the above algorithms and constraints, the system of the present application can accurately locate the interruption point in the complex G-code knowledge graph and identify the optimal recovery point, ensuring the smooth progress of the subsequent recovery process and the continuity of the processing quality.

[0310] Step 5: Generate and execute an interruption recovery strategy based on the located recovery point to achieve a smooth recovery of the processing process;

[0311] It includes the following sub-steps:

[0312] Step 5.1, resume path planning and parameter optimization;

[0313] According to an embodiment of the present application, based on the recovery point, the system generates a recovery path and optimizes the processing parameters. The recovery path planning takes into account the following factors:

[0314] Safe approach path: A safe path from the current tool position to the recovery point, avoiding collisions with the workpiece, fixtures, etc.

[0315] Smooth transition of process parameters: To ensure the smoothness of the recovery process, the system builds a gradual adjustment method for process parameters. , feed rate and cutting depth Key parameters such as , use smooth function for transition:

[0316] ;

[0317] in, For the moment The parameter value represents the actual value of the process parameter at a certain moment in the transition process; is the starting value, indicating the initial process parameter value at the beginning of recovery; is the target value, which indicates the process parameter value that needs to be achieved after the recovery is completed; is the normalized transition time parameter, and its value range is , Indicates the transition start time, Indicates the end time of the transition; Indicates the total change of the parameter; is a smooth function used to control the rate of parameter change and the shape of the curve, satisfying (No change at the initial moment), (The target value is reached at the end time), an S-shaped curve is usually used to ensure the smoothness and continuity of parameter changes:

[0318] ;

[0319] in, Represents a smooth transition function, which is used to achieve a smooth change of the parameter from the starting value to the target value; Represents the normalized transition time parameter, with a value range of 0 to 1, where 0 represents the start time of the transition and 1 represents the end time of the transition; is the classic cubic Hermite interpolation polynomial with and The characteristic of the first-order derivative being 0 at ensures smooth change rate at the start and end of the transition; Representation parameters The value range is limited to between 0 and 1.

[0320] Trajectory correction and compensation: Considering the possible thermal deformation of the workpiece and the machine tool error after the interruption, calculate the trajectory compensation amount:

[0321] ;

[0322] in, Indicates the trajectory compensation amount, that is, the position adjustment amount required for the original trajectory; The temperature field of the workpiece describes the temperature distribution state of each point on the workpiece; is the interruption duration, which indicates the time interval from processing interruption to resumption; Material characteristic parameters, including thermal expansion coefficient, thermal conductivity and other material properties that affect workpiece deformation; It is a compensation function used to calculate the final trajectory compensation according to the input parameters. This function takes into account the thermal deformation effect caused by temperature changes.

[0323] The complete description of the recovery path is a sequence of control points , each control point Contains complete status information such as position, speed, acceleration, etc. Among them, The control point sequence representing the recovery path is an ordered set; 、 、 Represents the first 、 、 control points; Indicates the total number of control points.

[0324] Step 5.2, program reorganization and code generation;

[0325] In this application, based on the planned recovery path and parameters, the system reorganizes the G-code program to generate a modified version of the program including the recovery sequence. The program reorganization process includes:

[0326] Program splitting: split the original machining program into the executed part and the to-be-executed part at the recovery point;

[0327] Recovery sequence generation: Based on the planned recovery path, a series of G-code instructions are generated to form a recovery sequence ,in, Represents a complete recovery sequence, which is an ordered set of G-code instructions; 、 、 Represents the first 、 、 G code instructions, which may include motion instructions, process parameter setting instructions, etc. Indicates the total number of G-code instructions in the recovery sequence; the recovery sequence includes a series of instructions such as safe height retract, rapid positioning, gradual approach, pre-cut and parameter adjustment;

[0328] Program merging: Merge the recovery sequence with the part to be executed to form a complete recovery execution program:

[0329] ;

[0330] in, Represents the final generated recovery execution program, Represents a system-generated recovery sequence (a series of instructions that safely approaches a recovery point from the current position), Indicates the part of the original processing program that has not been executed. It represents a set merge operation, which means merging two parts of program code into a complete executable program in sequence.

[0331] When generating the recovery sequence, the system takes into account the characteristics of the machine tool control system to ensure that the generated code meets the syntax requirements and execution characteristics of the specific machine tool. For different types of interrupts, the system adopts different code generation strategies:

[0332] For temporary shutdown interruptions, the relative coordinate mode is used for recovery;

[0333] For power failure interruptions, absolute coordinate mode is used for recovery;

[0334] For emergency shutdown interruptions, add additional safety check codes.

[0335] Step 5.3, perform monitoring and real-time adjustment;

[0336] According to the embodiment of the present application, when executing the recovery strategy, the system monitors the execution status in real time and makes necessary adjustments based on the feedback. Execution monitoring includes the following:

[0337] Condition monitoring: real-time collection of machine tool execution status data, including position error, cutting force, vibration, etc.

[0338] Anomaly detection: Detects possible anomalies based on real-time status data:

[0339] ;

[0340] in, Indicates the abnormality of the current state. The current state represents the real-time state parameter set of the machine tool during the recovery process, including position, speed, cutting force, etc. is the expected state, which represents the set of ideal execution state parameters calculated according to the recovery strategy; It is a distance function used to calculate the degree of deviation between the current state and the expected state. It can use measurement methods such as Euclidean distance and Mahalanobis distance. is the threshold, which indicates the maximum deviation value that the system can accept. If it exceeds this threshold, it is considered an abnormal state and requires intervention. When it is equal to 1, it means an abnormality is detected; when it is equal to 0, it means the system is running normally.

[0341] Adaptive adjustment: When an anomaly is detected, the system takes appropriate adjustment measures:

[0342] For slight deviations, adjust the feed rate;

[0343] For moderate deviations, the trajectory is corrected;

[0344] For serious deviations, suspend execution and re-plan.

[0345] In this application, the adjustment measures are implemented by real-time interpolation, without the need to regenerate the entire recovery program. Adaptive adjustment uses a feedback control strategy:

[0346] ;

[0347] in, represents the control input, that is, the control amount that the system needs to apply; represents the current error, that is, the deviation between the current state and the expected state; represents the error at the previous moment; From the beginning to the current time The cumulative sum of errors; Represents the proportional coefficient, which controls the response intensity to the current error; Represents the integral coefficient, which controls the response strength to the accumulated error; The differential coefficient controls the response strength to the error rate of change. These three parameters together constitute the parameter set of the PID controller, which is used to achieve precise control and stable response of the system.

[0348] Therefore, through the collaborative work of the above multiple steps, the system of this application can generate an optimized recovery strategy for specific interruption situations, and perform real-time monitoring and adjustment during the execution process to ensure the safety, smoothness and accuracy of the recovery process, and ultimately achieve high-quality completion of processing tasks.

[0349] Application examples of this implementation:

[0350] In order to verify the technical effect of this application, the following provides an actual application case in the processing of a complex structural part in the aerospace field.

[0351] In this case study, a large aircraft engine turbine blisk was machined. Made from the high-temperature alloy TC4, the blisk had an overall diameter of 600 mm and a material cost of approximately 150,000 yuan per piece. The machining program contained approximately 85,000 lines of G-code, with a 22-hour machining cycle and involved multiple stages, including roughing, finishing, and feature machining.

[0352] In actual production, the blisk machining process was interrupted due to a temporary power outage at the factory. The interruption occurred during the final machining of the blade cavity, with approximately 65% ​​of the machining progress complete. Due to the complex curved surfaces and stringent dimensional accuracy requirements (tolerances of ±0.02mm), traditional interruption recovery methods were difficult to meet and risked workpiece scrapping.

[0353] Implementation process example:

[0354] Code semantic analysis and graph structure conversion:

[0355] The system first pre-processes and analyzes the turbine blade disc machining program:

[0356] G-code preprocessing: The system identified that the machining program consists of eight major process stages and 25 machining features. The breakpoint is located at feature 12 in the sixth process stage (blade cavity finishing).

[0357] Semantic Extraction: Performs in-depth analysis of the G-code segment near the interruption point. The following is a section of G-code near the interruption point and its semantic analysis results:

[0358] G01X150.326Y-85.127Z-10.258F150;

[0359] G01X152.896Y-84.226Z-10.261F120;

[0360] G01X154.992Y-83.019Z-10.265F100;

[0361] G02X156.327Y-81.254Z-10.271I-2.418J-5.026F80;

[0362] G02X156.892Y-79.127Z-10.276I-8.145J-3.619F80;

[0363] The semantic parsing results show that this code segment belongs to the "blade leading edge finishing" operation, which adopts a feed strategy with gradual speed reduction (F150→F80) with the intention of controlling cutting force and maintaining surface finish.

[0364] Knowledge graph construction: The system converts the above G code into a graph structure. The nodes corresponding to the interruption points contain the following key attributes:

[0365] Node type: circular interpolation instruction;

[0366] Processing features: blade leading edge;

[0367] Process characteristics: fine processing;

[0368] Special strategies: gradual deceleration;

[0369] Related parameters: cutting speed 80mm / min, tool Φ6 ball end milling cutter.

[0370] Neural symbolic reasoning for processing intentions:

[0371] The system analyzes the code segment near the breakpoint using the neural-symbolic joint representation model. The key reasoning process is as follows:

[0372] Neural representation learning: The graph neural network extracts a distributed representation vector of the code segment. Core features include "continuous arc features" and "feed rate gradient changes."

[0373] Symbolic rule reasoning: Applying the tool-workpiece interaction rule library, it identifies that the machining intent of this code segment is “controlling the cutting force distribution on the leading edge of the blade to avoid vibration”;

[0374] Causal analysis: Through counterfactual analysis, the system determined that the gradual adjustment of the feed rate has a significant causal relationship with the "stability control of the leading edge thin-wall area", rather than simply the need to improve efficiency.

[0375] After comprehensive reasoning, the system concluded that the underlying intention of this program is "to avoid thin-wall deformation by precisely controlling the feed rate while ensuring the surface finish of the leading edge of the blade (Ra≤0.8μm)."

[0376] Self-evolutionary learning from processing experience:

[0377] The system searched its experience database and found three similar machining interruption cases. After calculating the similarity, the closest case was "Engine Compressor Blade Finishing Interruption Case E-2022063," with a similarity of 0.86. The key recovery strategy for this case was "pre-cut distance 10mm + progressive feed recovery."

[0378] The system draws on this strategy and makes adaptive adjustments based on the current interrupt characteristics:

[0379] Increase the pre-cut distance to 12mm (because the blade thickness is small in this case);

[0380] Modify the feed rate recovery curve to a smoother S-shaped curve;

[0381] Add smooth transitions to toolpaths to avoid seam marks.

[0382] Through this recovery process, the system adds a new experience record, which is represented by the six-tuple:

[0383] State(S): {workpiece=TC4 turbine blade disk, interruption position=blade leading edge, tool=Φ6 ball end milling cutter, stage=finishing};

[0384] Intent (I): {primary = surface finish control, secondary = avoidance of thin wall deformation};

[0385] Strategy (R): {pre-cut distance = 12 mm, feed recovery = S-curve, trajectory = smooth transition};

[0386] Result (O): {no obvious seams on the surface and good contour continuity};

[0387] Quality (Q): {surface roughness = 0.72 μm, profile deviation = 0.008 mm};

[0388] Factor (F): {sufficient pre-cut distance, appropriate feed recovery curve, and consistent machining direction with grain}.

[0389] Interruption recovery point positioning based on intent graph:

[0390] By analyzing the machining intent and program structure, the system found that the interruption point (G02 instruction) was located in the middle of the finishing stage of the leading edge of the blade, and directly resuming from this point might result in surface discontinuity.

[0391] The system applies the optimal recovery point identification algorithm and calculates the weighted path distances of multiple candidate recovery points:

[0392] Current breakpoint (node ): d=0, but located in the middle of the feature;

[0393] Current toolpath starting point (node ): d=5.63, the starting point of the current cavity contour;

[0394] Previous contour starting point (node ): d=8.21, the starting point of the adjacent cavity contour;

[0395] Taking into account the characteristics of integrity, process continuity and safety factors, the system selects the node (the starting point of the current tool path) is used as the optimal recovery point to ensure that a closed contour feature is completely processed.

[0396] Interruption recovery strategy generation and execution:

[0397] Based on the determined recovery point, the system generates a complete recovery strategy:

[0398] Recovery path planning:

[0399] Safety height retraction: Z=50mm;

[0400] Quickly locate 5mm above the recovery point;

[0401] Gradually approach the workpiece surface along the Z axis;

[0402] The pre-cut distance is set to 12mm to ensure a smooth transition in cutting;

[0403] Process parameter optimization:

[0404] The initial feed rate is set to 60% of the normal feed rate (F48);

[0405] Use an S-curve to smoothly return to the original feed rate (F80) within a distance of 10mm;

[0406] The spindle speed remains unchanged (N=6000r / min);

[0407] Program Reorganization and Code Generation: The system reorganizes the G code and generates a recovery program containing the following key parts:

[0408] Machine tool initialization section;

[0409] Tool detection and compensation section;

[0410] Safety approach section;

[0411] Pre-cut path segments;

[0412] Parameter gradual recovery segment;

[0413] the remainder of the original program;

[0414] Execution monitoring and adjustment: The system monitors the following parameters in real time during the recovery execution process:

[0415] Cutting force: maximum fluctuation does not exceed 5%;

[0416] Vibration amplitude: maintained within the range of 0.01-0.02mm;

[0417] Surface quality: monitored in real time by optical sensors deployed on the machine tool.

[0418] Technical effect verification:

[0419] The method of this application was applied to the above-mentioned turbine blade disk processing interruption recovery case and achieved significant technical results. The main verification data are as follows:

[0420] Restoration accuracy and processing quality:

[0421] The blisk was precisely measured after restoration, and the results showed:

[0422] The average surface roughness of the restored area is Ra0.72μm, which is within the allowable range compared with Ra0.68μm of the non-interrupted area.

[0423] The shape profile deviation between the restored area and the non-interrupted area is 0.008 mm, which is far below the allowable tolerance of ±0.02 mm.

[0424] There are no visible marks at the restored joints, and the continuity test results show that the curvature transition is smooth, meeting the strict quality requirements of aircraft engine blades.

[0425] This proves that the method of the present application can achieve high-precision interruption recovery and ensure the consistency of processing quality with the uninterrupted area.

[0426] Recovery efficiency and resource conservation:

[0427] Using traditional manual intervention methods, it takes expert technicians an average of 5-8 hours to design and implement a recovery plan for this type of turbine blade disk interruption, with a success rate of approximately 50% and a high risk of workpiece scrapping.

[0428] Using the method of this application, the entire interruption recovery process, including analysis, planning, and execution, took a total of 46 minutes, with a success rate of over 95%.

[0429] Considering that the material cost of a single turbine blade disk is about 150,000 yuan and the processing cost is about 50,000 yuan, this method saves huge economic costs and reduces the extension of the production cycle caused by scrapped workpieces.

[0430] At the same time, the experience gained from this successful recovery has been added to the experience library, further improving the system's ability to handle subsequent similar processing interruptions, and the self-evolutionary learning effect is obvious.

[0431] In summary, the application of this embodiment in the actual aircraft engine key parts processing scenario has fully verified the effectiveness, accuracy and efficiency of the machine tool processing file interruption recovery method based on neural symbolic reasoning proposed in this application, and provided a reliable processing interruption recovery solution for high-end manufacturing fields such as aerospace.

[0432] The above describes an embodiment of the present invention, but this embodiment is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Ordinary technicians in this field can also make more forms of equivalent embodiments based on the inspiration of this embodiment, all of which are protected by this embodiment.

Claims

1. A method for recovering interrupted machine tool processing files, characterized in that: The following steps are involved: Perform G-code semantic analysis and graph structure conversion to convert the G-code processing program into a structured knowledge graph with semantic associations; Perform neural symbolic reasoning based on knowledge graphs, perform processing intention reasoning based on neural symbolic reasoning, understand the deep processing intention behind the program, build an intention graph, and perform processing intention reasoning based on neural symbolic reasoning. The following steps are included: Construct a neural-symbolic joint representation model that integrates neural networks and symbolic reasoning; Establish a bidirectional mapping relationship between program processing and understand the correspondence between code segments and processing behaviors; Mining processing intentions based on causal reasoning and identifying causal structures in programs; Build an adaptive recovery strategy generation system to generate the optimal recovery plan based on the intention; Combine historical data to achieve self-evolutionary learning of processing experience, and continuously learn and optimize recovery strategies from historical experience; Based on the intent map and learned experience, the interruption recovery point is located to accurately find the optimal recovery location. The interruption recovery point location based on the intent map and learned experience includes the following steps: Interruption status detection and feature extraction to obtain key information at the moment of interruption; Accurately locate the interruption point in the knowledge graph and identify the semantic context in which the interruption occurred; Apply the optimal recovery point identification algorithm to determine the most suitable location for recovery; Consider processing characteristics and process continuity constraints to ensure the rationality of the recovery point; Generate and execute the interruption recovery strategy based on the located recovery point to achieve smooth recovery of the processing process.

2. The interruption recovery method of a machine tool processing file according to claim 1, characterized in that: The G code semantic parsing and graph structure conversion comprises the following steps: G code preprocessing and lexical analysis, dividing the original G code file into basic morpheme units; Syntactic structure analysis and semantic extraction, building a syntax tree and mapping it to a predefined semantic model; Knowledge graph construction and structured representation, establishing a graph structure that represents the semantic units of the processing program and their relationships.

3. The interruption recovery method of a machine tool processing file according to claim 1, characterized in that: The neural-symbolic joint representation model includes a neural representation learning module and a symbolic reasoning module, which interact through an attention mechanism to form a joint representation. The joint representation vector is a weighted combination of the neural representation and the symbolic reasoning results according to an adaptive weight coefficient, and the adaptive weight coefficient is dynamically adjusted according to the confidence of the neural representation and the symbolic reasoning results.

4. The interruption recovery method of a machine tool processing file according to claim 1, characterized in that: The self-evolution learning of processing experience achieved by combining historical data includes the following steps: Construct an experience representation framework based on multi-source data to structure processing experience; Realize adaptive experience extraction and fusion to improve the quality of experience learning; Establish a self-evolution mechanism for experiential knowledge to achieve continuous optimization and updating of knowledge.

5. The interruption recovery method of a machine tool processing file according to claim 1, characterized in that: The optimal recovery point identification adopts the shortest path algorithm on the graph, and selects the point with the smallest weighted path distance to the actual interruption point from the candidate recovery point set as the optimal recovery point. The weighted path distance comprehensively considers feature integrity, process continuity and safety factors.

6. The interruption recovery method of a machine tool processing file according to claim 1, characterized in that: Generating an interruption recovery strategy based on the located recovery point and executing the strategy includes the following steps: Perform recovery path planning and process parameter optimization to design a safe approach path; Perform program reorganization and code generation to generate a modified program containing a recovery sequence; Execution monitoring and real-time adjustments are performed to adjust the recovery process based on feedback.

7. The interruption recovery method of a machine tool processing file according to claim 6, characterized in that: The process parameters are transitioned using a smooth function, so that the parameter value smoothly transitions from the starting value to the target value, wherein an S-shaped smooth function is used to ensure the continuity and stability of the parameter change.

8. A system for recovering machine tool processing files from interruption, used to execute the method for recovering machine tool processing files from interruption according to any one of claims 1 to 7, characterized in that: include: G-code semantic parsing and graph structure conversion module, used to convert G-code machining programs into structured knowledge graphs with semantic associations; Neural symbolic reasoning module, used to understand the deep processing intentions behind the program and build an intention map; Processing experience self-evolution learning module, used to continuously learn and optimize recovery strategies from historical experience; The interruption recovery point positioning module is used to accurately find the optimal recovery location based on the intent map and learned experience; The recovery strategy generation and execution module is used to generate and execute the interruption recovery strategy according to the located recovery point to achieve a smooth recovery of the processing process.

Citation Information

Patent Citations

  • Hub machine machining size error correction method based on digital twinning

    CN115576267A

  • Knowledge graph driven multi-process integrated simulation method and system based on semantic reasoning

    CN117688840A