Interrupt recovery method and system for machine tool processing file

Through G code semantic analysis, graph structure transformation and neural symbol reasoning, and self-evolution learning combined with historical data, the problem of low accuracy and success rate of machine tool processing interrupt recovery is solved, efficient and automated parts recovery is achieved, and adaptability is continuously improved.

CN120276918AActive Publication Date: 2025-07-08昆山台功精密机械有限公司

Patent Information

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

AI Technical Summary

Technical Problem

In the existing machine tool processing technology, the interrupt recovery method of complex parts lacks a deep understanding of the semantics and processing intentions of G codes, resulting in low recovery accuracy and success rate, difficulty in building dependencies, lack of adaptive learning ability, affecting processing quality and efficiency.

Method used

Through G code semantic analysis and graph structure transformation, the processing intention is understood based on knowledge graphs and neural symbol reasoning, combined with historical data for self-evolution learning, accurately locate the optimal recovery point, generate interrupt recovery strategies and execute them, and achieve high-precision and automated recovery.

Benefits of technology

It improves the recovery success rate and accuracy of complex parts processing, reduces the need for manual intervention, shortens the interrupt recovery time, reduces production costs and material waste, and has the ability to evolve.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276918A_ABST
    Figure CN120276918A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine tool machining, and discloses an interrupt recovery method and system.The interrupt recovery method for the machine tool machining file comprises the steps that G code semantic analysis and graph structure conversion are conducted, and a G code machining program is converted into a structured knowledge graph with semantic association; processing intention reasoning is carried out based on neural symbol reasoning, and a deep processing intention behind a program is understood; self-evolution learning of processing experience is realized, and continuous learning and optimization are carried out from historical experience; carrying out interruption recovery point positioning based on the intention map, and accurately finding out an optimal recovery position; generating and executing an interrupt recovery strategy to realize stable recovery of the machining process; by deeply understanding G code semantics and machining intention, the optimal recovery point is accurately recognized, the success rate and precision of interruption recovery are improved, and the method is suitable for high-value part machining scenes.
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 specifically, it relates to a method and system for interrupt recovery of machine tool processing files. Background Art

[0002] In the modern intelligent manufacturing environment, especially during the processing of complex structural parts in the aerospace field, the machining program may reach hundreds of thousands of lines of G-code, including multiple process stages and machining features. The processing of such high-value parts may last for several hours or even days. Once the processing is interrupted due to power failure, system crash, or other unforeseen reasons, if the machining state cannot be accurately restored, it will cause serious consequences such as workpiece scrapping, material waste, and decreased production efficiency.

[0003] Traditional machine tool interruption recovery methods mainly rely on simple program counters or line number positioning for interruption recovery, lacking a deep understanding of the semantics and machining intentions of the machining program, resulting in the following technical problems in complex machining scenarios: unable to accurately understand the high-level semantics and implicit machining intentions in the G-code program, especially difficult to correctly interpret non-standard programming patterns written by expert programmers; difficult to construct and express the dependency relationships inside complex machining programs, affecting the accurate identification of interruption recovery points; lacking adaptive learning ability and unable to learn knowledge from historical machining experience to optimize future interruption recovery strategies; insufficient awareness of machining context, resulting in deviations from the expected machining trajectory after recovery and affecting machining quality. Summary of the Invention

[0004] The present invention provides a method and system for interrupt recovery of machine tool processing files, which solves the technical problems of low recovery accuracy and success rate in related technologies due to the lack of a deep understanding of G-code semantics and machining intentions.

[0005] The present invention provides a method for interrupt recovery of machine tool processing files, including the following steps:

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

[0007] Perform neuro-symbolic reasoning based on the knowledge graph, perform machining intention reasoning based on neuro-symbolic reasoning, understand the deep machining intentions behind the program, and construct an intention graph;

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

[0009] Locate the interruption recovery point based on the intention graph and the learned experience, and accurately find the optimal recovery position;

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

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

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

[0013] Syntax structure analysis and semantic extraction, which construct a syntax tree and map it to a predefined semantic model;

[0014] Knowledge graph construction and structured representation, which establish a graph structure representing the semantic units of the machining program and their relationships.

[0015] In a preferred embodiment, the machining intention reasoning based on neuro-symbolic reasoning includes the following steps:

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

[0017] Establish a two-way mapping relationship for program machining to understand the correspondence between code segments and machining behaviors;

[0018] Mine machining intentions based on causal reasoning to identify the causal structure in the program;

[0019] Construct an adaptive recovery strategy generation system to generate an optimal recovery plan according to the intention.

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

[0021] In a preferred embodiment, the realization of self-evolving learning of machining experience by combining historical data includes the following steps:

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

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

[0024] Establish a self-evolving mechanism for empirical knowledge to achieve continuous optimization and update of knowledge.

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

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

[0027] Precisely locate the breakpoint in the knowledge graph and identify the semantic environment where the interruption occurs;

[0028] Apply the optimal recovery point recognition algorithm to determine the most suitable position for recovery;

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

[0030] In a preferred embodiment, the optimal recovery point recognition uses the shortest path algorithm on a graph to select the point with the minimum weighted path distance from the candidate recovery point set to the actual breakpoint as the optimal recovery point, and the weighted path distance comprehensively considers factors such as feature integrity, process continuity, and safety.

[0031] In a preferred embodiment, generating an interruption recovery strategy based on the located recovery point and executing it 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 the recovery sequence;

[0034] Execute monitoring and real-time adjustment to adjust the recovery process according to the feedback.

[0035] In a preferred embodiment, the process parameters are transitioned using a smoothing function to smoothly transition the parameter values from the starting value to the target value, and an S-shaped smoothing function is used to ensure the continuity and smoothness of the parameter change.

[0036] In a preferred embodiment, an interruption recovery system for a machine tool machining file, used to execute an interruption recovery method for a machine tool machining file, includes:

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

[0038] A neuro-symbolic reasoning module, used to understand the deep machining intention behind the program and construct an intention graph;

[0039] A machining experience self-evolving learning module, used to continuously learn and optimize the recovery strategy from historical experience;

[0040] An interruption recovery point positioning module, used to accurately find the optimal recovery position based on the intention graph and the learned experience;

[0041] A recovery strategy generation and execution module, which is used to generate an interruption recovery strategy based on the located recovery point and execute it to achieve a smooth recovery of the machining process.

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

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

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

[0045] Improve the degree of automation: The system can complete the recovery process without manual intervention, reducing the need for manual operations and the dependence on the professional skills of operators.

[0046] Enhance time efficiency: By accurately locating the recovery point and optimizing the recovery path, the interruption recovery time is shortened, improving production efficiency.

