A method and apparatus for life prediction and repair control of a CNC tool

By continuously acquiring data from CNC machine tools and using LSTM model prediction, the problem of lack of dynamic perception in existing tool life management methods has been solved, enabling accurate prediction and proactive management of tool life, thereby improving machining quality and efficiency.

CN122431248APending Publication Date: 2026-07-21SHENZHEN WEIPINZHIYUAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN WEIPINZHIYUAN INFORMATION TECH CO LTD
Filing Date
2026-04-27
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing tool life management methods rely on experience-based fixed tool change strategies or simple signal threshold monitoring, lacking the ability to dynamically perceive the actual wear state of the tool, resulting in premature or delayed tool changes, which affects tool utilization and machining quality.

Method used

By continuously acquiring data at a fixed frequency during the CNC machining process, the LSTM time-series prediction model is used to classify and predict the multi-source monitoring data in stages, generating a current prediction sequence. The remaining tool life is then predicted by combining threshold comparison, and adaptive life repair decisions are made based on the predicted values.

Benefits of technology

It improves the accuracy of tool life assessment, reduces the risk of sudden failure, enables proactive control, optimizes tool usage efficiency and machining stability, and reduces the risk of quality abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431248A_ABST
    Figure CN122431248A_ABST
Patent Text Reader

Abstract

The present application relates to the field of tool life prediction, and more particularly to a kind of life prediction and repair control method and device for CNC tool.The method comprises the following steps: according to fixed sampling frequency, continuous data acquisition is carried out to CNC machine tool machining process, and standard monitoring data set is generated;Phase classification is carried out based on the multi-source monitoring data, and tool use stage is generated;The tool use stage is input to LSTM time series prediction model for data training, and time series prediction model is generated;Current prediction sequence is output based on time series prediction model;Threshold comparison and tool residual life prediction are carried out to current prediction sequence, and residual life prediction value is obtained;Self-adaptive life repair decision is made according to residual life prediction value, and life repair strategy is output.The present application realizes the accurate analysis of tool wear state and the early prediction of residual life, and improves tool utilization and processing stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tool life prediction, and more particularly to a method and apparatus for predicting and controlling the life of CNC tools. Background Technology

[0002] During long-term use, cutting tools experience varying degrees of wear, chipping, and even failure due to the continuous effects of cutting forces, thermal stress, and friction. This leads to increased dimensional deviations, deteriorated surface roughness, and in severe cases, workpiece scrap or equipment malfunction. Simultaneously, the complexity of the machining environment, such as variations in material hardness, fluctuations in cutting parameters, and unstable cooling conditions, exacerbates the uncertainty of tool wear. These factors cause tool life to exhibit significant non-linear characteristics, making it difficult to accurately describe using simple empirical models, thus increasing the difficulty of tool management. Existing tool life management methods mainly rely on empirically set fixed tool-changing strategies or monitoring methods based on simple signal thresholds, such as rough judgments based on the number of machined parts or changes in spindle load. While these methods are simple to implement, they lack the ability to dynamically perceive the actual wear state of the tool, often resulting in premature tool changes leading to low tool utilization or delayed tool changes causing machining quality problems. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention proposes a method and apparatus for predicting and repairing the lifespan of CNC cutting tools, thereby resolving at least one of the aforementioned technical problems.

[0004] To achieve the above objectives, the present invention provides a method for predicting and controlling the lifespan of CNC cutting tools, comprising the following steps: Step S1: Continuously collect data on the CNC machine tool machining process at a fixed sampling frequency to generate a standard monitoring dataset; Step S2: Based on the multi-source monitoring data, perform stage classification to generate tool usage stages; Step S3: Input the tool usage stage into the LSTM time series prediction model for data training to generate a time series prediction model; output the current prediction sequence based on the time series prediction model; Step S4: Perform threshold comparison and tool remaining life prediction on the current prediction sequence to obtain the remaining life prediction value; Step S5: Make adaptive lifetime repair decisions based on the remaining lifetime prediction value and output the lifetime repair strategy.

[0005] This specification provides a life prediction and repair control device for CNC tools, used to execute the life prediction and repair control method for CNC tools as described above, including: The data acquisition unit is used to continuously acquire data from the CNC machine tool's machining process at a fixed sampling frequency and generate a standard monitoring dataset. A classification unit is used to perform stage classification based on the multi-source monitoring data and generate tool usage stages; The prediction unit is used to input the tool usage stage into the LSTM time-series prediction model for data training, generate the time-series prediction model, and output a current prediction sequence based on the time-series prediction model. The prediction unit is used to perform threshold comparison on the current prediction sequence and predict the remaining tool life to obtain the remaining life prediction value. The control decision unit is used to make adaptive life repair decisions based on the remaining life prediction value and output the life repair strategy.

[0006] The beneficial effects of this invention are as follows: By continuously acquiring data at a fixed frequency during the CNC machining process and performing time alignment and standardization on multi-source data, a correlation is established between current, machining cycle time, and dimensional measurement data under a unified time dimension, thereby improving data consistency and reliability. Simultaneously, noise interference is reduced through anomaly removal and missing data completion. By classifying multi-source monitoring data into stages, the continuously changing tool wear process is transformed into discrete stages with clear physical meaning, changing the tool state from a difficult-to-identify trend to quantifiable stage information. Furthermore, judgment based on current change trends improves the stability and consistency of stage division. By jointly inputting tool usage stages and current change data into an LSTM time series model for training, the model can simultaneously learn the time series change patterns and stage characteristic differences, thereby improving the prediction accuracy of current change trends. By comparing the current prediction sequence with thresholds, continuously changing prediction results are mapped to identifiable risk intervals, and combined with the current tool state, the remaining lifespan is quantitatively calculated, allowing for advance prediction of tool failure time. This transforms the traditional experience-based tool changing method into a data-driven prediction method, improving the accuracy of lifespan assessment and reducing the risk of sudden failure. By making hierarchical control decisions based on the remaining life prediction value, tool management is transformed from a passive response to an active regulation, achieving a reasonable extension of tool life while ensuring machining quality. At the same time, differentiated strategies are adopted for different states, and tools are replaced in a timely manner during high-risk stages to reduce the risk of quality abnormalities, thereby improving overall machining stability and optimizing tool utilization efficiency. Attached Figure Description

[0007] Figure 1 This is a schematic diagram of the steps of a method for predicting and repairing the life of CNC cutting tools according to the present invention. Figure 2 A schematic diagram illustrating the setting of quality zoning constraints; Figure 3This is a schematic diagram of current changes during the tool wear stage; Figure 4 OK-NG box plot of the rate of change of mass current; Figure 5 This is a schematic diagram for tool life prediction. Figure 6 A statistical chart showing the extension of tool life; Figure 7 This is a statistical chart of quality inspection results after tool life delay. Detailed Implementation

[0008] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0009] This application provides a method and apparatus for predicting and repairing the lifespan of CNC cutting tools. The executing entities of the method and apparatus for predicting and repairing the lifespan of CNC cutting tools include, but are not limited to, mechanical equipment, data processing platforms, cloud server nodes, and network upload devices that can be considered general computing nodes in this application. The data processing platform includes, but is not limited to, at least one of an audio-visual management system, an information management system, and a cloud-based data management system.

