A CNC machining decision constraint checking and self-learning method and system

By acquiring real-time status information of machine tools and cutting tools, generating and verifying machining decisions, and independently updating model parameters, the problems of disconnection between physical closed loop and control chain and static mismatch of constraint boundaries in CNC machining are solved, thus achieving safe and efficient machining control.

CN123047273APending Publication Date: 2026-11-06HEFEI KONA SHIXIN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611271031.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing CNC machining decision-making methods suffer from problems such as a disconnect between the physical closed loop and the control chain, a coarse and logically chaotic model update strategy, and static and mismatched constraint boundaries.

Method used

By storing machine tool type and tool type parameters in a static ontology database, the system obtains real-time health index, wear amount, and dynamic stiffness of specific machine tool and tool batches, generates candidate machining decisions, calculates predicted physical quantities, performs verification and projection correction, independently updates the model parameters of each physical channel, directly drives the CNC controller to execute machining, and implements safety protection.

Benefits of technology

It realizes real-time state-driven dynamic boundary verification and closed-loop control, reduces the probability of equipment overload, provides real-time safety protection, improves processing safety and efficiency, and reduces the waste of computing resources and model pollution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123047273A_ABST
    Figure CN123047273A_ABST
Patent Text Reader

Abstract

The application discloses a CNC machining decision constraint checking and self-learning method and system, the method comprises the following steps: storing type-level parameters, constructing a dynamic state vector, and generating a candidate machining decision; determining a dynamic legal solution space; checking the candidate machining decision; independently performing hierarchical residual judgment and differential model updating on each channel; the application has the advantages that the control breakpoint between recommendation and execution is eliminated, the constraint boundary of the candidate decision is dynamically calculated according to the real-time physical state of a specific machine tool and a specific tool batch, numerical checking and projection correction are performed on the candidate decision, and the CNC controller is directly driven to execute machining, when the measured physical quantity exceeds the limit during the execution process, hierarchical safety protection intervention is implemented, hierarchical residual judgment is independently performed on each physical channel, and differential closed-loop updating is performed on the digital twin simulation parameters, boundary prediction experience coefficients and decision generation model parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of numerical control (CNC) control and computer-aided manufacturing (CAM) technology, specifically to a CNC machining decision constraint verification and self-learning method and system. Background Technology

[0002] Currently, CNC quoting, CAM programming, and production execution systems are generally deployed independently. In recent years, technical solutions using neural networks or deep reinforcement learning for cutting parameter recommendation have emerged, but the following engineering problems still exist that can be solved through technical means.

[0003] First, existing cutting parameter recommendation methods do not establish numerical constraints between the candidate decisions generated and the real-time physical load conditions of specific machine tools and cutting tools. These candidate decisions may simultaneously exceed multiple physical boundaries, such as power and tool load, leading to machine tool overload, abnormal vibration, or premature tool failure. Furthermore, existing methods often stop at outputting recommended parameters, failing to establish a direct, closed-loop technical link between the verified decisions and the actual actions issued by the CNC controller, as well as the safety protection commands during execution. This results in a break in the control chain: even if the recommended parameters undergo some form of check, the check results are not directly translated into control signals for the machining equipment, and no protective intervention implemented by the same system is provided during the execution phase to address situations where measured physical quantities exceed limits.

[0004] Second, existing digital twin simulation parameters and decision generation model parameters are mostly set offline once, or adopt an indiscriminate synchronous update strategy. This fails to distinguish the essential differences in computational cost and triggering conditions between the two types of updates: "recalibration of physical layer model (digital twin parameters, boundary prediction empirical formula)" and "retraining of decision network parameters." It also fails to consider the fact that the sources of deviation in different physical channels such as power, torque, and vibration are independent of each other and should be judged and updated separately. Instead, it triggers updates in a general way based on a single comprehensive index, which leads to the improper transmission of deviation in one channel to the model parameters of other channels that have not experienced deviation. This wastes computational resources and may also contaminate the originally accurate model.