[0047] Have the ability of self-evolution: The system can continuously learn and optimize from practice, and its adaptability is constantly improved.

[0048] Save resources: By accurately understanding the semantics and intentions of the machining program, unnecessary repeated machining is avoided, saving raw materials and machining time, and reducing production costs. Brief Description of the Drawings

[0049] Figure 1 is a flowchart of an interruption recovery method for a machine tool machining file of the present invention. Detailed Embodiments

[0050] Now, the subject matter described herein will be discussed with reference to exemplary embodiments. It should be understood that discussing these embodiments is only to enable those skilled in the art to better understand and thus implement the subject matter described herein. Without departing from the scope of protection of the content of this specification, changes can be made to the functions and arrangements of the elements discussed. Each example can omit, substitute, or add various processes or components as needed. Additionally, the features described in some examples can also be combined in other examples.

[0051] In at least one embodiment of the present invention, an interruption recovery method for a machine tool machining file is disclosed, as Figure 1 shown, including the following steps:

[0052] Step 1, perform G-code semantic parsing and graph structure conversion to convert the G-code machining program into a structured knowledge graph with semantic associations;

[0053] Specifically, it includes the following sub-steps:

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

[0055] The system processes the G-code text using an improved lexical analysis algorithm, splitting the original G-code file into basic morpheme units, including instruction codes, coordinate parameters, feed rates, spindle speeds, etc.

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

[0057] During the lexical analysis process, the system labels the type of each instruction to form a formatted sequence of lexical units , where, 、 、 represent the 、 、 th lexical units, containing type labels, content values, and position information; represents the sequence of lexical units obtained after parsing the entire G-code file; represents the total number of lexical units.

[0058] Step 1.2, syntactic structure analysis and semantic extraction;

[0059] Based on the sequence of lexical units, this application uses a bottom-up syntactic analysis method to construct a syntax tree for G-code, identifying 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, parsing out the semantic information of each instruction segment, including:

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

[0062] Machining features: such as face milling, contour machining, cavity machining, etc.;

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

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

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

[0066] ;

[0067] where, is the extracted semantic information, representing the semantic content of the G-code at time point t; It is the syntactic analysis result, including the syntax structure and organization form of G-code instructions; It is the context information, representing the relevant instructions and environmental information around the current instruction; It is the historical instruction information, including the sequence of previously executed instructions and their impacts; It is the semantic mapping function, which is responsible for comprehensively converting syntactic, context, and historical information into a meaningful semantic representation. This formula describes how the system extracts the complete semantic understanding of G-code from multi-dimensional information.

[0068] Step 1.3, Knowledge graph construction and structured representation;

[0069] According to the embodiments of the present application, based on the extracted semantic information, the system constructs a knowledge graph of the processing program . Among them, represents the set of nodes in the graph, and 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 relationships between semantic units, such as temporal relationships, spatial relationships, or dependency relationships; represents the attribute matrix, including the attribute information of nodes and edges.

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

[0071] Initialize an empty graph structure;

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

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

[0074] Assign attribute values to nodes and edges.

[0075] For non-standard programming patterns, the system of the present application adopts a special pattern recognition algorithm for parsing. This algorithm combines statistical pattern matching and rule reasoning, and can identify common non-standard programming habits and special techniques, such as parametric programming, macro calls, or custom subroutines, etc., and correctly map them into the semantic model.

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

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

[0078] Specifically, it includes the following sub-steps:

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

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

[0081] Neural representation learning module: Adopting the structure of a Graph Neural Network (GNN), it learns the distributed representations of nodes and edges in the knowledge graph. For each node in the graph , its representation vector is updated in the following way:

[0082] ;

[0083] Among them, represents the representation vector of node at the th layer, represents the set of neighbor nodes of node , is an aggregation function used to summarize neighbor node information, represents the feature representation vector of node at the th layer, is the weight matrix of neighbor information, is the weight matrix of self-information, and both are learnable parameter matrices, is a non-linear activation function used to introduce non-linear transformation, represents the updated representation vector of node at the th layer. This formula describes how nodes in a graph neural network update their representations by aggregating neighbor information and self-information, realizing the transmission of information in the graph structure.

[0084] In specific implementation, according to the embodiments of this application, the graph neural network adopts a multi-layer structure, including three graph convolutional layers, and each layer contains 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 intermediate hidden layer dimension is 96.

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

[0086] ;

[0087] Among them, is the attention weight, indicating the attention of node to its neighbor node Degree of attention, calculated through node features; Represents a node At the Feature representation vector of the layer; Represents a node Set of all neighbor nodes of; Is an aggregation function used to summarize neighbor node information; Represents the weighted sum operation on all neighbor nodes; the role of this aggregation function is to weightedly summarize the information of neighbor nodes to the central node according to importance.

[0088] ;

[0089] Among them, Represents a node For neighbor node Attention weight of; And Respectively represent the Layer node And node Feature vectors of; Represents the operation of concatenating these two feature vectors; Is a learnable weight matrix used to transform the concatenated features; Is a rectified linear unit activation function with a small slope, used to introduce non-linear transformation; Represents the natural exponential function; Represents a node Set of all neighbor nodes of; the denominator part sums over all neighbor nodes To perform the summation operation to normalize the attention weights and ensure that the sum of all weights is 1.

[0090] In the aerospace part processing scenario, such as the processing of complex structure turbine blades, this neural representation learning module can identify high-level features such as "helical milling" and "cavity machining" from G-code and represent them as dense vectors for subsequent processing.

[0091] Symbolic reasoning module: Based on predefined machining knowledge rules, perform symbolic-level reasoning on the representations generated by the neural network. This module uses a weighted rule set , each rule Contains a precondition, an inference conclusion, and an associated weight . Among them, Represents the entire set of symbolic rules; , , Respectively represent the , , th rule, Represents the total number of rules.

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

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

[0094] Probabilistic rules: For example, "If the tool is moving inside the cavity and the speed is slow, then the operation intention may be finish machining, with a confidence of 0.8";

[0095] The symbolic rules are represented in the form of Horn clauses, for example:

[0096] ;

[0097] where, represents the identifier of the current instruction or operation, represents that the type of the operation is "rapid positioning", represents the instruction is of the type "G00". This rule indicates that when a G00 instruction is detected, the system will interpret it as a rapid positioning operation.

[0098] ;

[0099] where, represents the identifier of the current instruction or operation, represents that the intention of the operation is "finish machining", represents the position of the operation is "inside the cavity", represents the feed rate of the operation is "low speed", represents the logical "AND" operation. This rule indicates that when the tool is inside the cavity and the feed rate is low, the system will infer that the machining intention is finish machining.