[0010] Please see Figures 1 to 7 This invention provides a method for predicting and controlling the lifespan of CNC cutting tools, comprising the following steps: Step S1: Continuously collect data on the CNC machine tool machining process at a fixed sampling frequency to generate a standard monitoring dataset; Step S2: Based on the multi-source monitoring data, perform stage classification to generate tool usage stages; Step S3: Input the tool usage stage into the LSTM time series prediction model for data training to generate a time series prediction model; output the current prediction sequence based on the time series prediction model; Step S4: Perform threshold comparison and tool remaining life prediction on the current prediction sequence to obtain the remaining life prediction value; Step S5: Make adaptive lifetime repair decisions based on the remaining lifetime prediction value and output the lifetime repair strategy.

[0011] In the embodiments of the present invention, see Figure 1 This is a flowchart illustrating the steps of a method for predicting and repairing the lifespan of CNC cutting tools according to the present invention. In this example, the steps of the method for predicting and repairing the lifespan of CNC cutting tools include: Step S1: Continuously collect data on the CNC machine tool machining process at a fixed sampling frequency to generate a standard monitoring dataset; Step S2: Based on the multi-source monitoring data, perform stage classification to generate tool usage stages; Step S3: Input the tool usage stage into the LSTM time series prediction model for data training to generate a time series prediction model; output the current prediction sequence based on the time series prediction model; Step S4: Perform threshold comparison and tool remaining life prediction on the current prediction sequence to obtain the remaining life prediction value; Step S5: Make adaptive lifetime repair decisions based on the remaining lifetime prediction value and output the lifetime repair strategy.

[0012] In this embodiment, machine tool operation data is acquired through the CNC system interface or industrial communication protocol, including spindle current and feed axis current signals I(t), machining cycle time information, tool usage count n, and tool change cycle identifier k. The current signal sampling frequency is set to 100Hz–300Hz, preferably 200Hz, to balance signal resolution and data processing efficiency. The machining cycle time is defined as the completion of machining a single workpiece, marked by a program segment end signal or PLC trigger signal. The tool usage count n is defined as the cumulative number of workpieces machined since the last tool change. The workpiece dimension measurement value x is obtained through quality inspection equipment. The measurement frequency can be full inspection or sampling inspection (e.g., once every 2 to 5 pieces). The collected multi-source data is processed to be aligned with a unified timestamp. Using the current data time axis as a reference, low-frequency data (such as dimension measurement values) is mapped to the corresponding processing cycle. Then, abnormal data is removed. For example, for current signals, the sliding window statistical method is used to remove outliers exceeding the mean ± 3 times the standard deviation. For dimension data, abnormal measurement values ​​that exceed the specification range are removed. Missing data is simply interpolated, for example, by using the mean of adjacent cycles to fill in the missing data.

[0013] Feature extraction of current data is performed on a processing cycle basis. First, representative indicators, such as root mean square current or average current, are calculated for the current sequence within each processing cycle to characterize the load level of that cycle. Then, the rate of change of current between adjacent processing cycles is calculated, defined as the ratio of the difference between the current value of the current cycle and the current value of the previous cycle to the change in the current value of the previous cycle, thus obtaining the current rate of change sequence. Based on this, statistical analysis is performed on the current rate of change sequence to extract its overall trend and fluctuation characteristics, such as the mean and the direction of the trend. The stages are divided according to the changing pattern of the current rate of change: when the current rate of change is small or fluctuates, it is determined to be the initial wear stage; when the current rate of change is stable and slowly increases, it is determined to be the stable wear stage; when the current rate of change increases significantly and continues to rise, it is determined to be the final rapid wear stage. To improve stability, the determination can be based on the average trend of multiple consecutive processing cycles (such as 5 to 10 cycles) to avoid the influence of single-cycle fluctuations on the classification results.

[0014] Align the current change rate sequence with the corresponding stage labels, and convert the stage labels into numerical form (e.g., different stages correspond to different category identifiers), forming a joint input sequence with the current change rate. A sliding window method is used to construct training samples, selecting data from multiple consecutive processing cycles as the input sequence, and using the current change rate of the next cycle as the prediction target. In terms of model structure, a single-layer or two-layer LSTM network is used, with the input being a multi-dimensional time series and the output being the predicted current change rate for the next moment. During training, mean squared error is used as the loss function, and the model is trained using historical processing data. This historical data needs to cover multiple complete tool change cycles (e.g., no less than 30 cycles) to ensure the model has generalization ability. After training, a time-series prediction model is obtained. In actual operation, the latest data sequence is input, and a recursive method is used to generate the current change rate prediction sequence for several future processing cycles. Finally, the current prediction sequence is output.

[0015] A correlation between current change rate and tool wear degree is established based on historical data. A low current change rate indicates that the tool is in a stable state, while a continuously increasing current change rate indicates that tool wear is aggravated. Based on this, a grading threshold for the current change rate is set, dividing it into a stable zone, a transition zone, and a risk zone. Then, the predicted current change rate sequence is compared point by point. When the predicted value enters the risk zone, the tool is considered to be close to failure. By identifying the position in the predicted sequence where the tool first enters the risk zone, the corresponding machining cycle is used as the life end reference point. The difference between the current machining cycle and the reference point is further calculated to obtain the tool remaining life prediction value RUL, which is expressed in the number of machining cycles or the number of workpieces. To improve reliability, the prediction results can be corrected based on the current stage of the tool, making the life prediction in the final stage more conservative.

[0016] Based on the remaining tool life percentage, tool status is categorized into different levels: normal, extendable, warning, and high-risk. When the tool is in a normal state, the current machining strategy is maintained without intervention. When it is in an extendable state, the tool life is appropriately extended while ensuring stable quality, and the monitoring frequency is increased. When it is in a warning state, process monitoring is strengthened, and machining parameters are adjusted appropriately, such as reducing feed rate or cutting load, to slow down wear development. When it is in a high-risk state, an early tool change is performed to avoid quality abnormalities or equipment risks. During the execution of the control strategy, actual operating data is continuously fed back to the monitoring dataset for updating the model and optimizing prediction results.

[0017] In this embodiment, the detailed implementation steps of step S1 include: The CNC machine tool machining process is continuously collected at a fixed sampling frequency to obtain multi-source monitoring data. The multi-source monitoring data includes the current timing data of the spindle and each feed axis, the number of tool uses, the workpiece size measurement value, the tool change cycle and machining cycle information. The multi-source monitoring data is processed to generate a standard monitoring dataset; the data processing includes timestamp alignment, anomaly removal, and missing value imputation.

[0018] In this embodiment, continuous data acquisition is performed on the CNC machine tool machining process according to a preset sampling frequency. Specifically, a data acquisition channel is established in the CNC machine tool control system through industrial communication protocols (including but not limited to FANUC FOCAS interface or MTConnect protocol) to read the machine tool's operating status in real time. The spindle current and X-axis, Y-axis, and Z-axis feed axis current signals are collected as the main load characteristic data. The sampling frequency is set between 100Hz and 500Hz, preferably 200Hz in this embodiment to balance signal accuracy and system storage pressure. Simultaneously, the completion of a single workpiece machining is considered a machining cycle unit. The machining cycle timestamp is extracted through PLC signals or program segment end markers, and the corresponding tool usage count n is recorded. The tool usage count is defined as the cumulative number of machined parts completed since the last tool change. Further, the workpiece dimension measurement value x is obtained through the MES system or testing equipment interface. The dimensional measurements are obtained from a coordinate measuring machine (CMM) or online optical measuring equipment. Their sampling frequency is lower than the current sampling frequency, and data is collected once for every few workpieces processed (e.g., every 5 or 10 pieces). Simultaneously, the tool change cycle number k is recorded. The tool change cycle is defined as the complete machining interval from the start of one tool change to the end of the next. Finally, the current time-series data I(t), the number of tool uses n, the dimensional measurement value x, the tool change cycle k, and the machining cycle number s are uniformly recorded to form the original multi-source monitoring dataset D_raw. The variables are defined as follows: I(t) represents the current value at time t, in amperes (A); n is a discrete integer variable; x is a continuous dimensional measurement value, in millimeters (mm); k is the tool change cycle number; and s is the machining cycle number.