[0005] Third, existing methods mostly use type-level static parameters to calculate constraint boundaries, that is, they use the rated parameters of machine tool model and tool model as the constraint basis, without parameterizing the current degradation state of specific machine tool and tool batch (such as declining health index, tool wear, and dynamic stiffness decay) into the boundary calculation. This results in a mismatch between the constraint boundary and the actual state of the machined object: for severely degraded equipment, the static boundary is too loose and poses a safety risk; for equipment in good condition, the static boundary may be too conservative and sacrifice machining efficiency. Summary of the Invention

[0006] The technical problem to be solved by this invention is that the physical closed loop and control chain of existing CNC machining decision-making methods are disconnected, the model update strategy is coarse and logically chaotic, and the constraint boundaries are static and mismatched.

[0007] This invention solves the above-mentioned technical problems through the following technical means: a CNC machining decision constraint verification and self-learning method, comprising: S1. Store the type-level parameters corresponding to machine tool type and tool type to the static ontology database; S2. Obtain the real-time health index, coordinate offset, tool wear amount and dynamic stiffness of a specific machine tool and a specific batch of cutting tools to form a dynamic state vector; S3. Generate candidate machining decisions based on the geometric features and dynamic state vector of the part to be machined; S4. Calculate at least two of the predicted physical quantities among the predicted power, predicted torque, predicted tool load, and predicted vibration amplitude corresponding to the candidate machining decision, and determine the dynamic legal solution space. S5. Verify the candidate machining decisions. If the constraints are exceeded, solve the numerical projection with the smallest weighted distance to obtain the corrected machining decision. If there is no feasible solution, output a rejection signal and constraint item identifier. If there is a corrected machining decision, send it to the CNC controller through the CNC controller communication interface to drive the machine tool to perform machining. S6. Independently perform graded residual judgment and differentiated model update for power channel, torque channel and vibration channel.

[0008] Furthermore, the type-level parameters include rated spindle power. Rated torque Allowable load for tool type Cutting tool diameter and material type to cutting force coefficient .

[0009] Furthermore, the dynamic state vector includes three types of states: historical state, current state, and future state. The historical state includes the cumulative working time. And historical maintenance records; current status includes real-time health indices. Tool wear Coordinate offset and dynamic stiffness The future state includes the planned trajectory of this mission and the predicted values ​​from digital twin simulations. For entity indexing, referring to a specific batch of machine tools or cutting tools. This refers to the current moment.

[0010] Furthermore, the real-time health index is calculated using the following formula:

[0011] in, Theoretical service life working hours, This is the correction amount for performance degradation since the last maintenance. , The coefficients are obtained by regression from historical calibration data. This represents the lower limit of the health index.

[0012] Furthermore, S3 includes: The graph neural network takes the B-Rep face-edge adjacency graph of the CAD model of the part to be processed as input, and generates a 128-dimensional geometric feature vector through three layers of graph convolution and global pooling. A three-layer fully connected network takes the geometric feature vector as input, and a layer of LSTM takes the temporal features of the dynamic state vector as input. The outputs of the two branches are concatenated and then passed through a fully connected output layer to output the candidate processing decision. , For cutting speed, The feed per tooth. The axial cutting depth is defined by the graph neural network, the fully connected network, and the LSTM, which together form the candidate decision generation module.

[0013] Furthermore, the dynamic valid solution space is:

[0014] in, Indicates the predicted vibration amplitude. Indicates the upper limit of vibration amplitude. Indicates axial depth of cut The minimum lower limit of the process, Indicates feed per tooth The minimum lower limit of the process, To preset a safety factor, For wear correction items; Indicates cutting force. Indicates predicted power. Indicates the predicted torque;

[0015] The wear correction item is calculated using the following formula:

[0016] in, To preset the degradation coefficient, This represents the upper limit of tool wear. The predicted vibration amplitude is calculated using the following formula:

[0017] in, , , This is an empirical coefficient.

[0018] Furthermore, S5 includes: The first Candidate processing decision Substituting the above empirical models of cutting force, predicted power, predicted torque, allowable tool batch load, and predicted vibration amplitude, the predicted physical quantities are obtained and compared with... Compare; If all constraints are satisfied, then directly... As a correction of processing decisions ; If there are unsatisfied constraints, then solve the following numerical projection problem:

[0019] in, The preset positive definite weight matrix is ​​used; Iterate from the initial point. If convergence is not achieved within the preset maximum number of iterations, then... A grid search is performed within the preset neighborhood, and the point that satisfies the constraints and has the smallest weighted distance is selected as the target. If no feasible solution exists within the preset search range, a rejection signal and the corresponding constraint identifier will be output, and the candidate processing decision will not be executed; if a feasible solution exists... The system converts these into feed rate, spindle speed, and depth of cut control commands, which are then sent to the CNC controller via the CNC controller communication interface. The CNC controller then drives the machine tool to execute the machining according to these commands.

[0020] Furthermore, S6 includes: S61, For each physical channel , , , These represent the power channel, torque channel, and vibration channel, respectively, and are defined as follows: To The empirical model obtained by applying the above Channel predicts physical quantities; For digital twin simulation module of Channel simulation output; for Measured physical quantities of the channel; calculation of the second residual. If it exceeds Channel preset second threshold Then, gradient descent is used to update only the digital twin simulation module with... Channel-related simulation parameters; if not exceeded, then Remain unchanged; S62, with For reference, calculate the proportion. Apply a proportion to the predicted total. The correction yields the corrected predicted physical quantity. and will Synchronous application The channel corresponds to the stored value of the empirical coefficient; S63, Calculation First residual after channel correction If it exceeds Channel preset first threshold , This triggers online fine-tuning of the weights at the end of the candidate decision generation module; S64. Regardless of whether each channel triggers an update, the measured physical quantity is written back to the historical state of the dynamic state vector, and the health index and wear amount are updated. When the measured physical quantity of any channel exceeds its corresponding constraint threshold, in addition to outputting an alarm signal, a safety protection command is sent to the CNC controller via the CNC controller communication interface.

[0021] Furthermore, the security protection commands are implemented according to a preset hierarchical strategy: First, a control command to reduce the feed rate is issued. If the measured physical quantity of the channel still exceeds the threshold within the preset observation period, a control command to suspend processing is issued.

[0022] The present invention also provides a CNC machining decision constraint verification and self-learning system, which performs the above-described method, including: The storage module is used to store the type-level parameters corresponding to machine tool type and tool type into the static ontology database; The dynamic body update module is used to obtain the real-time health index, coordinate offset, tool wear and dynamic stiffness of a specific machine tool and a specific batch of tools, and form a dynamic state vector. The candidate decision generation module is used to generate candidate machining decisions based on the geometric features and dynamic state vector of the part to be machined. The dynamic legal solution space construction module is used to calculate at least two of the predicted physical quantities among the predicted power, predicted torque, predicted tool load, and predicted vibration amplitude corresponding to the candidate machining decision, and to determine the dynamic legal solution space. The constraint verification and projection module is used to verify candidate machining decisions. When the constraints are exceeded, the numerical projection with the smallest weighted distance is obtained to obtain the corrected machining decision. When there is no feasible solution, the rejection signal and constraint item identifier are output. When there is a corrected machining decision, it is sent to the CNC controller through the CNC controller communication interface to drive the machine tool to perform machining. The residual self-learning module is used to independently perform hierarchical residual judgment and differentiated model updates for the power channel, torque channel, and vibration channel.

[0023] The advantages of this invention are: (1) This invention reduces the probability of processing instructions exceeding the actual carrying capacity of the equipment being issued and executed by a closed-loop control link driven by real-time state-driven dynamic boundaries, projection correction, and direct CNC controller execution. It also ensures that the verified decisions directly affect the processing equipment, eliminating control breakpoints between recommendation and execution, and avoiding disconnection between the physical closed loop and the control chain. The constraint boundaries of candidate decisions are dynamically calculated based on the real-time physical state of a specific machine tool and a specific batch of cutting tools. The candidate decisions are numerically verified and projected, and the CNC controller is directly driven to execute the processing. When the measured physical quantities exceed the limits during execution, safety protection intervention is implemented step by step. The residual judgment is independently performed according to each physical channel, and the digital twin simulation parameters, boundary prediction experience coefficients, and decision generation model parameters are updated in a differentiated closed loop.

[0024] (2) This invention provides real-time safety protection during the processing by alarming when the measured physical quantity exceeds the limit and step-by-step safety protection intervention (first reducing the feed rate, and if necessary, escalating to suspend processing), which makes up for the possible residual deviation between the predicted value and the actual working condition during the candidate decision generation stage.