[0100] In practical applications, such as in the machining process of an aeroengine blisk, the symbolic reasoning module can infer the programmer's intention of "avoiding excessive cutting at the blade root" based on the tool movement trajectory and machining parameters, so as to maintain an appropriate cutting-in angle and feed rate during interruption recovery.

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

[0102] ;

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

[0104] In the embodiments of the present application, the adaptive weight coefficient is dynamically adjusted according to the confidence levels of the neural representation and the symbolic reasoning result. The calculation method is:

[0105] ;

[0106] where is the adaptive weight coefficient, with a value range from 0 to 1; is the S-shaped activation function, used to map the output to the 0-1 interval; is the weight matrix, controlling the influence degree of the confidence level on the fusion weight; represents the vector formed by concatenating the neural representation confidence level and the symbolic reasoning confidence level. is the vector concatenation operation; represents the representation vector generated by the neural network 's confidence score; represents the symbolic reasoning result 's confidence score; is the bias term, used to adjust the baseline value of the fusion weight. When is close to 1, the final representation is more inclined to adopt the result of the neural network; when is close to 0, it is more inclined to adopt the result of symbolic reasoning.

[0107] Step 2.2, establishing the bidirectional mapping relationship for program processing;

[0108] According to the embodiments of the present application, based on the joint representation model, the system constructs a bidirectional mapping relationship between G-code paragraphs and actual processing behaviors . This mapping relationship is established through the following steps:

[0109] Segment the machining program into semantically coherent code paragraphs , where represents the set of all code paragraphs, , , respectively represent the , , code paragraphs, represents the total number of code paragraphs. These code paragraphs are divided according to semantic relevance to ensure the consistency of G-code instructions within each paragraph in terms of function and purpose;

[0110] Define the machining behavior ontology, including the set of basic machining operations , where represents the set of all basic machining operations, , , respectively represent the , , machining operations, represents the total number of machining operations; each machining operation is further defined as a parameterized behavior description, including operation type, process parameters (feed rate, spindle speed, cutting depth, etc.), spatial position information, and process constraint conditions;

[0111] According to an embodiment of the present application, semantically coherent code paragraphs are determined by a hierarchical clustering algorithm, and the specific steps are as follows:

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

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

[0114] Truncate the clustering tree at an appropriate threshold to obtain semantically coherent code paragraphs.

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

[0116] Top layer: machining operation type (such as milling, drilling, tapping, etc.);

[0117] Middle layer: machining features (such as plane, cavity, hole system, etc.);

[0118] Bottom layer: specific parameterized operations (such as "milling a plane with a cutting depth of 5 mm at a feed rate of 10 mm / min").

[0119] In an implementation manner of the present application, the mapping function is implemented by a deep neural network and includes two parts: an encoder and a decoder:

[0120] Encoder: Encode the code paragraph into a semantic vector ;

[0121] Decoder: Decode the semantic vector into machining behaviors .

[0122] The mapping function is optimized by minimizing the following objective function:

[0123] ;

[0124] where is the overall loss function of the mapping function , denotes summation over all code segments, represents the total number of code segments, denotes the -th code segment, represents the prediction result of the mapping function for the code segment , is the standard machining behavior (true label) of the code segment , is the loss function measuring the difference between the prediction result and the true label, is the regularization term to prevent the model from overfitting, is the regularization coefficient controlling the regularization strength.

[0125] The loss function adopts a weighted combination form:

[0126] ;

[0127] where represents the loss function measuring the difference between the prediction result and the true label, used to evaluate the accuracy of the mapping function; represents the operation type loss function, 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, used to measure the difference between the predicted machining features (such as plane, cavity, hole system, etc.) and the actual features; represents the parameter loss function, used to measure the difference between the predicted specific parameters (such as feed rate, cutting depth, etc.) and the actual parameters; , , respectively represent the weight coefficients of the operation type loss function, machining feature loss function, and parameter loss function, used to adjust the importance ratio of the three losses in the total loss, usually satisfying and .

[0128] In specific application scenarios, such as the cavity machining of aerospace structural components, the program processing bidirectional mapping system of the present application can identify the following mapping relationships:

[0129] G-code paragraph "G01X100Y100Z-5F200" → "Perform face milling at the position (100, 100) with a feed rate of 200 mm / min and a depth of 5 mm";

[0130] G-code paragraph "G02X120Y120I10J10F150" → "Perform contour milling along a clockwise circular arc trajectory with a feed rate of 150 mm / min";

[0131] Such mapping relationships provide semantic-level understanding for interruption recovery. When the machine tool experiences an interruption while executing the second code segment above, the system can understand that the current operation being performed is "contour milling" and select an appropriate recovery strategy based on the characteristics of this operation.

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

[0133] The present application identifies the causal structure in the program and mines the implicit machining intention through a counterfactual analysis method. The specific implementation is as follows:

[0134] Construct a causal graph model of the machining program , where is the set of semantic nodes, is the set of causal relationship edges;

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

[0136] ;

[0137] where represents the program parameter, represents the machining result, represents the specific value of the program parameter , represents the specific observed value of the machining result , represents the joint probability that the parameter value is and the machining result is , represents the intervention operation of manually setting the parameter to , represents the conditional probability that the machining result is under the intervention operation, represents that when observing that the current parameter is and the result is In the case where the parameter is changed to the counterfactual conditional probability of the processing result.

[0138] Based on the conditional intervention probability, identify key causal relationships and infer the programmer's intention. For example, by analyzing the change patterns of parameters in certain G-code segments, it can be inferred that the programmer's possible intention is to "avoid overcutting" or "ensure surface finish", etc.

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

[0140] Node set includes program parameter nodes (such as feed rate, cutting depth) and processing result nodes (such as surface roughness, tool life);

[0141] Edge set represents the causal relationship from the parameter node to the result node, obtained by learning from historical processing data;

[0142] Adopt the Bayesian network structure learning algorithm to automatically discover the causal relationships between variables and correct them in combination with domain knowledge;

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

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

[0145] Structure learning based on observational data;

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

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

[0148] The first stage: Calculate the joint probability using Bayesian estimation , where represents the program parameter, represents a specific value of the parameter, represents the processing result, represents a specific observed value of the result, and this joint probability describes the probability that the parameter value and the processing result occur simultaneously;

[0149] The second stage: According to the causal graph structure, estimate the intervention probability through the Monte Carlo method , where represents the processing result, represents a specific observed value of the result, represents artificially setting the parameter to the value The intervention operation, and this intervention probability describes the conditional probability of the machining result after forcibly setting the parameter value, which is used to distinguish correlation and causality.