[0019] Perform timestamp alignment processing on the original multi-source monitoring dataset D_raw to solve the problems of inconsistent sampling frequencies and different time bases of different data sources. Specifically, during implementation, use the current data time axis as the reference time axis T_ref, with a time resolution of Δt = 1 / 200 seconds (corresponding to a sampling frequency of 200 Hz), and map the processing beat data and dimensional measurement data to this unified time axis. For the processing beat data, by identifying the start and end time intervals [t_i, t_{i+1}] of each processing cycle, aggregate the current data within this interval into a processing unit and assign a unified beat number s_i. For the dimensional measurement data x, due to its low sampling frequency, use the nearest neighbor matching or time window matching method for alignment, that is, assign a certain dimensional measurement value x_j to all processing beats within its corresponding time window, and the time window is defined as [x_j sampling time ± ΔT], where ΔT is preferably set to one processing cycle or multiple processing cycles (such as ±2 beats). At the same time, perform discrete mapping on the tool usage count n so that it corresponds one-to-one with the processing beats, that is, every time a processing beat is completed, n increments by 1. Through the above processing, convert the original asynchronous data into a synchronous data structure D_sync in units of processing beats, where each record contains a unified timestamp, beat number, current sequence segment, corresponding tool usage count, and matched dimensional measurement value, thereby ensuring the temporal consistency and data alignment accuracy of subsequent feature calculations.

[0020] Based on the synchronous dataset D_sync after time alignment, identify and remove abnormal data to eliminate the interference of acquisition noise, equipment fluctuations, and measurement errors on the model. Specifically, during implementation, for the current time series data I(t), use a combination of statistical threshold method and sliding window analysis for anomaly detection: First, within a sliding window of length W (W is preferably 1 second corresponding to 200 sampling points), calculate the current mean μ_I and standard deviation σ_I. If a certain sampling point satisfies |I(t) - μ_I| > 3σ_I, it is determined as an instantaneous abnormal point and is removed or replaced. At the same time, for the data at the processing beat level, calculate the current change rate ΔI_i within each beat. If ΔI_i exceeds the 99% percentile interval of the historical distribution, it is determined that this beat is an abnormal beat and is removed as a whole. For the dimensional measurement data x, perform preliminary screening based on the upper and lower specification limits [L, U]. If x < L - ε or x > U + ε (ε is the measurement error tolerance, preferably 0.01 mm to 0.02 mm), it is determined as an abnormal measurement value and is removed. In addition, further identify anomalies through cross-variable consistency verification. For example, when the current change rate is abnormal but the quality has not changed, it may be an instantaneous fluctuation of the equipment, and its weight should be reduced or it should be removed. Through the above multi-layer anomaly detection mechanism, obtain the dataset D_clean after removing anomalies, thereby improving the stability and reliability of subsequent modeling.

[0021] After removing outlier data, missing values ​​in the dataset are imputed to ensure data continuity and model input integrity. Specifically, for short-term missing values ​​in the current time-series data (missing length less than 0.5 seconds, i.e., less than 100 sampling points), linear interpolation is used to fill in the gaps, calculating interpolation based on two valid points before and after the missing interval. For longer-term missing values ​​(more than one machining cycle), a mean-based imputation method based on historical similar working conditions is used. This involves selecting historical data to calculate the average current curve under the same tool usage interval and machining cycle conditions for imputation. For dimensional measurement data x, due to its low sampling frequency, forward fill or linear interpolation based on adjacent measurement points is preferred for completion. For discrete variables such as tool usage count n and tool change cycle k, no interpolation is performed; only missing data is marked as invalid and the corresponding record is removed. After interpolation, all variables are normalized again, for example, min-max normalization or Z-score standardization is used for current data to meet the requirements of uniform dimensions. Finally, a standard monitoring dataset D_std is generated, where each data record is defined as: D_std = {s_i, I_i(t), n_i, x_i, k_i}, representing the machining cycle number, current sequence, tool usage count, quality measurement value, and tool change cycle number, respectively. This dataset serves as the unified input basis for subsequent current change rate calculation, quality point construction, and life prediction model.

[0022] In this embodiment, the detailed implementation steps of step S2 include: Based on the multi-source monitoring data, the tool change cycle is extracted, and the current timing data is segmented and marked based on the tool change cycle to output the current data of multiple processing cycles. The current data is used to calculate the current change between adjacent processing cycles, and a current change rate sequence is generated. The characteristic parameters of the current change rate sequence are statistically analyzed; the characteristic parameters include mean, median, quantiles, variance, and fluctuation amplitude. Based on the aforementioned characteristic parameters, the tool usage stages are classified to generate tool usage stages; the tool usage stages include the initial wear stage, the stable wear stage, and the final rapid wear stage.

[0023] In this embodiment, the tool change cycle is identified and extracted based on the standard monitoring dataset D_std. The tool change cycle k is defined as the complete machining interval from the completion of one tool change to the completion of the next tool change, and its identifier comes from the machine tool change signal or tool number change record. In specific implementation, by detecting the tool ID change or the trigger time point of the machine M code (such as the M06 tool change instruction), the entire time series is divided into multiple continuous intervals [k1, k2, …, k_m], where each interval corresponds to an independent tool change cycle. Within each tool change cycle, the current time series data I(t) is further segmented according to the machining cycle identifier s_i. The continuous current signal is sliced ​​according to the time window of the single workpiece machining completion to obtain multiple machining cycle current segments I_i(t), where i represents the i-th machining cycle, t∈[t_i, t_{i+1}]; The length of each current segment is determined by the machining cycle time. In this embodiment, the typical machining cycle time is 5s to 20s, corresponding to 1000 to 4000 current sampling points (at a sampling frequency of 200Hz). To eliminate the influence of differences in cycle time length, each current segment is normalized in length and resampled to a fixed length L (preferably L=1000) using a time normalization method, thereby ensuring comparability between different machining cycles. Finally, the machining cycle current dataset D_seg is output, organized in units of tool change cycles. Its structure is: D_seg = {k, [I1, I2, …, I_n]}, where n is the number of workpieces processed in the tool change cycle.

[0024] Based on the machining cycle current dataset D_seg, the current variation between adjacent machining cycles is quantitatively calculated to characterize the load variation caused by tool wear. In specific implementation, representative statistical values ​​are first calculated for each machining cycle current segment I_i(t). _i, the statistical value is preferably the root mean square current (RMS), which is defined as: _i = sqrt((1 / L) * Σ I_i(t)^2), this index reflects the overall energy level of the load during processing and is less sensitive to instantaneous fluctuations than the mean; subsequently, the rate of change of current ΔI_i is calculated for two adjacent processing cycles, defined as: ΔI_i = ( _i - _{i-1}) / _{i-1}, where i≥2; to avoid numerical instability due to an excessively small denominator, when When ΔI_i is below the set threshold I_min (e.g., 0.5A), the sample is truncated or ignored. Simultaneously, to reduce the impact of random fluctuations, the ΔI_i sequence is smoothed using a moving average with a window length set to w = 3–5 processing cycles, resulting in a smoothed current change rate sequence ΔI_i^. Finally, a current change rate sequence dataset D_rate = {ΔI_2^, ΔI_3^, …, ΔI_n^} is generated, which serves as the core input for subsequent statistical analysis and stage division.