[0025] (3) The present invention avoids the deviation of a certain channel (such as the vibration channel) being generally transmitted to the model parameters of other channels (such as the power channel) that have not been deviated by the hierarchical residual processing mechanism performed independently according to the physical channel. At the same time, the computationally expensive digital twin parameters and empirical models are recalibrated and the final layer fine-tuning of the lightweight decision network is triggered by different thresholds, thus taking into account both model accuracy and computational economy.

[0026] (4) By parameterizing the individual degradation state of machine tools and cutting tools into the boundary calculation, the present invention makes the matching degree between the constraint boundary and the current actual state of the processing object higher than that of the type-level static method, thus taking into account both processing safety and material removal efficiency. Attached Figure Description

[0027] Figure 1 This is a structural block diagram of a CNC machining decision constraint verification and self-learning system disclosed in an embodiment of the present invention; Figure 2 This is a flowchart of candidate machining decision constraint verification, projection correction, and control issuance in a CNC machining decision constraint verification and self-learning method disclosed in an embodiment of the present invention. Figure 3 This is a flowchart of the hierarchical residual self-learning process with independent physical channels in a CNC machining decision constraint verification and self-learning method disclosed in an embodiment of the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] Example 1 See Figure 1 This embodiment provides a CNC machining decision constraint verification and self-learning method. The method is executed on a CNC machining decision constraint verification and self-learning system, which includes a processor, a memory, a CNC controller communication interface, and a CNC controller. The memory stores a static ontology database, a dynamic ontology update module, a candidate decision generation module, a dynamic legal solution space construction module, a constraint verification and projection module, a digital twin simulation module, an execution data acquisition module, and a residual self-learning module, all executed by the processor. The processor executes the strategies corresponding to each module in the memory, generating feed rate, spindle speed, and depth of cut control commands, which are then sent to the CNC controller via the CNC controller communication interface. The CNC controller then drives the machine tool to perform machining according to these commands.

[0030] The static ontology database stores type-level parameters, including: rated spindle power. Rated torque Allowable load for tool type Cutting tool diameter Material type ratio of cutting force coefficient .

[0031] Dynamic ontology for entities Maintain three types of states: historical state, including cumulative working hours. and historical records; current status, including real-time health indices. Tool wear Coordinate offset and dynamic stiffness Future state, including the planned trajectory of this mission and the predicted values ​​from digital twin simulations. Entity Index Depending on the context, they may refer to a specific machine tool or a specific batch of cutting tools.

[0032] Real-time health index is calculated using the following formula:

[0033] in, Theoretical service life working hours, This is the correction amount for performance degradation since the last maintenance. , The coefficients are obtained by regression from historical calibration data. This represents the lower limit of the health index.

[0034] Dynamic stiffness Indicates the spindle-machine tool system in the entity index The equivalent support capacity under the current state is used to characterize the dynamic vibration response level during the machining process. It can be obtained in two ways: first, by obtaining the frequency response data of the target frequency band through hammer impact excitation response testing and mapping it to the equivalent dynamic stiffness according to a preset mapping relationship; second, by collecting the spindle current during the machining process and performing frequency domain analysis, extracting the frequency domain features corresponding to the vibration response, and then converting it to the equivalent dynamic stiffness according to a preset mapping relationship. .

[0035] Decision-making regarding candidate processing ,in, The cutting speed is (m / min). This represents the feed per tooth (mm / z). Given the axial depth of cut (mm), the dynamic legal solution space construction module constructs the following dynamic legal solution space:

[0036] in, Indicates cutting force. Indicates predicted power. Indicates the predicted torque. Indicates the predicted vibration amplitude. Indicates the upper limit of vibration amplitude. Indicates axial depth of cut The minimum lower limit of the process, Indicates feed per tooth Minimum process lower limit. Preset safety factor. This only applies to predicted power and predicted torque constraints. This is because the tool load constraint has been adjusted using the wear correction term. By introducing a dedicated batch-level degradation margin, vibration constraints have been implemented. A separate safety margin is set, and the two are no longer added together. However, power and torque constraints lack similar batch-level degradation margin mechanisms, therefore a uniform application is required. To maintain structural consistency. The last two terms in the constraints. , The lower limit constraint set to ensure material removal efficiency.