[0150] In an actual application scenario, such as the machining of titanium alloy aviation structural parts, the causal inference module of the present application can identify the machining intention from the following G-code paragraphs:

[0151] For the code segment:

[0152] G01X100Y100Z-1F50;

[0153] G01X200Y100Z-1F50;

[0154] G01X200Y200Z-1F30;

[0155] G01X100Y200Z-1F30;

[0156] G01X100Y100Z-1F50;

[0157] The system analysis finds that the feed rate drops from F50 to F30 when moving in the Y direction, while it remains F50 unchanged when moving in the X direction. Through causal graph analysis, the system infers that this parameter change has a causal relationship with "poor rigidity in the Y direction", thereby identifying the programmer's intention as "reducing vibration in the Y direction to improve machining accuracy".

[0158] This identified intention is crucial for interruption recovery. When an interruption occurs during the feed in the Y direction, the system will automatically resume at the lower feed rate F30 instead of simply resuming to the default rate, thus maintaining the machining strategy consistent with the original programmer's Figure 1 intention.

[0159] The intention recognition result is represented in the form of a triple: , where represents the operation subject, which is a G-code instruction. For example, G01X100Y100 represents a linear interpolation movement at the position X100Y100; represents the intention type, which describes the purpose of the instruction, such as avoiding collision, improving accuracy, reducing vibration, etc.; represents the object of the intention, which indicates the specific entity targeted by the intention, such as a workpiece fixture, a specific surface, a tool, etc.

[0160] For example, the triple indicates that the intention of the G01 linear movement instruction (moving to the position X100Y100) is to avoid collision with the workpiece fixture. This structured representation enables the system to precisely understand the machining intention behind each instruction.

[0161] Therefore, through the above neuro-symbolic reasoning process, the system can deeply understand the processing intention behind 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 outputs of the above semantic parsing, bidirectional mapping, and intention mining modules, this application constructs an adaptive recovery strategy generation system, and the specific implementation steps are as follows:

[0164] According to the breakpoint status information Construct the current machining environment model, where is the position information, is the machining tool status, is the environmental condition;

[0165] Retrieve the similar historical case library and select the most relevant historical recovery experience based on case similarity where represents the current breakpoint status information, represents the status information in the historical case library, represents the similarity calculation function between the two statuses, which is used to evaluate the matching degree between the current interruption status and the historical cases;

[0166] Adaptive Strategy Generation Algorithm Based on the target machining intention and the current status Generate the optimal recovery strategy:

[0167] ;

[0168] where represents the adaptive strategy generation algorithm, which is a function that maps the input to the recovery strategy; represents the target machining intention, which includes the original machining purpose and process requirements of the program designer; represents the current status, which is composed of the position information the machining tool status and the environmental condition ; represents the generated optimal recovery strategy, which includes the recovery path, process parameters, execution steps, etc.

[0169] Verify the safety and effectiveness of the generated strategy to ensure that it meets the machining requirements.

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

[0171] Status Evaluation Module:

[0172] This module is responsible for analyzing the exact status at the time of interruption, and 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 the Kalman filtering algorithm to fuse multi-source sensing data to reduce the influence of noise;

[0175] Construct a state vector , accurately characterizing the machining environment at the time of interruption.

[0176] The key to implementing this module lies in the accurate alignment of sensor data with the execution progress of G-code. This application adopts an event-based synchronization mechanism, inserts feature points into the G-code, and realizes accurate alignment by monitoring the sensor responses corresponding to these feature points.

[0177] For example, when executing a certain position instruction (such as G01X100Y100), the system will record all sensor data at this moment and associate it with this G-code line to form a status snapshot. When an interruption occurs, the system can accurately locate the last executed G-code line and the corresponding machine tool status.

[0178] Case Base Construction and Retrieval Module:

[0179] In order to utilize historical experience, this application constructs a structured case base, and the implementation method is as follows:

[0180] Case Representation: Each case contains a quadruple , , , , , which respectively represent status, intention, recovery strategy, and effect evaluation;

[0181] Similarity Calculation: Use the weighted Euclidean distance to calculate the status similarity, and the weights are automatically adjusted based on the importance of attributes;

[0182] Retrieval Algorithm: Use the KD tree to accelerate the nearest neighbor search and combine semantic similarity filtering.

[0183] The case base supports incremental learning. After the system successfully processes an interruption each time, it will automatically add new cases to the library and update the weight parameters for similarity calculation.

[0184] In practical applications, for example, when dealing with interruptions in complex surface milling, the system may retrieve the following cases:

[0185] Case ID: 135:

[0186] Interruption Status: {Location: (X: 156.3, Y: 89.7, Z: -15.2), Cutting Status: "Surface Milling", Tool: "Ball End Mill φ10"};

[0187] Machining Intention: {Maintain surface finish and avoid step marks};

[0188] Recovery Strategy: {Retraction Height: 2mm, Return Path: "Arc Approach", Pre-Cutting Distance: 5mm, Recovery Feed Rate: 80%};

[0189] Effect Evaluation: {Success Rate: 95%, Surface Defects: "No Visible Marks"}.

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

[0191] Strategy Generation and Optimization Module:

[0192] This module generates the optimal recovery strategy based on the current status, recognized intention, and similar cases, and the implementation method is as follows:

[0193] Multi-Objective Optimization Framework: Consider machining quality, efficiency, and safety simultaneously;

[0194] Strategy Parameterization: Parameterize the recovery strategy as a vector ;

[0195] Optimization Algorithm: Adopt a model-based reinforcement learning method to optimize the parameters by simulating the effects of different recovery strategies.

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

[0197] ;

[0198] Among them, represents the comprehensive evaluation function of the recovery strategy parameter vector ; , , 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 machining task; is the quality evaluation function, which is used to evaluate the impact of the recovery strategy on machining quality; is the efficiency evaluation function, which is used to evaluate the time efficiency and resource consumption of the recovery strategy; is the safety evaluation function, which is used to evaluate the safety risks and reliability of the recovery strategy; is the recovery strategy parameter vector, which includes key parameters such as retraction height, approach path type, pre-cutting distance, and recovery feed rate.

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

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

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

[0202] Re-entry point determination: Based on the interruption location and machining intent, select the best re-entry point;

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

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

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

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

[0207] Specifically, it includes the following sub-steps:

[0208] Step 3.1: Experience representation based on multi-source data;

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

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