[0025] Based on the current change rate sequence D_rate, its statistical characteristics are extracted to quantitatively describe the wear behavior of the tool at different usage stages. Specifically, within each tool change cycle, the following characteristic parameters are calculated for either the complete sequence or the sliding window sequence (the window length is preferably 10–30 machining cycles): First, the mean μ_ΔI is calculated to reflect the overall trend, defined as μ_ΔI = (1 / N) * Σ ΔI_i^; second, the median M_ΔI is calculated to reduce the influence of extreme values; third, the quantiles Q1 (25th percentile) and Q3 (75th percentile) are calculated to describe the distribution range; further, the variance σ²_ΔI is calculated to measure the degree of fluctuation, defined as σ²_ΔI = (1 / N) * Σ (ΔI_i^ - μ_ΔI)^2; simultaneously, the fluctuation amplitude A_ΔI = Q3 - Q1 serves as a robust fluctuation indicator. Additionally, the maximum value ΔI_max and the slope of change k_ΔI (obtained through linear regression of the ΔI_i^* sequence) can be calculated to enhance sensitivity to sharp changes at the end of the cycle. Based on the feature dataset D_feat, the tool's usage stage within the current tool change cycle is classified to identify its wear state. Specifically, based on a large number of historical samples, the characteristic distribution range of each stage is obtained, and segmentation rules are set: First, the initial wear stage is defined, characterized by a mean current change rate μ_ΔI < 0 or close to 0 (e.g., μ_ΔI < 0.01), and a large fluctuation amplitude A_ΔI (e.g., A_ΔI > 0.02), indicating that the tool experiences load reduction or instability during the initial adaptation stage. Second, the stable wear stage is defined, characterized by μ_ΔI being in a small positive range (e.g., 0.01 ≤ μ_ΔI ≤ ...). The thresholds are defined as follows: μ_ΔI is 0.03, and the variance σ²_ΔI is low (e.g., σ²_ΔI < 0.0005), indicating that the tool has entered a stable machining state. Finally, the final stage of rapid wear is defined, characterized by a significant increase in μ_ΔI (e.g., μ_ΔI > 0.03), a positive and large slope of change k_ΔI (e.g., k_ΔI > 0.005), and an increase in the fluctuation amplitude A_ΔI (e.g., A_ΔI > 0.03), indicating that the tool wear is intensified and the load is rising rapidly. In practical applications, the above thresholds can be statistically calibrated based on historical data, for example, by analyzing more than 50 tool change cycle samples to obtain the distribution range of each characteristic.

[0026] In this embodiment, step S3 includes the following steps: The tool usage stages are mapped to a current change rate sequence, and a current change sequence with stage labels is output. The current change sequence is input into the LSTM time series prediction model for data training to generate the time series prediction model; The growth trend, rate of change, and acceleration of the current change rate are calculated based on the time-series prediction model, and the current prediction sequence is output.

[0027] In this embodiment, based on the obtained current change rate sequence D_rate and the corresponding tool usage stage label Stage, a point-by-point mapping process is performed to construct a current change rate sequence dataset with stage labels. Specifically, taking the machining cycle as the basic unit, each current change rate ΔI_i^ is bound to the tool usage stage of its respective machining cycle, forming an ordered sequence pair (ΔI_i^, Stage_i), where Stage_i ∈ {initial wear stage, stable wear stage, and final rapid wear stage}, and is encoded as a numerical label for model processing. For example, the initial wear stage is denoted as 0, the stable wear stage as 1, and the final rapid wear stage as 2. Simultaneously, to enhance the model's ability to recognize stage features, the stage labels are one-hot encoded, i.e., Stage_i is converted into a three-dimensional vector form S_i = (s0, s1, s2), where only the corresponding stage position is 1, and the rest are 0. Further, the current change rate ΔI_i^ and the stage vector S_i are concatenated to construct a joint input feature vector X_i = The dataset [ΔI_i^, s0, s1, s2] has a dimension of 4. To ensure the stationarity of the sequence, ΔI_i^ is standardized using the Z-score standardization method, i.e., ΔI_i' = (ΔI_i^ - μ_ΔI) / σ_ΔI, where μ_ΔI and σ_ΔI are the mean and standard deviation obtained from the historical samples. Finally, a current change rate sequence dataset D_seq = {X_1, X_2, …, X_n} with stage labels is formed.

[0028] The current change rate sequence dataset D_seq with stage labels is input into a Long Short-Term Memory (LSTM) network for training to establish a tool wear trend prediction model. Specifically, a training sample set is first constructed. An input sequence of length T and its corresponding prediction target are extracted from D_seq using a sliding window method. The input sequence is defined as X_{i-T+1} to X_i, and the prediction target is the current change rate ΔI_{i+1} at the next moment. The window length T is set according to the actual process cycle time, preferably 20-50 processing cycles; in this embodiment, T=30. The model structure uses a single-layer or double-layer LSTM network, with the number of hidden units in each layer set to H=32-128, preferably 64, to balance the model's expressive power and computational complexity. The input layer has a dimension of 4, corresponding to the feature vector X_i, and the output layer is a single node, outputting the predicted value ΔI_{i+1}. The model training uses mean squared error (MSE) as the loss function, defined as L = (1 / N) * Σ(ΔI_i - ... ΔI_i)^2, where ΔI_i is the actual current change rate; the optimization algorithm uses the Adam optimizer, with a learning rate set to 0.001, a batch size set between 32 and 128 (preferably 64), and the number of training epochs set between 50 and 200 depending on convergence; the training data comes from historical tool change cycle data, requiring at least 50 complete tool change cycle samples to ensure the model's generalization ability; during training, 80% of the data is used as the training set and 20% as the validation set, and the model is judged for overfitting by the change in the validation set error; finally, the trained time series prediction model M_LSTM is output, which can predict the future trend of current change rate based on current and historical current change rate and stage information.

[0029] The latest input sequence X_{n-T+1} to X_n of length T is selected as the model input. A recursive prediction method is used to generate predicted current change rates ΔÎ_{n+1}, ΔÎ_{n+2}, …, ΔÎ_{n+K} for the next K processing cycles. The prediction step size K is set according to actual needs, preferably 20-50; in this embodiment, K=30. After obtaining the predicted sequence, trend analysis is performed. First, the growth trend index g is calculated, defined as the linear regression slope of the predicted sequence. That is, the slope k_g is obtained by fitting the relationship between the ΔÎ sequence and the time series using the least squares method as the overall growth trend. Second, the rate of change v_i is calculated, defined as the difference between adjacent predicted points v_i = ΔÎ_{i} - ΔÎ_{i-1}, used to reflect the short-term rate of change. Further, the acceleration a_i is calculated, defined as a_i = v_i - v_{i-1} is used to describe the degree of change in the rate of change. To reduce the impact of prediction fluctuations, v_i and a_i are smoothed using a moving average, with a window length set to 3-5. At the same time, to enhance stability, confidence interval estimation can be performed on the prediction sequence, for example, by calculating the ±σ interval based on historical residuals. The final output current prediction result dataset D_pred = {ΔÎ sequence, g, v sequence, a sequence}, where the ΔÎ sequence represents the predicted value of the future current change rate, g represents the overall growth trend, the v sequence represents the rate of change, and the a sequence represents the acceleration of change. This dataset will serve as the core input basis for subsequent tool life assessment and risk determination.