[0037] Cutting force, predicted power, and predicted torque are calculated using the following formula:

[0038] in, The diameter is the cutting tool.

[0039] The wear correction item is calculated using the following formula:

[0040] in, To preset the degradation coefficient, This represents the upper limit of tool wear.

[0041] The predicted vibration amplitude is calculated using the boundary prediction empirical model:

[0042] Among them, the empirical coefficient , , The model is calibrated offline using historical vibration measurement data and can be indirectly corrected in the residual self-learning process described later. It should be noted that the simulation parameters used in this empirical model and the digital twin simulation module are different. They are maintained independently: the former is a simplified model that is called in real time for each candidate decision, with low computational overhead and high calling frequency; the latter is a refined physical simulation model with a lower calling frequency.

[0043] See Figure 2 The constraint verification and projection module will... Candidate processing decision Substituting the above physical formulas for cutting force, predicted power, predicted torque, allowable load for tool batch, and predicted vibration amplitude, we obtain the predicted physical quantity, and then... Compare.

[0044] If all constraints are satisfied, then directly... As a correction of processing decisions .

[0045] If there are unsatisfied constraints, then solve the following numerical projection problem:

[0046] in, To predefine a positive definite weight matrix that reflects the differences in adjustment costs for each cutting parameter dimension, the system ensures that dimensions with higher adjustment costs (such as spindle speed and feed per tooth) exhibit smaller changes in the solution result compared to dimensions with lower adjustment costs (such as axial depth of cut). The system employs Sequential Quadratic Programming (SQP) to solve this problem. Iterate from the initial point; if SQP fails to converge within the preset maximum number of iterations, then... A grid search is performed within the preset neighborhood, and the point that satisfies the constraints and has the smallest weighted distance is selected as the target. .

[0047] If no feasible solution exists within the preset search range, a rejection signal and the corresponding constraint identifier will be output, and the candidate processing decision will not be executed; if a feasible solution exists... The system converts these commands into feed rate, spindle speed, and depth of cut control commands, which are then sent to the CNC controller via the CNC controller communication interface. The CNC controller then drives the machine tool to execute the machining according to these commands. Thus, the verified or corrected decisions are directly translated into actual control signals for the machining equipment, eliminating the breakpoint between recommendation and execution.

[0048] The candidate decision generation module includes graph neural networks (GNN), fully connected networks, and long short-term memory networks (LSTM).

[0049] The graph neural network takes the B-Rep face-edge adjacency graph of the CAD model of the part to be machined as input, and generates a 128-dimensional geometric feature vector through three layers of graph convolution and global pooling. This vector serves as the perceptual path for the module to perceive the geometric topology of the CNC machining object. A three-layer fully connected network takes this geometric feature vector as input. A single LSTM layer takes the temporal features of the dynamic state vector output by the dynamic ontology (the sequence of the 10 most recent sampling points of health index, wear amount, and coordinate offset, 32-dimensional) as input, serving as the perceptual path for the module to perceive the real-time physical state of a specific machine tool and a specific batch of cutting tools. The outputs of the two branches are concatenated and then passed through a fully connected output layer to output candidate cutting parameter triples. That is, the candidate processing decision mentioned above. This enables the fusion of geometric topology information and equipment physical state information during the decision generation stage.

[0050] The module is pre-trained under supervision based on no less than 500 sets of historical processing records. Outside of the training phase, when the residual self-learning conditions described later are met, only the weights of the last layer are fine-tuned online to control the computational cost of online updates.

[0051] See Figure 3 For each physical channel , , , These represent the power channel, torque channel, and vibration channel, respectively, and are defined as follows: To The empirical model obtained by applying the above Channel predicts physical quantities; For digital twin simulation module of Channel simulation output; for The measured physical quantities of each channel. Residual calculations, threshold comparisons, and model updates for each channel are performed independently and in parallel; an update of one channel does not affect the empirical coefficients or simulation parameters of other channels. For each channel... Perform the following four steps independently.