[0211] Each experience record is represented as a six-tuple , where is the interruption status description; is the machining intent representation; is the recovery strategy adopted; is the observed execution result; is the quality evaluation index; is the analysis of interpretable failure / success factors.

[0212] Organize the experience using a graph structure to construct an experience knowledge graph , where the vertex is the experience entity, and the edge is the relationship between entities;

[0213] Design an attention mechanism-based graph convolutional network to achieve efficient encoding and retrieval of empirical representations.

[0214] For example, for the interruption recovery experience in the machining of an aluminum alloy thin-walled part, the system will construct the following representation:

[0215] "Experience ID: E-20230512-007

[0216] Interruption status (S): {

[0217] "Machining stage": "Finish machining",

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

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

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

[0221] "Workpiece feature": "Thin-walled structure (thickness 3mm)",

[0222] "Reason for interruption": "Temporary power outage"

[0223] }

[0224] Machining intention (I): {

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

[0226] "Secondary constraints": ["Avoid thin-walled 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 recover to 100%",

[0232] "Cooling strategy": "Enhanced cooling",

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

[0234] }

[0235] Execution result (O): "Successfully completed recovery, 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): "The pre-cutting distance is sufficient to avoid the impact caused by direct cutting; the progressive feed rate prevents the deformation of thin walls."

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

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

[0244] An experience priority evaluation algorithm based on uncertainty sampling to quantify the experience value:

[0245] ;

[0246] Among them, represents the priority evaluation value of the experience, which is used to determine the importance of the experience in the learning process; represents the novelty of the experience, which measures the difference between this experience and the experiences in the existing knowledge base. The higher the value, the more unique the experience; represents the success degree of the experience, which quantifies the effect after the application of this experience. The higher the value, the better the recovery effect; represents the applicable scope of the experience, which evaluates the wide range of scenarios where this experience can be applied. The higher the value, the stronger the applicability; , , respectively represent the weight coefficients of novelty, success degree and applicable scope. These coefficients will be dynamically adjusted according to the system operation stage to meet the needs of different learning stages.

[0247] Adopt the Bayesian inference framework for experience fusion to solve the experience conflict problem:

[0248] ;

[0249] Among them, is the fused experience knowledge, representing the comprehensive experience formed after the fusion of multiple experiences; is the observed actual machining interruption data, including measured information such as interruption status and process parameters; is the prior experience distribution, representing the initial confidence of the system in experience knowledge before obtaining new data; is the likelihood function, representing the probability of observing the data under the condition of given empirical knowledge ; is the posterior probability, representing the updated confidence in the empirical knowledge after observing the data . This Bayesian formula realizes the dynamic update and fusion of empirical knowledge.

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

[0251] ;

[0252] where is the total loss function of empirical learning, represents the total number of empirical samples, is the weight of the th empirical sample, is the loss function, used to measure the difference between the model's predicted value and the true value, which can be the mean square error function, cross-entropy function, or a custom recovery strategy evaluation function. Different loss function forms are selected according to different recovery scenarios, represents the predicted output of the model for the input , is the true label or expected output of the th empirical sample. This formula comprehensively considers various empirical samples through weighting, enabling the system to learn from both successful and failed cases simultaneously.

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

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

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

[0256] An empirical forgetting mechanism to eliminate outdated or low-value experience through a time decay function:

[0257] ;

[0258] where represents the relevance value of the experience at the current time , represents the initial relevance value of the experience , is the current time, is the experience acquisition time, is the decay coefficient (controlling the rate at which the empirical correlation decays over time), is the base of the natural logarithm. This formula implements the mechanism of exponential decay of empirical value over time, enabling the system to gradually eliminate outdated empirical knowledge.

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

[0260] Active learning strategy: The system actively identifies weak areas in the empirical knowledge graph and generates learning tasks.

[0261] Step 3 Application example:

[0262] Taking the machining of aero-engine blisks as an example, demonstrate the self-evolution learning process of the system:

[0263] Initial stage: The system only has basic recovery rules and has limited ability to handle special interruption situations. When initially dealing with a tool breakage interruption during high-speed cutting, the system uses a general strategy and the recovery effect is not good, with obvious seams on the surface.

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

[0265] Knowledge fusion: The system fuses the newly acquired experience with the existing knowledge, updates the parameters of the recovery strategy generation algorithm, and at the same time establishes a new rule: For high-speed cutting interruption of cemented carbide, the "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 blisk machining and applies it to the machining of other thin-walled complex parts, and automatically adjusts parameters according to material and structural differences.

[0268] Through the above self-evolution learning mechanism, this system can accumulate experience from each interruption recovery practice, continuously improve the recovery strategy, and finally achieve the intelligence and self-optimization of the machine tool machining interruption recovery process.

[0269] Step 4, based on the intent graph and the learned experience, locate the interruption recovery point and accurately find the optimal recovery position;

[0270] Specifically, it includes the following sub-steps:

[0271] Step 4.1, Interruption status detection and feature extraction;

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

[0273] Program execution location: By reading the value of the program counter recorded by the machine tool control system, determine the program line number being executed at the time of interruption;

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

[0275] Processing process parameters: such as sensor data of cutting force, temperature, vibration, etc.;

[0276] Interruption type judgment: According to the error code or exception signal, judge the specific cause of the interruption, such as power interruption, emergency stop, program error, etc.

[0277] In addition, feature extraction is performed on the obtained status information to construct an interruption feature vector , where , , respectively represent the features of the , , th specific dimension, such as position deviation, parameter abnormality degree, etc.; represents the total number of interruption features.

[0278] Step 4.2, precise positioning of the interruption point in the knowledge graph;

[0279] Based on the interruption feature vector, the present application precisely locates the interruption point in the knowledge graph constructed in the first step. The specific steps are as follows:

[0280] Preliminary positioning: According to the value of the program counter, find the corresponding node in the knowledge graph ;

[0281] Context analysis: Examine the local graph structure of the node , that is, its set of previous nodes and the set of subsequent nodes , and analyze the semantic environment of the interruption point;

[0282] Status verification: Compare the interruption feature vector with the expected status of the node , and calculate the status matching degree:

[0283] ;

[0284] where represents the interruption point node in the knowledge graph, represents the interruption feature vector, represents the status matching degree; represents the th component of the interruption feature vector, represents the expected eigenvalue of the node; is the similarity function, used to calculate the similarity between the actual eigenvalue and the expected eigenvalue; is the feature weight, representing the th feature's importance in the matching calculation; represents the dimension of the feature vector, that is, the total number of features. The formula calculates the weighted average feature matching degree, used to evaluate the matching degree between the detected interruption state and the expected state of the node in the knowledge graph.

[0285] Corrected positioning: If the state matching degree is lower than the threshold, consider the neighboring nodes of the node to find the most matching actual interruption point .

[0286] Step 4.3, Optimal Recovery Point Identification Algorithm;

[0287] After accurately positioning the interruption point, the system of the present 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] Integrity of machining features: Tend to recover at the boundaries of machining features to avoid discontinuity caused by recovery inside the features;