[0030] In this embodiment, step S4 includes the following steps: The mass point values ​​are calculated based on the measured dimensions; mass zoning constraints are applied based on the mass point values ​​to obtain multi-layer mass constraint conditions. Threshold comparison is performed on the current prediction sequence based on multi-layer quality constraints to identify the predicted tool quality range; the tool quality range includes a quality stability region, a controllable offset region, and a high-risk region. The remaining tool life is predicted based on the tool usage stage and the predicted tool quality range, and the predicted remaining tool life value is obtained.

[0031] In this embodiment, the dimensional measurements of multiple workpieces within the same processing cycle are averaged to obtain the cycle average dimensional value, which is then used as the baseline value for the quality point of that cycle. To standardize the comparison of different dimensional points, the average dimensional value is compared with the corresponding specification range, and its offset relative to the specification center is calculated to obtain the dimensionless quality point value. The specification range is derived from product design tolerances or process control requirements. Through the above processing, the quality point value can reflect the degree of workpiece dimensional deviation and is comparable between different processing cycles, serving as the basic input for subsequent quality zoning and life prediction. The interval of quality point values ​​is divided into multiple continuous segments. The middle segment is defined as the quality stability zone, indicating that the size fluctuation is small and within a controllable range. Transition segments are set on both sides of the stability zone, defined as controllable offset zones, indicating that there is a certain offset but it has not yet affected the product quality. The outermost boundary segment is defined as the high-risk zone, indicating that the size has approached or may exceed the specification range. The interval division adopts a symmetrical distribution method, so that the middle stability zone has the largest proportion, followed by the two transition zones, and the boundary risk zone has the smallest proportion, thus forming a hierarchical structure similar to "1:2:4:2:1". Through this partitioning method, continuous quality point values ​​are converted into discrete quality level labels, which are used to constrain the subsequent prediction results.

[0032] By establishing a correspondence between current change trends and quality changes using historical data, a stable quality zone is defined as a low current change rate, a controllable deviation zone as the current change rate gradually increases, and a high-risk zone as the current change rate continues to rise and reaches a certain level. Based on this correspondence, the predicted current change rate sequence is evaluated point by point, and the evaluation results are corrected by considering the continuity of adjacent prediction points, thereby obtaining a quality interval sequence corresponding to the future machining state of the tool. Finally, tool quality interval labels are output, including stable quality zone, controllable deviation zone, and high-risk zone.

[0033] The process involves determining the current stage of tool use to reflect its wear condition; then, based on the trend of quality range changes in the prediction results, identifying the time point at which the tool transitions from the stable zone to the high-risk zone, and using this as a reference point for the end of its tool life; calculating the difference between the current machining position and this reference point to obtain the remaining tool life; and simultaneously, appropriately correcting the prediction results based on the tool's usage stage to provide a more conservative life estimate for tools in the final wear stage; finally, outputting the predicted remaining tool life value to guide tool change or machining control decisions.

[0034] In this embodiment, the specific steps for calculating the mass point value based on the dimensional measurement value and performing mass zoning constraints based on the mass point value to obtain multi-layer mass constraint conditions are as follows: Calculate the mass point value based on the measured size value; The workpiece mass offset characteristics are obtained by performing a one-sided offset direction analysis on the mass point values. Set upper and lower limits for business quality, and establish four boundary lines based on the upper and lower limits for business quality: stable upper and lower boundaries and unstable upper and lower boundaries, to obtain multi-layer boundary lines. Based on the workpiece quality offset characteristics and multi-layer boundary lines, quality zoning constraints are performed to obtain multi-layer quality constraint conditions; the multi-layer quality constraint conditions are in the ratio of 1:2:4:2:1; based on the multi-layer quality constraint conditions, five zones are divided, including a quality stable zone, two side zones are controllable offset zones, and the outermost zone is a high-risk zone.

[0035] In this embodiment, based on the dimensional measurement value x obtained and standardized in step S1, quality point values ​​are calculated to construct a uniform and comparable quality characterization variable. Specifically, for each quality inspection point, the lower specification limit L and upper specification limit U of that point are obtained from the process documents or product design specifications. L and U are quality control thresholds provided by the business party. For example, a certain dimensional point is set as L=9.950mm and U=10.050mm. The center value C of that point is further calculated and defined as C = (U + L) / 2, C=10.000mm. The offset of the dimensional measurement value x of each processed part (from CMM or online measuring equipment, with a preferred measurement accuracy of ±0.005mm) is calculated and the original offset is defined as d0= x -C. To eliminate the dimensional differences between different dimensional points, normalization processing is introduced to convert the offset into a dimensionless quality point value q0, defined as q0= (x - C) / ((U - L) / 2) This allows the value of q0 to be within the range of [-1, +1], where q0 = -1 indicates that the lower limit L has been reached, and q0 = +1 indicates that the upper limit U has been reached. To ensure data stability, q0 is truncated when |q0| > 1.2, limiting it to ±1.2 to avoid extreme measurement errors affecting subsequent modeling. Finally, the standardized quality point value q0 is obtained, which serves as the basic input variable for subsequent offset direction analysis and zonal modeling.