[0052] The first step is to calculate the second residual. If it exceeds Channel preset second threshold Then, gradient descent is used to update only the digital twin simulation module with... Channel-related simulation parameters, so that the updated Closer If it does not exceed, then It remains unchanged.

[0053] The second step is to use the updated or original version. For reference, calculate the proportion. Because the aforementioned prediction formulas affect the corresponding empirical coefficients ( or All of these are linear relationships, and a proportional effect is applied to the predicted total. The correction is mathematically equivalent to applying the same proportion to all empirical coefficients corresponding to that channel. The correction is then made. Based on this, the corrected predicted physical quantity is obtained. and will The stored value of the corresponding empirical coefficient for this channel is synchronously applied.

[0054] The third step is to calculate the first residual after channel correction. If it exceeds the preset first threshold of the channel. ( The reason is that the decision network fine-tuning is a lightweight operation, and its trigger threshold can be set more strictly. Therefore, online fine-tuning of the final layer weights in the candidate decision generation module is triggered. Fine-tuning is performed once whenever any channel triggers this condition; the fine-tuning applies to the shared final layer weights, but the trigger judgment is completed independently for each channel.

[0055] Fourth, regardless of whether an update is triggered in any channel, the measured physical quantities are written back to the dynamic body's historical state, and the health index and wear amount are updated. Furthermore, when the measured physical quantity of any channel exceeds its corresponding constraint threshold, the data acquisition module, in addition to outputting an alarm signal, also sends a safety protection command to the CNC controller via the CNC controller communication interface. This protection command is implemented according to a preset step-by-step strategy: first, a control command to reduce the feed rate is issued; if the measured physical quantity of that channel still exceeds the threshold within the preset observation period, an escalation control command to suspend processing is issued.

[0056] The equipment and tooling parameters are set as follows: five-axis machining center. kW, N·m, , Cutting tool diameter mm, N, mm, mm, Dynamic stiffness N / mm; specific cutting force coefficient N / mm Vibration empirical coefficient , , , g. Thresholds for each channel: Vibration channel g, g; Power Channel kW, kW.

[0057] Task 1 (Triggering projection correction, control issuance, vibration channel update and safety protection, power channel remains stable, demonstrating channel independence): Candidate processing decision is... Calculated N, kW, exceeding the power limit kW; at the same time N N, the tool load constraint is also exceeded.

[0058] After numerical projection, we get All constraints are satisfied. N, kW, N·m, g). The system will The commands are converted into control instructions and sent to the CNC controller via the CNC controller communication interface to drive the machine tool to perform machining.

[0059] Vibration channel treatment: g, g, g, exceeding g. The data acquisition module outputs an alarm signal and first issues a control command to reduce the feed rate (feed rate reduced to 80%); if the measured value of this channel falls below the threshold after the speed reduction, it will not escalate to a pause processing command. Regarding residual judgment, g g triggers an update of the digital twin simulation parameters for the vibration channel. After the update... g; The vibration empirical coefficient is corrected proportionally to obtain the result. g; g g, the vibration channel does not trigger decision network updates. Furthermore, g has exceeded This indicates that the revised empirical model will determine that the same combination of parameters is infeasible in subsequent tasks of the machine tool, thus realizing the model's adaptation to the state of individual equipment.

[0060] Power channel processing: kW, kW, kW, kW The power channel (kW) does not trigger any updates throughout the entire process. This example visually demonstrates that the deviation in the vibration channel and the simulation parameters or empirical coefficients of the power channel that are not affected by the update verify the effectiveness of the technique of processing each physical channel independently.

[0061] Task 2 (Demonstration Decision Network Update Branch): Candidate Processing Decision is All constraints are satisfied. Direct execution is initiated; since the measured physical quantities do not exceed the safety threshold, no safety protection intervention is required. Vibration channel handling: g, g, g. g g, Do not update the digital twin simulation parameters; proceed to step two. g; g g triggers online fine-tuning of the weights at the final layer of the candidate decision generation module. This example demonstrates that when the digital twin simulation itself matches the actual measurements, and the deviation between empirical predictions and actual measurements mainly originates from the decision generation level, the system can accurately locate the update to the decision network rather than the physical layer model.

[0062] Through the above technical solutions, the present invention provides input for real-time state acquisition to calculate dynamic constraint boundaries; dynamic constraint boundaries provide a basis for the verification and projection of candidate decisions; the verified or corrected decisions are converted into actual control signals for the CNC equipment via the communication interface; execution feedback triggers hierarchical safety protection and provides data for independent hierarchical residual updates by channel; the updated model parameters, in turn, improve the accuracy of subsequent state acquisition, boundary calculation, and decision generation, forming a complete closed loop. The above solutions convert model output into actual control signals for the CNC equipment and form a safety protection closed loop during execution, jointly solving the technical problems of mismatch between candidate decisions and the real-time physical state of the equipment, control chain breakpoints, and the lack of channel-level cost hierarchy in model updates.

[0063] Example 2 Embodiment 2 of the present invention also provides a CNC machining control device, including a processor, a memory, a CNC controller communication interface, and a CNC controller. When the processor executes the computer program stored in the memory, it implements the steps of the method in Embodiment 1, generates feed rate, spindle speed, and depth of cut control commands, and sends them to the CNC controller via the CNC controller communication interface. The CNC controller then drives the machine tool to perform machining according to the commands.

[0064] Example 3 Embodiment 3 of the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method in Embodiment 1. The computer-readable storage medium may be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or other media capable of storing program code.

[0065] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A CNC machining decision constraint verification and self-learning method, characterized in that, include: S1. Store the type-level parameters corresponding to machine tool type and tool type to the static ontology database; S2. Obtain the real-time health index, coordinate offset, tool wear amount and dynamic stiffness of a specific machine tool and a specific batch of cutting tools to form a dynamic state vector; S3. Generate candidate machining decisions based on the geometric features and dynamic state vector of the part to be machined; S4. Calculate at least two of the predicted physical quantities among the predicted power, predicted torque, predicted tool load, and predicted vibration amplitude corresponding to the candidate machining decision, and determine the dynamic legal solution space. S5. Verify the candidate machining decisions. If the constraints are exceeded, solve the numerical projection with the smallest weighted distance to obtain the corrected machining decision. If there is no feasible solution, output a rejection signal and constraint item identifier. If there is a corrected machining decision, send it to the CNC controller through the CNC controller communication interface to drive the machine tool to perform machining. S6. Independently perform graded residual judgment and differentiated model update for power channel, torque channel and vibration channel.

2. The CNC machining decision constraint verification and self-learning method according to claim 1, characterized in that, The type-level parameters include rated spindle power. Rated torque Allowable load for tool type Cutting tool diameter and material type to cutting force coefficient .

3. The CNC machining decision constraint verification and self-learning method according to claim 2, characterized in that, The dynamic state vector includes three types of states: historical state, current state, and future state. The historical state includes the cumulative working time. And historical maintenance records; current status includes real-time health indices. Tool wear Coordinate offset and dynamic stiffness The future state includes the planned trajectory of this mission and the predicted values ​​from digital twin simulations. For entity indexing, referring to a specific batch of machine tools or cutting tools. This refers to the current moment.

4. The CNC machining decision constraint verification and self-learning method according to claim 3, characterized in that, The real-time health index is calculated using the following formula: in, Theoretical service life working hours, This is the correction amount for performance degradation since the last maintenance. , The coefficients are obtained by regression from historical calibration data. This represents the lower limit of the health index.

5. The CNC machining decision constraint verification and self-learning method according to claim 4, characterized in that, S3 includes: The graph neural network takes the B-Rep face-edge adjacency graph of the CAD model of the part to be processed as input, and generates a 128-dimensional geometric feature vector through three layers of graph convolution and global pooling. A three-layer fully connected network takes the geometric feature vector as input, and a layer of LSTM takes the temporal features of the dynamic state vector as input. The outputs of the two branches are concatenated and then passed through a fully connected output layer to output the candidate processing decision. , For cutting speed, The feed per tooth. The axial cutting depth is defined by the graph neural network, the fully connected network, and the LSTM, which together form the candidate decision generation module.

6. The CNC machining decision constraint verification and self-learning method according to claim 5, characterized in that, The dynamic legal solution space is: in, Indicates the predicted vibration amplitude. Indicates the upper limit of vibration amplitude. Indicates axial depth of cut The minimum lower limit of the process, Indicates feed per tooth The minimum lower limit of the process, To preset a safety factor, For wear correction items; Indicates cutting force. Indicates predicted power. Indicates the predicted torque; The wear correction item is calculated using the following formula: in, To preset the degradation coefficient, This represents the upper limit of tool wear. The predicted vibration amplitude is calculated using the following formula: in, , , This is an empirical coefficient.

7. The CNC machining decision constraint verification and self-learning method according to claim 6, characterized in that, S5 includes: The first Candidate processing decision Substituting the above empirical models of cutting force, predicted power, predicted torque, allowable load for tool batches, and predicted vibration amplitude, the predicted physical quantities are obtained and compared with... Compare; If all constraints are satisfied, then directly... As a correction of processing decisions ; If there are unsatisfied constraints, then solve the following numerical projection problem: in, The preset positive definite weight matrix is ​​used; Iterate from the initial point. If convergence is not achieved within a preset maximum number of iterations, then... A grid search is performed within the preset neighborhood, and the point that satisfies the constraints and has the smallest weighted distance is selected as the [value / value]. If no feasible solution exists within the preset search range, a rejection signal and the corresponding constraint identifier will be output, and the candidate processing decision will not be executed; if a feasible solution exists... The system converts these into feed rate, spindle speed, and depth of cut control commands, which are then sent to the CNC controller via the CNC controller communication interface. The CNC controller then drives the machine tool to execute the machining according to these commands.

8. The CNC machining decision constraint verification and self-learning method according to claim 7, characterized in that, S6 includes: S61, For each physical channel , , , Representing the power channel, torque channel, and vibration channel respectively, defining... To The empirical model obtained by applying the above Channel predicts physical quantities; For digital twin simulation module of Channel simulation output; for Measured physical quantities of the channel; calculation of the second residual. If it exceeds Channel preset second threshold Then, gradient descent is used to update only the digital twin simulation module with... Channel-related simulation parameters; if not exceeded, then Remain unchanged; S62, with For reference, calculate the proportion. Apply a proportion to the predicted total. The correction yields the corrected predicted physical quantity. and will Synchronous application The channel corresponds to the stored value of the empirical coefficient; S63, Calculation First residual after channel correction If it exceeds Channel preset first threshold , This triggers online fine-tuning of the weights at the end of the candidate decision generation module; S64. Regardless of whether each channel triggers an update, the measured physical quantity is written back to the historical state of the dynamic state vector, and the health index and wear amount are updated. When the measured physical quantity of any channel exceeds its corresponding constraint threshold, in addition to outputting an alarm signal, a safety protection command is sent to the CNC controller via the CNC controller communication interface.

9. The CNC machining decision constraint verification and self-learning method according to claim 8, characterized in that, The security protection commands are implemented according to a preset hierarchical strategy: First, a control command to reduce the feed rate is issued. If the measured physical quantity of the channel still exceeds the threshold within the preset observation period, an upgraded control command to suspend processing is issued.

10. A CNC machining decision constraint verification and self-learning system, characterized in that, The method of any one of claims 1-9 comprises: The storage module is used to store the type-level parameters corresponding to machine tool type and tool type into the static ontology database; The dynamic body update module is used to obtain the real-time health index, coordinate offset, tool wear and dynamic stiffness of a specific machine tool and a specific batch of tools, and form a dynamic state vector. The candidate decision generation module is used to generate candidate machining decisions based on the geometric features and dynamic state vector of the part to be machined. The dynamic legal solution space construction module is used to calculate at least two of the predicted physical quantities among the predicted power, predicted torque, predicted tool load, and predicted vibration amplitude corresponding to the candidate machining decision, and to determine the dynamic legal solution space. The constraint verification and projection module is used to verify candidate machining decisions. When the constraints are exceeded, the numerical projection with the smallest weighted distance is obtained to obtain the corrected machining decision. When there is no feasible solution, the rejection signal and constraint item identifier are output. When there is a corrected machining decision, it is sent to the CNC controller through the CNC controller communication interface to drive the machine tool to perform machining. The residual self-learning module is used to independently perform hierarchical residual judgment and differentiated model updates for the power channel, torque channel, and vibration channel.