[0289] Process continuity: Consider the continuity of process parameters and avoid recovery at sharp parameter changes;

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

[0291] The optimal recovery point identification adopts the shortest path algorithm on the graph, defined as:

[0292] ;

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

[0294] ;

[0295] where, represents from node The shortest weighted path distance to the node ; Denote all possible path sets from the node to the node ; Denote a specific path in Denote the path an edge on the path Denote finding the path with the minimum weight sum among all possible paths Denote the path the total weight sum of all edges on the path

[0296] For each edge on the path the weight Comprehensively consider the following factors:

[0297] ;

[0298] Among them, Denote the weight of each edge on the path ; Denote the edge the weight on the dimension of machining feature integrity, reflecting the degree to which passing through this edge will cause the machining feature to be incompletely executed Denote the edge the weight on the dimension of process continuity, measuring the smoothness of the change of process parameters (such as cutting speed, feed rate, etc.) when passing through this edge Denote the edge the weight on the dimension of safety, evaluating the collision risk or the possibility of tool damage that may be brought by passing through this edge , , respectively denote the balance coefficients of the three dimensions of feature integrity, process continuity and safety, which are used to adjust the relative importance of the three factors in the final path selection and satisfy the normalization constraint condition: . By adjusting these coefficients, the system can flexibly determine the optimal recovery point according to the characteristics of different machining tasks and interruption situations

[0299] Step 4.4, Machining feature and process continuity constraints

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

[0301] Machining feature integrity constraint:

[0302] In this application, define the machining feature set where, , , respectively represent the rd, th, th machining feature; represents the total number of machining features. For the case where the interruption occurs inside the feature , the system preferentially selects the starting node of the feature as the recovery point, that is:

[0303] ;

[0304] Among them, represents the selected recovery point, represents the starting operation node of the feature , represents the machining feature where the current interruption is located. 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 constraint:

[0306] For regions with significant changes in process parameters, this application defines process-sensitive regions , and the system avoids setting the recovery point within the sensitive regions, that is:

[0307] ;

[0308] Among them, represents the set of process-sensitive regions, which contains multiple sensitive regions; represents the recovery point selected by the system; represents that the selected recovery point should not be located within any process-sensitive region, which is to ensure a smooth transition during the resumption of machining and avoid machining quality problems caused by resuming at locations with drastic changes in process parameters.

[0309] Therefore, through the above algorithms and constraint conditions, the system of this application can accurately locate the breakpoint in the complex G-code knowledge graph and identify the optimal recovery point to ensure the smooth progress of the subsequent recovery process and the continuity of machining quality.

[0310] Step 5, generate an interruption recovery strategy based on the located recovery point and execute it to achieve a smooth resumption of the machining process;

[0311] Specifically, it includes the following sub-steps:

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

[0313] According to the embodiments of this application, based on the recovery point, the system generates a recovery path and optimizes the machining parameters. The recovery path planning considers the following factors:

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

[0315] Smoothing transition of process parameters: To ensure the smoothness of the recovery process, the system constructs a progressive adjustment method for process parameters. For cutting speed , feed rate and cutting depth and other key parameters, a smoothing function is used for transition:

[0316] ;

[0317] Among them, is the parameter value at time , representing the actual value of the process parameter at a certain moment during the transition; is the starting value, representing the initial process parameter value at the start of recovery; is the target value, representing the process parameter value to be achieved after recovery; is the normalized transition time parameter, with a value range of , represents the start time of the transition, represents the end time of the transition; represents the total change in the parameter; is the smoothing function, used to control the rate and curve shape of the parameter change, satisfying (no change at the initial moment), (reaching the target value at the end moment), usually using an S-shaped curve to ensure the smoothness and continuity of the parameter change:

[0318] ;

[0319] Among them, represents the smoothing transition function, used to achieve the 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, 0 representing the start time of the transition, and 1 representing the end time of the transition; is the classic cubic Hermite interpolation polynomial, with the property that the first derivative is 0 at and , ensuring a smooth change rate at the start and end points of the transition; represents that the value range of the parameter is restricted between 0 and 1.

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

[0321] ;

[0322] Among them, represents the trajectory compensation amount, that is, the position adjustment amount that needs to be made to the original trajectory; is the workpiece temperature field, which describes the temperature distribution state of each point of the workpiece; is the interruption duration, indicating the time interval elapsed from the processing interruption to the resumption; is the material property parameter, including material properties such as the coefficient of thermal expansion and thermal conductivity that affect the deformation of the workpiece; is the compensation function, which is used to calculate the final trajectory compensation amount according to the input parameters, and 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 , and each control point contains complete state information such as position, velocity, and acceleration. Among them, represents the sequence of control points of the recovery path, which is an ordered set; , , respectively represent the , , rd control points in the sequence; represents 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 and generates a modified program containing the recovery sequence. The program reorganization process includes:

[0326] Program slicing: The original machining program is sliced into an executed part and a 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 the recovery sequence , among which, represents the complete recovery sequence, which is an ordered set of G-code instructions; , , respectively represent the , , rd G-code instructions in the recovery sequence, which may include motion instructions, process parameter setting instructions, etc.; represents the total number of G-code instructions in the recovery sequence; the recovery sequence includes a series of instructions such as retracting to a safe height, rapid positioning, gradual approach, pre-cutting, and parameter adjustment;

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

[0329] ;

[0330] Among them, represents the finally generated recovery execution program, represents the recovery sequence generated by the system (including a series of instructions to safely approach the recovery point from the current position), represents the unexecuted part of the original machining program, represents the set union operation, which means merging the two parts of program code in sequence into a complete execution program.

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

[0332] For interruptions such as temporary shutdowns, recovery is performed in relative coordinate mode;

[0333] For power failure interruptions, recovery is performed in absolute coordinate mode;

[0334] For emergency stop interruptions, additional safety check codes are added.

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

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

[0337] Status monitoring: Real-time collect the machine tool execution status data, including position error, cutting force, vibration, etc.;

[0338] Abnormality detection: Based on the real-time status data, detect possible abnormal situations:

[0339] ;