[0036] Based on the quality point value q0, the workpiece quality offset direction is analyzed to extract stable and physically meaningful offset features. Specifically, within the same tool change cycle, a sequence of q0 corresponding to N consecutive machined parts (preferably N = 30–100) is collected, and the statistical mean μ_q and median M_q of this sequence are calculated, where μ_q = (1 / N)·Σq0_i. The dominant offset direction is determined according to the sign of μ_q. When μ_q > δ, it is determined to be dominated by upper offset; when μ_q < -δ, it is determined to be dominated by lower offset. δ is the offset judgment threshold, preferably 0.05–0.1, to avoid misjudgment due to small fluctuations. When |μ_q| ≤ δ, further judgment is made using the cumulative offset direction counting method, i.e., the percentage of samples with q0_i > 0 and q0_i < 0 is counted. If the percentage of a certain direction exceeds 60%, it is determined to be the dominant offset direction. After determining the offset direction, a single-sided offset feature value q1 is constructed. For the upper offset model, it is defined as q1 = max(0, For the underbiased model, q1 = max(0, -q0) is defined, thus transforming the two-sided offset into a one-sided non-negative variable q1 ∈ [0, 1.2]. Further calculations are made of the offset stability index σ_q (i.e., the standard deviation of q0) and the offset trend slope k_q (obtained by linear regression on the q0 sequence), which are used to characterize the volatility and trend of quality changes.

[0037] Based on the obtained unilateral quality point value q1, and combined with the upper and lower quality thresholds provided by the business party, the quality space is divided into layers. Specifically, the original specification interval [L, U] is first mapped to the normalized interval [-1, +1], where q0=-1 corresponds to L and q0=+1 corresponds to U. Based on this, four key boundary lines are constructed: stable lower boundary B1, stable upper boundary B2, unstable lower boundary B3, and unstable upper boundary B4. Specifically, B1 = -β1, B2 = +β1, B3 = -β2, B4 = +β2, where β1 and β2 are empirically or statistically determined proportional parameters, satisfying 0 < β1 < β2 < 1. In this embodiment, β1 = 0.25 and β2 = 0.75 are preferred, i.e., the stable region is defined as q0 ∈ [-0.25, +0.25], the unstable region is defined as q0 ∈ [-0.75, -0.25) ∪ (0.25, 0.75], and the high-risk region is q0 ∈ [-1, -0.75) ∪ (0.75, 1]; The above parameters β1 and β2 can be obtained through statistical analysis of historical quality data distribution. For example, select more than 50 tool change cycle samples and calculate the quantiles (25th and 75th percentiles) of the quality point values ​​as reference values; Establish a multi-layer boundary model D_bound = {B1, B2, B3, B4} in the above way to realize the mapping from business thresholds to multi-layer control boundaries.

[0038] Based on the workpiece mass offset feature D_qfeat and the multi-layer boundary model D_bound, the mass space is modeled in five layers. Specifically, with the normalized mass point q0 as the horizontal axis, the interval [-1, +1] is divided into five continuous sub-intervals, with their length ratios allocated according to 1:2:4:2:1, and the total length is 2, corresponding to each unit length being 2 / 10 = 0.2. Therefore, the five intervals are: [-1, -0.8), [-0.8, -0.4), [-0.4, 0.4], (0.4, 0.8], and (0.8, 1]. Among them, the middle interval [-0.4, 0.4] is defined as the mass stability zone, corresponding to a ratio of 4; the two side intervals [-0.8, -0.4) and (0.4, 0.8] are defined as the controllable offset zone, corresponding to a ratio of 2:2; the outermost intervals [-1, -0.8) and (0.8, 1] are defined as the controllable offset zone, corresponding to a ratio of 2:2; and the outermost intervals [-1, -0.8) and (0.8, 1] are defined as the controllable offset zone, corresponding to a ratio of 2:2. [1] is defined as a high-risk zone with a ratio of 1:1. In practical applications, only one-sided intervals can be retained in combination with the offset direction. For example, in the down-biased model, only the interval [-1, 0] is used for partitioning. The above intervals are further mapped to the unilateral variable q1 space, that is, the interval [0, 1] is divided into intervals such as [0, 0.2), [0.2, 0.4), [0.4, 0.8], and [0.8, 1.0]. Finally, a multi-layer quality constraint set D_qc is formed, with the structure: D_qc = {stable zone, controllable offset zone, high-risk zone}. A clear range of q1 values ​​and corresponding risk levels are defined for each type of interval, thereby providing a quantifiable quality constraint basis for subsequent current threshold mapping and lifetime prediction.

[0039] In this embodiment, the specific steps for calculating the mass point value based on the size measurement value are as follows: Identify the workpiece numbers processed in the same batch; The workpiece numbers are sequentially arranged based on the processing cycle to obtain workpiece sequences with different cycles; The average value of the workpiece sequence is calculated periodically based on the dimensional measurement values ​​to obtain the average measurement value of the workpiece in different periods. The average value of the workpiece measurements is used as the quality point value.

[0040] In this embodiment, the batch identifier Batch_ID is obtained through a Manufacturing Execution System (MES) or a production management system. The batch is defined as a group of workpieces continuously processed under the same production task, the same process parameters, and the same tool configuration. For example, a batch may contain 500 to 2000 workpieces. At the machine end, when each processing beat is completed, a workpiece number Part_ID_i is generated by a program counter or a PLC signal, where i represents the processing sequence number, and Part_ID_i is an increasing integer with a starting value of 1. At the same time, the workpiece number is bound to the processing timestamp t_i, the tool number Tool_ID, and the tool change cycle number k to form a workpiece-level data record structure R_i = {Batch_ID, Part_ID_i, t_i, Tool_ID, k}. To ensure data consistency, abnormal numbers are verified. For example, if there are number jumps or duplicates (such as i and i + 2 appearing consecutively), the number order is corrected by timestamp sorting. In addition, by monitoring the tool change signal (such as the M06 instruction), when a tool change occurs, the tool change cycle number k is automatically updated, and the workpiece numbers are kept increasing continuously.

[0041] Taking the processing beat as the minimum time unit, it is defined that when each workpiece is completed, a processing cycle Cycle_i is formed, and its corresponding workpiece number is Part_ID_i. Further, based on the tool change cycle number k, the workpiece sequence is segmented, and the workpieces within the same tool change cycle are divided into a subsequence. For example, the workpiece set D_k corresponding to the kth tool change cycle is {Part_ID_a, Part_ID_{a + 1}, …, Part_ID_b}, where a and b are the starting and ending workpiece numbers of this tool change cycle respectively. Inside each tool change cycle, the workpiece numbers are arranged in chronological order, that is, Part_ID_i < Part_ID_j if and only if t_i < t_j. At the same time, the time window [t_i, t_{i + 1}] corresponding to each processing cycle and the processing beat duration Δt_i (typical value is 5s to 20s) are recorded. To improve statistical stability, a cycle aggregation window can be introduced, and W consecutive processing cycles are grouped into a statistical unit, where W is preferably 5 to 10. For example, every 5 workpieces are taken as a statistical cycle. Finally, a cycle-level workpiece sequence data set D_cycle is formed, and its structure is: D_cycle = {Cycle_j: [Part_ID_{j,1}, Part_ID_{j,2}, …, Part_ID_{j,W}]}, where j represents the jth statistical cycle, and W is the number of workpieces included in this cycle. This data structure is used for subsequent periodic statistical calculations of dimensional measurement values.

[0042] Obtain the dimensional measurement value x_i corresponding to each workpiece. x_i is derived from quality inspection equipment, including a coordinate measuring machine (CMM) or an online vision inspection system. The preferred measurement accuracy is ±0.005 mm, and the measurement frequency can be full inspection or sampling inspection (e.g., inspecting every 2 or 5 pieces). For cycles with sampling inspections, if a measurement value is missing within a cycle, it is filled using nearest neighbor interpolation or historical mean imputation. Subsequently, the average of all valid dimensional measurement values ​​within each statistical cycle (Cycle_j) is calculated, and the cycle average is defined as... _j, its calculation formula is: _j = (1 / W)·Σ_{i=1}^{W} x_{j,i}, where W is the number of workpieces in the cycle; to improve robustness, the median M_j and the mean after removing extreme values ​​(i.e., removing the maximum and minimum values ​​before calculating the mean) can also be calculated simultaneously for auxiliary analysis; at the same time, the standard deviation σ_j in the cycle is calculated to characterize the degree of measurement dispersion. When σ_j exceeds a preset threshold (e.g., 0.01mm), the data in that cycle is marked as unstable data; through the above processing, the original discrete dimensional measurement values ​​are converted into a cycle-level statistical value sequence D_avg = { _1, _2, …, _m}, where m is the total number of statistical periods.

[0043] The average size value of the period _j is defined and output as a quality point value to construct a quality characterization variable that matches the current change rate and tool wear state. In specific implementation, it will be... _j can be used directly as the original mass point value q_j, or further normalized by combining it with specification parameters, for example, defining the normalized mass point value q_j' = ( _j- C) / ((U - L) / 2), where C is the specification center value, and U and L are the upper and lower limits of the specification, respectively; in this step, it is preferable to directly use the periodic average value. _j serves as the base value for the quality point to maintain physical consistency with the original measurement data and avoid errors introduced by excessive transformation. Simultaneously, this quality point value is bound to the corresponding cycle number Cycle_j, the number of tool uses n_j, and the tool change cycle k, forming a quality point data record Q_j = {Cycle_j, ... The final output quality point sequence is D_q = {q_1, q_2, …, q_m}, which corresponds one-to-one with the current change rate sequence in the time dimension. It can be directly used for subsequent quality partitioning modeling, current threshold mapping and tool life prediction, thereby realizing the transformation from "single-piece measurement value" to "cycle-stable quality index" and improving the noise resistance and engineering usability of the overall model.

[0044] In this embodiment, the specific steps of step S5 are as follows: Tool condition assessment is performed based on the remaining life prediction value to obtain the tool condition level; the tool condition level includes normal state, extendable state, warning state and high-risk state. Based on the tool condition level, an adaptive life repair decision is made, and a life repair strategy is output.

[0045] In this embodiment, RUL is defined as the number of remaining machining cycles that the current tool can stably process under given machining conditions, with units of workpiece count or machining cycle count. Simultaneously, the historical limit lifespan N_max of the tool is obtained. N_max is obtained through historical statistical data, for example, by statistically analyzing at least 30 complete tool change cycles and taking the average or median value as the reference lifespan. In this embodiment, N_max can be 800-1000 workpieces. Based on the proportional relationship between RUL and N_max, a normalized lifespan index η is constructed, defined as η = RUL / N_max. Subsequently, the state is classified according to the value range of η: when η ≥ 0.5, it is judged as a normal state, indicating that the tool is in a stable usage stage; when 0.3 ≤ η < 0.5, it is judged as an extendable state, indicating that the tool still has certain usage potential but the trend of change needs to be monitored; when 0.1 ≤ η < 0.5, it is judged as an extended state. When η < 0.3, it is judged as a warning state, indicating that the tool has entered the end of its life and intervention measures should be prepared in advance; when η < 0.1, it is judged as a high-risk state, indicating that the tool may cause quality abnormalities or unstable processing at any time; to improve the stability of the judgment, a simple smoothing process can be introduced, that is, the average value of η for three consecutive processing cycles is taken before the state is judged, thereby avoiding misjudgment caused by fluctuations in a single prediction; finally, the tool state level State ∈ {normal state, extendable state, warning state, high-risk state} is output and bound to the current processing cycle.

[0046] A tiered control strategy is set according to different states: When the State is normal, the current machining parameters and tool usage strategy are maintained without intervention, and only the current change rate and quality point changes are continuously monitored; when the State is extendable, a life extension strategy is implemented, that is, the tool life cycle is appropriately extended while ensuring quality stability, for example, the extension ratio is set to 10% to 20% of the current RUL, while the monitoring frequency is increased (e.g., from once every 5 pieces to once every 2 pieces); when the State is warning, a warning control strategy is implemented, including appropriately reducing the machining load (e.g., reducing the feed rate by 5% to 10% or reducing the depth of cut) to slow down the tool wear rate, while triggering the operator to prepare for tool change; when the State is high-risk, a forced intervention strategy is implemented, including immediately stopping the extension of tool life and performing a tool change operation, or adopting a short-cycle buffer strategy in special cases (e.g., allowing tool change immediately after machining only a small number of workpieces); during the execution of the strategy, control commands are sent to the machine tool through the CNC system or PLC to realize the adjustment of machining parameters or tool change operation; at the same time, the current data and quality data after the strategy execution are recorded and fed back to the historical database.

[0047] In this embodiment, the adaptive lifetime repair decision specifically refers to: When the tool status level is normal, continue the current tool processing; When the tool condition level is extended, the number of extended machining cycles is calculated based on the remaining life prediction value; Based on the number of processing cycles, tool life extension repair control is implemented; When the tool is in an early warning state, the tool machining process is closely monitored and the machining parameters are adaptively adjusted to suppress accelerated wear. When the tool is in a high-risk state, perform an early tool change.

[0048] In this embodiment, the remaining life prediction value RUL and its normalized index η calculated in the aforementioned steps are used as references. When η≥0.5, the tool is considered to be in a stable machining stage. In this state, the current machining process parameters are not adjusted, and the original machining conditions are maintained. Key parameters such as spindle speed, feed rate, and depth of cut remain unchanged. For example, the spindle speed is maintained at a predetermined set value (e.g., 8000rpm±5%), the feed rate is maintained at a predetermined process value (e.g., 500mm / min), and the depth of cut is maintained within a predetermined range (e.g., 0.5mm). At the same time, the original detection frequency is maintained. For example, dimensional detection is maintained at once every 5 workpieces. During this process, the current change rate and quality point data are continuously collected, and the remaining life prediction result is updated once at a fixed period (e.g., every 10 machining cycles) to achieve dynamic monitoring. The core objective of this state is to avoid efficiency loss caused by excessive intervention while ensuring machining stability. The final output control strategy is "maintain the current machining state".

[0049] When the tool condition level is determined to be in an extendable state, a tool life extension control strategy is implemented. Specifically, when the normalized life index η is in the range of 0.3 ≤ η < 0.5, the tool is considered to still have some usage potential. Based on the current remaining life prediction value RUL, the number of extended machining cycles ΔN_extend is calculated, defined as ΔN_extend = λ × RUL, where λ is the extension coefficient, preferably 0.1 to 0.2. For example, when RUL=200, the number of extended cycles is 20 to 40 pieces. After determining the extension cycle, the extension control strategy is executed, which allows the tool to continue machining for ΔN_extend machining cycles without immediately triggering a tool change operation. To prevent quality fluctuations, the monitoring intensity is increased during the extension period, for example, the dimensional inspection frequency is increased from every 5 pieces to every 2 pieces, and the sampling and analysis frequency of the current change rate is increased (e.g., analysis is performed for each machining cycle). In addition, the load can be appropriately reduced during the extension stage to slow down wear, for example, the feed rate is reduced by about 5% (e.g., adjusted from 500mm / min to 475mm / min). After the extension cycle is completed, the remaining life is recalculated and the tool status is updated. The final output control strategy is "continue machining according to the extension cycle", which realizes the reasonable extension of tool life.

[0050] When the tool condition level is determined to be in a warning state, an enhanced monitoring and parameter adaptive adjustment strategy is implemented. Specifically, when the normalized life index η is in the range of 0.1≤η<0.3, the tool is considered to have entered the accelerated wear stage. In this state, the quality monitoring frequency is increased first, for example, the dimensional inspection frequency is increased to once per workpiece to ensure timely detection of quality fluctuations. At the same time, the current change rate is analyzed cycle by cycle to monitor its growth trend. In terms of machining parameter adjustment, a lightweight adaptive control strategy is adopted, that is, without affecting the machining cycle time, key parameters are slightly adjusted, for example, the feed rate is reduced by 5% to 10%, and the depth of cut is reduced by about 5%, thereby reducing the tool load. The above adjustment range is derived from historical process test data, that is, while ensuring the machining quality remains unchanged, the current change rate is observed to decrease by gradually reducing the load. At the same time, a warning trigger condition is set, for example, when the current change rate continues to rise within 3 consecutive machining cycles or the quality point approaches the zone boundary, further intervention or entry into a high-risk state is triggered. The final output control strategy is "enhanced monitoring + lightweight parameter adjustment" to delay tool wear and ensure machining quality.

[0051] When the normalized life index η < 0.1, or when the prediction results indicate that the tool will enter a high-risk quality zone in the short term, the tool is considered to be nearing failure. In this state, the tool life extension strategy is stopped, and the machining of new workpieces is no longer allowed. The CNC system issues a tool change command to the machine tool (such as executing the M06 command) to complete the tool change operation. Before the tool change, a buffer strategy can be set according to the current machining progress, for example, allowing the completion of the currently machining workpiece, but not allowing the continuation of a new machining cycle. At the same time, the actual tool life (i.e., the actual number of machined parts) and the corresponding current change rate and quality data are recorded, and this data is fed back to the historical database to update the limit life N_max and optimize the prediction model. After the tool change is completed, the tool state is re-initialized to the initial wear stage, and the data acquisition and life prediction process is restarted. The final output control strategy is "immediate tool change" to ensure that quality problems or equipment abnormalities caused by tool failure are avoided. In this embodiment, a life prediction and repair control device for CNC tools is provided, used to execute the life prediction and repair control method for CNC tools as described above, including: The data acquisition unit is used to continuously acquire data from the CNC machine tool's machining process at a fixed sampling frequency and generate a standard monitoring dataset. A classification unit is used to perform stage classification based on the multi-source monitoring data and generate tool usage stages; The prediction unit is used to input the tool usage stage into the LSTM time-series prediction model for data training, generate the time-series prediction model, and output a current prediction sequence based on the time-series prediction model. The prediction unit is used to perform threshold comparison on the current prediction sequence and predict the remaining tool life to obtain the remaining life prediction value. The control decision unit is used to make adaptive life repair decisions based on the remaining life prediction value and output the life repair strategy.

[0052] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.

[0053] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein are implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A method for predicting and controlling the lifespan of CNC cutting tools, characterized in that, Includes the following steps: Step S1: Continuously collect data on the CNC machine tool machining process at a fixed sampling frequency to generate a standard monitoring dataset; Step S2: Based on the multi-source monitoring data, perform stage classification to generate tool usage stages; Step S3: Input the tool usage stage into the LSTM time series prediction model for data training to generate a time series prediction model; output the current prediction sequence based on the time series prediction model; Step S4: Perform threshold comparison and tool remaining life prediction on the current prediction sequence to obtain the remaining life prediction value; Step S5: Make adaptive lifetime repair decisions based on the remaining lifetime prediction value and output the lifetime repair strategy.

2. The method for predicting and repairing the lifespan of CNC cutting tools according to claim 1, characterized in that, The specific steps of step S1 are as follows: The CNC machine tool machining process is continuously collected at a fixed sampling frequency to obtain multi-source monitoring data. The multi-source monitoring data includes the current timing data of the spindle and each feed axis, the number of tool uses, the workpiece size measurement value, the tool change cycle and machining cycle information. The multi-source monitoring data is processed to generate a standard monitoring dataset; the data processing includes timestamp alignment, anomaly removal, and missing value imputation.

3. The method for predicting and repairing the lifespan of CNC cutting tools according to claim 1, characterized in that, The specific steps of step S2 are as follows: Based on the multi-source monitoring data, the tool change cycle is extracted, and the current timing data is segmented and marked based on the tool change cycle to output the current data of multiple processing cycles. The current data is used to calculate the current change between adjacent processing cycles, and a current change rate sequence is generated. The characteristic parameters of the current change rate sequence are statistically analyzed; the characteristic parameters include mean, median, quantiles, variance, and fluctuation amplitude. Based on the aforementioned characteristic parameters, the tool usage stages are classified to generate tool usage stages; the tool usage stages include the initial wear stage, the stable wear stage, and the final rapid wear stage.

4. The method according to claim 1, characterized in that, Step S3 is as follows: The tool usage stages are mapped to a current change rate sequence, and a current change sequence with stage labels is output. The current change sequence is input into the LSTM time series prediction model for data training to generate the time series prediction model; The growth trend, rate of change, and acceleration of the current change rate are calculated based on the time-series prediction model, and the current prediction sequence is output.

5. The method according to claim 1, characterized in that, The specific steps of step S4 are as follows: The mass point values ​​are calculated based on the measured dimensions; mass zoning constraints are applied based on the mass point values ​​to obtain multi-layer mass constraint conditions. Threshold comparison is performed on the current prediction sequence based on multi-layer quality constraints to identify the predicted tool quality range; The tool quality range includes a stable quality zone, a controllable offset zone, and a high-risk zone. The remaining tool life is predicted based on the tool usage stage and the predicted tool quality range, and the predicted remaining tool life value is obtained.

6. The method according to claim 5, characterized in that, The specific steps for calculating the mass point value based on the dimensional measurement value and performing mass zoning constraints based on the mass point value to obtain multi-layer mass constraint conditions are as follows: Calculate the mass point value based on the measured size value; The workpiece mass offset characteristics are obtained by performing a one-sided offset direction analysis on the mass point values. Set upper and lower limits for business quality, and establish four boundary lines based on the upper and lower limits for business quality: stable upper and lower boundaries and unstable upper and lower boundaries, to obtain multi-layer boundary lines. Based on the workpiece mass offset characteristics and multi-layer boundary lines, mass zoning constraints are performed to obtain multi-layer mass constraint conditions.

7. The method according to claim 6, characterized in that, The specific steps for calculating the mass point value based on the aforementioned dimensional measurement value are as follows: Identify the workpiece numbers processed in the same batch; The workpiece numbers are sequentially arranged based on the processing cycle to obtain workpiece sequences with different cycles; The average value of the workpiece sequence is calculated periodically based on the dimensional measurement values ​​to obtain the average measurement value of the workpiece in different periods. The average value of the workpiece measurements is used as the quality point value.

8. The method according to claim 1, characterized in that, The specific steps of step S5 are as follows: Tool condition assessment is performed based on the remaining life prediction value to obtain the tool condition level; the tool condition level includes normal state, extendable state, warning state and high-risk state. Based on the tool condition level, an adaptive life repair decision is made, and a life repair strategy is output.

9. The method for predicting and repairing the lifespan of CNC cutting tools according to claim 8, characterized in that, The adaptive lifetime repair decision is specifically as follows: When the tool status level is normal, continue the current tool processing; When the tool condition level is extended, the number of extended machining cycles is calculated based on the remaining life prediction value; Based on the number of processing cycles, tool life extension repair control is implemented; When the tool is in an early warning state, the tool machining process is closely monitored and the machining parameters are adaptively adjusted to suppress accelerated wear. When the tool is in a high-risk state, perform an early tool change.

10. A life prediction and repair control device for CNC cutting tools, characterized in that, The method for performing life prediction and repair control of CNC tools as described in claim 1 includes: The data acquisition unit is used to continuously acquire data from the CNC machine tool's machining process at a fixed sampling frequency and generate a standard monitoring dataset. A classification unit is used to perform stage classification based on the multi-source monitoring data and generate tool usage stages; The prediction unit is used to input the tool usage stage into the LSTM time-series prediction model for data training, generate the time-series prediction model, and output a current prediction sequence based on the time-series prediction model. The prediction unit is used to perform threshold comparison on the current prediction sequence and predict the remaining tool life to obtain the remaining life prediction value. The control decision unit is used to make adaptive life repair decisions based on the remaining life prediction value and output the life repair strategy.