[0340] Among them, represents detecting the abnormal situation of the current state, is the current state, which represents the set of real-time state parameters during the machine tool 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; is the distance function, which is used to calculate the deviation degree between the current state and the expected state, and measurement methods such as Euclidean distance and Mahalanobis distance can be adopted; is a threshold value, representing the maximum deviation value acceptable to the system. If it exceeds this threshold, it is determined to be an abnormal state that requires intervention. When equals 1, it indicates that an abnormality is detected; when it equals 0, it indicates that the system is operating normally.

[0341] Adaptive adjustment: When an abnormality is detected, the system takes corresponding adjustment measures:

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

[0343] For medium deviations, correct the trajectory;

[0344] For severe deviations, pause execution and re-plan.

[0345] In this application, the adjustment measures are implemented through a real-time interpolator, and there is no need to regenerate the entire recovery program. The adaptive adjustment uses a feedback control strategy:

[0346] ;

[0347] Among them, 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 desired state; represents the error at the previous moment; represents from the start to the current moment 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 intensity to the cumulative error; represents the derivative coefficient, which controls the response intensity to the error change rate. 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 multi-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 precision of the recovery process, and finally achieve the completion of high-quality machining tasks.

[0349] Application example of this embodiment:

[0350] To verify the technical effects of this application, the following provides an actual application case in the machining process of a certain complex structural part in the aerospace field.

[0351] In this case, a large aeroengine turbine disk was machined. The disk is made of high-temperature alloy TC4 material, with an overall diameter of 600 mm and a single-piece material cost of about 150,000 yuan. The machining program contains approximately 85,000 lines of G-code, with a machining cycle of 22 hours, involving multiple process stages such as rough machining, finish machining, and feature machining.

[0352] In actual production, the machining process of this disk was interrupted due to a temporary power outage in the factory. The interruption occurred during the finish machining stage of the blade cavity, at which point approximately 65% of the machining progress had been completed. Due to the complex curved surface and strict dimensional accuracy requirements (tolerance requirement of ±0.02 mm) of the blade cavity, it is difficult to meet the requirements using traditional interruption recovery methods, and there is a risk of workpiece scrapping.

[0353] Implementation process example:

[0354] Code semantic parsing and graph structure conversion:

[0355] The system first preprocessed and analyzed the machining program of the turbine disk:

[0356] G-code preprocessing: The system identified that the machining program contains 8 main process stages and 25 machining features. The breakpoint is located at the 12th feature of the 6th process stage (finish machining of the blade cavity).

[0357] Semantic extraction: Conducted an in-depth analysis of the G-code segment near the interruption. The following is a segment of G-code near the breakpoint and its semantic parsing 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 segment of code belongs to the "finish machining of the blade leading edge" operation, adopting a progressive deceleration feed strategy (F150→F80), with the intention of controlling the cutting force and maintaining the surface finish.

[0364] Knowledge Graph Construction: The system converts the above G-code into a graph structure. The breakpoint corresponding node contains the following key attributes:

[0365] Node Type: Circular arc interpolation instruction;

[0366] Machining Feature: Blade leading edge;

[0367] Process Characteristic: Finish machining;

[0368] Special Strategy: Progressive speed reduction;

[0369] Related Parameters: Cutting speed 80 mm / min, tool Φ6 ball end mill.

[0370] Neuro-symbolic Reasoning of Machining Intention:

[0371] The system analyzed the code segment near the breakpoint through a neuro-symbolic joint representation model. The key reasoning process is as follows:

[0372] Neuro-representation Learning: The graph neural network extracted the distributed representation vector of this code segment. The core features include "continuous circular arc feature" and "feed rate gradient change";

[0373] Symbolic Rule Reasoning: Applying the tool-workpiece interaction rule library, it was identified that the machining intention of this code segment is "to control the cutting force distribution at the blade leading edge to avoid vibration";

[0374] Causality Analysis: Through counterfactual analysis, the system determined that the gradual adjustment of the feed rate has a significant causal relationship with "stability control of the leading edge thin-walled area", rather than simply for efficiency improvement.

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

[0376] Self-evolving Learning of Machining Experience:

[0377] The system retrieved the experience library and found 3 similar machining interruption cases. After similarity calculation, the closest case is "Engine Compressor Blade Finish Machining Interruption Case E-2022063", with a similarity of 0.86. The key recovery strategy for this case is "Pre-cutting distance 10 mm + Progressive feed recovery".

[0378] The system borrowed this strategy and made an adaptive adjustment according to the current interruption characteristics:

[0379] Increase the pre-cutting distance to 12 mm (due to the smaller blade thickness in this example);

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

[0381] Add a smooth transition section to the tool path to avoid seam marks.

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

[0383] Status (S): {Workpiece = TC4 turbine disk, Interruption position = leading edge of the blade, Tool = Φ6 ball-end milling cutter, Stage = finish machining};

[0384] Intention (I): {Primary = surface finish control, Secondary = avoid thin-wall deformation};

[0385] Strategy (R): {Pre-cut distance = 12 mm, Feed recovery = S-curve, Trajectory = smooth transition};

[0386] Result (O): {No obvious seam on the surface, 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, Machining direction consistent with the texture}.

[0389] Interruption recovery point positioning based on the intention graph:

[0390] By analyzing the machining intention and program structure, the system finds that the interruption point (G02 instruction) is located in the middle of the finish machining stage at the leading edge of the blade. Directly resuming from this point may cause surface discontinuity.

[0391] The system applies the optimal recovery point recognition algorithm to calculate the weighted path distances of multiple candidate recovery points:

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

[0393] Current tool path start point (node ): d = 5.63, which is the start point of the current cavity contour;

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

[0395] Taking into account the factors of feature integrity, process continuity, and safety, the system selects node (current tool path start point) as the optimal recovery point to ensure the complete machining of a closed contour feature.

[0396] Interruption recovery strategy generation and execution:

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

[0398] Recovery path planning:

[0399] Retract at a safe height: Z = 50 mm;

[0400] Rapidly position 5 mm above the recovery point;

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

[0402] Set the pre-cutting distance to 12 mm to ensure a smooth cutting transition;

[0403] Process parameter optimization:

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

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

[0406] Keep the spindle speed unchanged (N = 6000 r / min);

[0407] Program restructuring and code generation: The system restructured the G-code to generate a recovery program containing the following key parts:

[0408] Machine tool initialization section;

[0409] Tool detection and compensation section;

[0410] Safe approach section;

[0411] Pre-cutting path section;

[0412] Parameter gradual recovery section;

[0413] The remaining part of the original program;

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

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

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

[0417] Surface generation quality: Monitored in real time by an optical sensor deployed on the machine tool.

[0418] Technical effect verification:

[0419] The method of this application was applied to the above turbine disk machining interruption recovery case, and significant technical effects were obtained. The main verification data is as follows:

[0420] Recovery accuracy and machining quality:

[0421] Precision measurements were carried out on the restored blisk after machining, and the measurement results showed that:

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

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

[0424] There were no visible traces at the restored joint, and the continuity detection results showed that the curvature transition was smooth, meeting the strict quality requirements of the aeroengine blisk.

[0425] This proves that the method of this application can achieve high-precision interruption recovery and ensure the consistency of the machining quality with the non-interrupted area.

[0426] Recovery efficiency and resource conservation:

[0427] Using the traditional manual intervention method, the interruption recovery of this type of turbine blisk generally requires 5 - 8 hours for expert-level technicians to complete the recovery plan design and implementation, with a success rate of about 50% and a high risk of workpiece scrapping.

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

[0429] Considering that the material cost of a single-piece turbine blisk is about 150,000 yuan and the machining cost is about 50,000 yuan, this method saves a huge economic cost and reduces the extension of the production cycle caused by workpiece scrapping.

[0430] At the same time, the experience obtained by the system from this successful recovery has been added to the experience library, further improving the processing ability for subsequent similar machining interruptions, and the self-evolution learning effect is obvious.

[0431] In summary, the application of this embodiment in the actual machining scenario of key parts of aeroengines fully verifies the effectiveness, accuracy, and efficiency of the method for interrupt recovery of machine tool processing files based on neuro-symbolic reasoning proposed in this application, providing a reliable processing interruption recovery solution for high-end manufacturing fields such as aerospace.

[0432] The above describes the embodiments of the present invention, but these embodiments are not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative and not restrictive. Under the inspiration of this embodiment, those of ordinary skill in the art can also make more equivalent embodiments in various forms, all of which fall within the protection scope of this embodiment.

Claims

1. An interruption recovery method for a machine tool processing file, characterized in that, It includes the following steps: Perform G-code semantic parsing and graph structure conversion to convert the G-code machining program into a structured knowledge graph with semantic associations; Perform neuro-symbolic reasoning based on the knowledge graph, perform machining intention reasoning based on neuro-symbolic reasoning, understand the deep machining intention behind the program, and construct an intention graph; Combine historical data to achieve self-evolving learning of machining experience, continuously learn and optimize the recovery strategy from historical experience; Locate the interruption recovery point based on the intention graph and the learned experience, and accurately find the optimal recovery position; Generate an interruption recovery strategy according to the located recovery point and execute it to achieve a smooth recovery of the machining process.

2. The interruption recovery method of a machine tool processing file according to claim 1, wherein The performing of G-code semantic parsing and graph structure conversion includes the following steps: G-code preprocessing and lexical analysis, which slice the original G-code file into basic morpheme units; Syntax structure analysis and semantic extraction, which construct a syntax tree and map it to a predefined semantic model; Knowledge graph construction and structured representation, which establish a graph structure representing the semantic units and their relationships of the machining program.

3. The interruption recovery method of a machine tool processing file according to claim 1, wherein, The performing of machining intention reasoning based on neuro-symbolic reasoning includes the following steps: Construct a neuro-symbolic joint representation model, which fuses neural network and symbolic reasoning; Establish a two-way mapping relationship between program machining to understand the correspondence between code segments and machining behaviors; Mine machining intention based on causal reasoning to identify the causal structure in the program; Construct an adaptive recovery strategy generation system to generate the optimal recovery plan according to the intention.

4. The method for interrupt recovery of a machine tool processing file according to claim 3, wherein, The neuro-symbolic joint representation model includes a neural representation learning module and a symbolic reasoning module. The two interact through an attention mechanism to form a joint representation. The joint representation vector is weighted and combined by the neural representation and the symbolic reasoning result 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 result.

5. The interruption recovery method of a machine tool processing file according to claim 1, wherein, The combination of historical data to achieve self-evolving learning of machining experience includes the following steps: Construct an experience representation framework based on multi-source data to structure the machining experience; Achieve adaptive experience extraction and fusion to improve the quality of experience learning; Establish a self-evolving mechanism for experience knowledge to achieve continuous optimization and update of knowledge.

6. The interruption recovery method of a machine tool processing file according to claim 1, characterized in that The locating of the interruption recovery point based on the intention graph and the learned experience includes the following steps: Interruption state detection and feature extraction to obtain the key information at the interruption moment; Precisely locate the interruption point in the knowledge graph and identify the semantic environment where the interruption occurs; Apply the optimal recovery point recognition algorithm to determine the most suitable position for recovery; Consider machining features and process continuity constraints to ensure the rationality of the recovery point.

7. A method for interrupt recovery of a machine tool processing file according to claim 6, characterized in that, The optimal recovery point recognition uses the shortest path algorithm on the graph to select the point with the smallest weighted path distance from the candidate recovery point set to the actual interruption point as the optimal recovery point. The weighted path distance comprehensively considers factors such as feature integrity, process continuity, and safety.

8. A method for interrupt recovery of a machine tool processing file according to claim 1, characterized in that, The generating of an interruption recovery strategy according to the located recovery point and the execution includes the following steps: Perform recovery path planning and process parameter optimization to design a safe approach path; Perform program recombination and code generation to generate a modified program containing the recovery sequence; Execute monitoring and real-time adjustment to adjust the recovery process according to the feedback.

9. The interruption recovery method for a machine tool processing file according to claim 8, characterized in that, The process parameters are transitioned using a smoothing function to smoothly transition the parameter values from the starting value to the target value, where an S-shaped smoothing function is used to ensure the continuity and smoothness of the parameter changes.

10. An interruption recovery system for a machine tool processing file, which is used to execute an interruption recovery method for a machine tool processing file according to any one of claims 1-9, characterized in that, It includes: A G-code semantic parsing and graph structure conversion module for converting G-code machining programs into a structured knowledge graph with semantic associations; A neuro-symbolic reasoning module for understanding the deep machining intent behind the program and constructing an intent graph; A machining experience self-evolving learning module for continuously learning and optimizing recovery strategies from historical experiences; An interruption recovery point positioning module for precisely finding the optimal recovery position based on the intent graph and the learned experiences; A recovery strategy generation and execution module for generating an interruption recovery strategy according to the located recovery point and executing it to achieve a smooth recovery of the machining 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

  • Restart of profiling operation

    JP1984152050A

  • Interruption recovery method for machine tool machining file and machine tool applying same

    WO2019042976A1

Cited By

  • Method, medium and equipment for quickly scanning and positioning G code specified line of numerical control system

    CN121680934A