A method and system for controlling the CNC machining process of hardware parts

CN122569192APending Publication Date: 2026-08-14HUIZHOU XINYU HARDWARE PARTS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-24
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0003]传统控制方法依靠预设固定进给速率与轨迹指令引导机床运行,在应对工件内部因热处理残留的硬度不均区段时,进给执行机构在刚性指令约束下强行维持行进速度,迫使切削刃以超负荷挤压剪切高抗力材料,指令与材料突变物理抗力间的不匹配导致切削受力瞬时攀升,引发刃口微观形变及崩缺,冲击载荷促使刀杆发生弹性退让产生让刀效应并引发尺寸偏差,受损刃口在延续切削中刮擦后续曲面造成精度持续失控

Benefits of technology

[0052]与现有技术相比,本发明的优点和积极效果在于:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122569192A_ABST
    Figure CN122569192A_ABST
Patent Text Reader

Abstract

This invention relates to the field of machining process control technology, specifically a method and system for controlling the CNC machining process of hardware parts. The method includes the following steps: extracting the cross-axis current to calculate a stable cutting baseline; obtaining characteristic residuals based on the current change rate; when the residuals exceed the limit, fusing the tool coordinates to obtain a high-hardness abnormal toolpath marker; issuing a feed rate command to adjust the machine tool to a deceleration and pullback state; generating tool compensation correction data and updating compensation parameters based on a gradient algorithm to output control commands. In this invention, by analyzing the operating state and sensing local resistance mutations, combining coordinate mapping to anchor abnormal boundaries and issuing commands to forcibly pull back the overload state, the destructive impact of rising cutting forces on the cutting edge is suppressed, avoiding the risk of dimensional distortion caused by micro-chipping and tool holder elastic retreat. Fine-tuning parameters are used to update compensation logic and output accuracy adjustment commands to eliminate the influence of residual errors, ensuring the workpiece surface forming quality and the operating life of the machine tool actuator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machining process control technology, and in particular to a method and system for controlling the CNC machining process of hardware parts. Background Technology

[0002] The field of machining process control technology encompasses the monitoring and command adjustment of various process parameters, equipment status, and motion trajectories during manufacturing. This field primarily revolves around core aspects such as cutting parameter setting, dynamic error compensation, tool status monitoring, and the issuance of machine tool spindle operation commands during production. By collecting basic process data such as spindle speed, feed rate, and depth of cut, and combining this with vibration, temperature, and cutting mechanics characteristics obtained from physical sensors, intervention commands are issued to the machine tool's mechanical actuators to maintain the production equipment's sequential operation along the predetermined machining trajectory. Traditional CNC machining process control methods for hardware parts address dimensional deviations caused by changes in cutting resistance, machine tool thermal deformation, and tool wear during CNC machine tool cutting. This is achieved by pre-writing a program instruction file containing G-code and M-code to the CNC system to set specific spindle speeds, linear feed rates, and spatial tool movement paths. During cutting execution, the rotary encoder built into the machine tool's servo motor obtains real-time position feedback values ​​for each coordinate axis, and the cutting coordinates are adjusted according to factory-preset fixed compensation parameters.

[0003] Traditional control methods rely on preset fixed feed rates and trajectory commands to guide machine tool operation. When dealing with uneven hardness areas inside the workpiece due to residual heat treatment, the feed actuator is forced to maintain the travel speed under rigid command constraints, forcing the cutting edge to squeeze and shear high-resistance materials under overload. The mismatch between the command and the sudden physical resistance of the material causes the cutting force to rise instantaneously, causing micro-deformation and chipping of the cutting edge. The impact load causes the tool holder to elastically retract, producing a tool deflection effect and causing dimensional deviations. The damaged cutting edge scrapes the subsequent curved surface during continued cutting, causing continuous loss of accuracy control. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the existing technology and to propose a method and system for controlling the CNC machining process of hardware parts.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for controlling the CNC machining process of hardware parts, comprising the following steps:

[0006] S1: Process the operating status and numerical control command parameters of the CNC machine tool during the cutting process of hardware parts to obtain a multi-dimensional time series state vector, extract the historical cross-axis current sequence, and calculate the moving average value and data standard deviation of the historical cross-axis current sequence as a stable cutting history baseline.

[0007] S2: Based on the multidimensional time series state vector, extract the first time derivative of the cross-axis current and the rate of change of the current vector as the actual load feature data set of the hardware parts, and use the stable cutting history baseline and the actual load feature data set of the hardware parts to calculate the absolute residual of the actual load deviation from the baseline.

[0008] S3: When the actual load deviates from the baseline absolute residual and exceeds the basic fluctuation judgment threshold, establish the local resistance change processing state of the hardware and retrieve the corresponding cutting timestamp data. Add the cutting timestamp data as a time attribute to the three-dimensional hardware mesh spatial position boundary information obtained by mapping the actual mechanical coordinates of the tool to the three-dimensional hardware model mesh spatial coordinate system to obtain the high hardness abnormal toolpath section marking data.

[0009] S4: Based on the high hardness abnormal toolpath segment marking data, call the numerical lower limit limit function to obtain the constrained dynamic feed rate writing instruction, and issue the constrained dynamic feed rate writing instruction to reduce the machine tool feed axis movement speed, and adjust the machine tool feed state to the dynamic speed reduction load forced pull-back control state to realize tool overload protection.

[0010] S5: Lock the upper limit of feed and generate real-time tool compensation correction data. Receive actual size deviation measurement data associated with the high-hardness abnormal toolpath segment marking data as model loss error. Obtain empirical fine-tuning parameters through gradient descent algorithm. Call the empirical fine-tuning parameters to update the toolpath position compensation parameters and model empirical formula. Based on the updated toolpath position compensation parameters and the preset empirical formulas for hardware load and tool wear, output continuous precision control instructions for hardware CNC machining.

[0011] The present invention is improved in that the specific steps of S1 are as follows:

[0012] S111: Acquire the three-phase AC stator current of the spindle, the actual output current of the feed axis servo motor, the actual mechanical coordinates of the tool, the real-time spindle speed, the actual feed speed of the feed axis, the CNC code program segment number, and the theoretical interpolation coordinates. Calculate the spindle cross-axis current data of the three-phase AC stator current of the spindle using Clarke transform and Park transform. Encapsulate the real-time spindle speed, the actual feed speed of the feed axis, the spindle cross-axis current data, the actual output current of the feed axis servo motor, the actual mechanical coordinates of the tool, the CNC code program segment number, and the theoretical interpolation coordinates according to the interpolation clock reference to obtain a multi-dimensional time-series state vector. Extract the cutting state data of the hardware part at the current sampling moment and the cutting state data of the hardware part at historical sampling points from the multi-dimensional time-series state vector. Calculate the weighted sum of the current cutting state data and the historical cutting state data using the finite impulse response algorithm. Call the weighted sum to filter out the high-frequency modulation noise of the multi-dimensional time-series state vector to generate a filtered time-series state vector.

[0013] S112: Collect the historical cross-axis current sequence of the filtered time series state vector during the cutting steady period, calculate the moving average value and data standard deviation of the historical cross-axis current sequence, and integrate the moving average value and the data standard deviation as the historical baseline for stable cutting.

[0014] The present invention is improved in that the specific steps of S2 are as follows:

[0015] S211: Extract the CNC code program segment number matching interpolation instruction information of the filtered time series state vector, establish the current machining state instruction set sequence, calculate the geometric features of the interpolation point according to the current machining state instruction set sequence, generate the subsequent toolpath hardware surface normal vector data, extract the geometric change features of the current machining state instruction set sequence according to the theoretical cutting thickness of the cutting tool and the cutting contact angle parameter of the cutting tool, and calculate the expected change rate of the theoretical load according to the preset cutting force mechanism logic operation model;

[0016] S212: Obtain the interpolation time interval of the current trajectory interpolation control cycle, call the spindle cross-axis current data of the filtered time series state vector and the interpolation time interval to calculate the differential rate of change, obtain the first-order time derivative value of the cross-axis current, extract the actual output current of the feed axis servo motor of the filtered time series state vector to calculate the Euclidean norm change, construct the current vector composite rate of change, use the first-order time derivative value of the cross-axis current and the current vector composite rate of change as the actual load feature data set of the hardware, calculate the absolute current deviation value based on the current spindle cross-axis current value of the filtered time series state vector and the moving average value of the stable cutting historical baseline, calculate the weighted sum of the absolute current deviation value and the first-order time derivative value of the cross-axis current in the actual load feature data set of the hardware, and use the weighted sum as the absolute residual of the actual load deviation from the baseline.

[0017] The present invention is improved in that the process of calculating and generating the expected rate of change of theoretical load based on the preset cutting force mechanism logic operation model is specifically as follows:

[0018] The material standard shear yield stress is set as the material reference parameter of the preset cutting force mechanism logic operation model. Based on the material reference parameter, the product multiplier relationship between the theoretical cutting thickness of the cutting tool and the cutting contact angle parameter of the tool, a cutting force mapping function is constructed. The geometric change characteristics are substituted into the cutting force mapping function to perform time difference differentiation operation to obtain the expected rate of change of the theoretical load.

[0019] The process of constructing the current vector synthesis rate of change is as follows:

[0020] The actual output current of each feed axis in the three-dimensional mechanical coordinate system is extracted as the actual output current of the feed axis servo motor. The sum of squares of the actual output current of each feed axis at the same sampling time is calculated. The square root operation is performed on the sum of squares to obtain the current norm at the current sampling time. The current norm at the historical sampling time corresponding to the interpolation time interval is called. The Euclidean norm change between the current norm at the current sampling time and the current norm at the historical sampling time is calculated. The ratio of the Euclidean norm change to the interpolation time interval is set as the current vector synthesis rate of change.

[0021] The present invention is improved in that the specific steps of S3 are as follows:

[0022] S311: Calculate the cutting tool trajectory curvature change rate value according to the current machining state instruction set sequence, and obtain the preset geometric change threshold. Set the basic fluctuation judgment threshold based on the data standard deviation of the stable cutting history baseline. Monitor the current absolute deviation value of the actual load deviating from the baseline absolute residual. Compare the current absolute deviation value with the basic fluctuation judgment threshold. Under the condition that the current absolute deviation value exceeds the basic fluctuation judgment threshold, the cutting tool trajectory curvature change rate value is lower than the preset geometric change threshold, and the theoretical load expected change rate remains stable, determine that the current cutting tool machining position has reached the preset cutting abnormal condition, and establish the hardware part local resistance sudden change machining state.

[0023] S312: Obtain a preset three-dimensional hardware model mesh spatial coordinate system. For the processing state of the hardware part with local resistance change, retrieve the cutting timestamp data corresponding to the time of occurrence. Based on the cutting timestamp data, extract the actual mechanical coordinates of the tool matched in the filtered time series state vector. Call the three-dimensional hardware model mesh spatial coordinate system to perform spatial geometric position mapping operation on the actual mechanical coordinates of the tool to obtain the spatial position boundary information of the three-dimensional hardware mesh. Add the cutting timestamp data as a time attribute to the spatial position boundary information of the three-dimensional hardware mesh to obtain the high hardness abnormal toolpath segment marking data.

[0024] The present invention is improved in that the process of setting the basic fluctuation judgment threshold based on the data standard deviation of the stable cutting history baseline is specifically as follows:

[0025] Extract the confidence factor of normal load fluctuation under a test environment without sudden hardness change as the preset fluctuation tolerance coefficient;

[0026] The extreme value limit of fluctuation is obtained by multiplying the standard deviation of the stable cutting history baseline data with the preset fluctuation tolerance coefficient.

[0027] The extreme value limit of the fluctuation is determined as the basic fluctuation judgment threshold;

[0028] The process of obtaining the spatial location boundary information of the three-dimensional hardware component mesh is as follows:

[0029] A spherical collision bounding box with a preset spatial radius is constructed with the actual mechanical coordinates of the cutting tool as the geometric center point;

[0030] Calculate the spatial topological intersection relationship between the spherical surface of the spherical collision bounding box and each triangular mesh contained in the spatial coordinate system of the three-dimensional hardware model mesh;

[0031] Extract triangular facet meshes with spatial overlap properties to construct intersecting mesh clusters;

[0032] Retrieve the maximum and minimum coordinate values ​​of the intersecting mesh cluster in the three orthogonal axes of the spatial coordinate system;

[0033] The maximum coordinate value and the minimum coordinate value are used as the spatial boundary information of the three-dimensional hardware mesh.

[0034] The present invention is improved in that the specific steps of S4 are as follows:

[0035] S411: Based on the high-hardness abnormal toolpath segment marking data, within the time window for confirming the triggering of the preset cutting abnormal state, extract the spindle motor torque constant, the maximum allowable cutting torque upper limit parameter of the ball end mill, and the exponential mapping relationship between the preset cutting torque and feed rate reduction ratio. Perform a product operation on the absolute current deviation value of the actual load deviation from the baseline absolute residual and the spindle motor torque constant to obtain the actual cutting torque overload value. Compare the actual cutting torque overload value with the maximum allowable cutting torque upper limit parameter of the ball end mill to perform a difference calculation to obtain the cutting torque difference value. Generate a torque approximation limit value based on the cutting torque difference value.

[0036] S412: Based on the torque approximation limit and the exponential mapping relationship, perform mapping calculation to obtain the target feed rate reduction factor, obtain the preset feed rate lower limit threshold, call the numerical lower limit constraint function to perform boundary cross-validation on the target feed rate reduction factor to determine whether the target feed rate reduction factor is lower than the feed rate lower limit threshold, and obtain the constrained dynamic feed rate write instruction under the condition that the target feed rate reduction factor is not lower than the feed rate lower limit threshold. Issue the constrained dynamic feed rate write instruction through the feed speed control register to reduce the machine tool feed axis movement speed, reduce the volume of hardware material removed by the cutting edge per unit time, and adjust the machine tool feed state to the dynamic speed reduction load forced pull-back control state.

[0037] The present invention is improved in that the process of obtaining the constrained dynamic feed rate write instruction under the condition that the target feed rate reduction factor is not lower than the feed rate lower limit threshold is specifically as follows:

[0038] Obtain the critical interference feed rate from the previous tool holding test record, and obtain the rated machining feed rate of the machine tool;

[0039] Calculate the ratio parameter between the critical interference feed rate and the rated machining feed rate of the machine tool, and set the ratio parameter as the lower limit threshold of the feed rate;

[0040] Compare the numerical relationship between the target feed rate reduction factor and the feed rate lower limit threshold.

[0041] If the target feed rate reduction factor is determined to be greater than or equal to the feed rate lower limit threshold, the target feed rate reduction factor is written as the constrained dynamic feed rate into the instruction.

[0042] If the target feed rate reduction factor is determined to be less than the feed rate lower limit threshold, the feed rate lower limit threshold is written as the constrained dynamic feed rate instruction.

[0043] The present invention is improved in that the specific steps of S5 are as follows:

[0044] S511: When the absolute deviation value of the current from the baseline absolute residual of the actual load is detected to be lower than the normal recovery judgment threshold, the average value of the spindle cross-axis current is extracted to establish the current baseline current average value. The current offset difference between the current baseline current average value and the moving average value of the stable cutting history baseline is calculated. The actual effective radius deviation corresponding to the current offset difference is calculated by calling the preset empirical formula of hardware load and tool wear. The spatial component of the actual effective radius deviation is extracted according to the subsequent toolpath hardware surface normal vector data to obtain the three-dimensional compensation vector. The vector sum of the three-dimensional compensation vector and the original three-dimensional tool compensation data of the machine tool is calculated to generate real-time tool compensation correction data.

[0045] S512: Calculate the feed reduction value based on the current offset difference and lock the feed upper limit; receive the actual size deviation measurement data associated with the high hardness abnormal toolpath segment marking data, use the actual size deviation measurement data as the model loss error, use the empirical coefficient of the preset hardware load and tool wear empirical formula as the iterative weight parameter, calculate the gradient for the model loss error using the gradient descent algorithm to update the iterative weight parameter, obtain the empirical fine-tuning parameter, call the empirical fine-tuning parameter to update the toolpath position compensation parameter and the model empirical formula, update the toolpath position compensation parameter for subsequent continuous surface machining operations of the same batch of hardware parts according to the real-time tool compensation correction data, and output the continuous accuracy control command for CNC machining of hardware parts based on the updated toolpath position compensation parameter, the updated preset hardware load and tool wear empirical formula, and the feed upper limit.

[0046] A CNC machining process control system for hardware parts, the hardware CNC machining process control system being used to implement the above-mentioned hardware CNC machining process control method, the system comprising:

[0047] The cutting state preprocessing module processes the operating state and numerical control command parameters during the cutting process of hardware parts CNC machine tools to obtain a multi-dimensional time series state vector, extracts the historical cross-axis current sequence, and calculates the moving average value and data standard deviation of the historical cross-axis current sequence as a stable cutting history baseline.

[0048] The cutting load analysis module extracts the first-order time derivative of the cross-axis current and the rate of change of the current vector synthesis based on the multi-dimensional time series state vector as the actual load feature data set of the hardware parts. It uses the stable cutting history baseline and the actual load feature data set of the hardware parts to calculate and obtain the absolute residual of the actual load deviation from the baseline.

[0049] The abnormal working condition identification module establishes a local resistance change processing state of the hardware part when the actual load deviates from the baseline absolute residual and exceeds the basic fluctuation judgment threshold, and retrieves the corresponding cutting timestamp data. The cutting timestamp data is added as a time attribute to the three-dimensional hardware part mesh spatial position boundary information obtained by mapping the actual mechanical coordinates of the tool to the three-dimensional hardware part model mesh spatial coordinate system, so as to obtain the high hardness abnormal toolpath section marking data.

[0050] The parameter dynamic correction module, based on the high hardness abnormal toolpath section marking data, calls the numerical lower limit limit function to obtain the constrained dynamic feed rate writing instruction, and issues the constrained dynamic feed rate writing instruction to reduce the machine tool feed axis movement speed, and adjusts the machine tool feed state to a dynamic speed reduction load forced pull-back control state to achieve tool overload protection.

[0051] The machining closed-loop feedback module locks the upper limit of the feed and generates real-time tool compensation correction data. It receives actual size deviation measurement data associated with the high-hardness abnormal toolpath segment marking data as model loss error, obtains empirical fine-tuning parameters through gradient descent algorithm, calls the empirical fine-tuning parameters to update the toolpath position compensation parameters and model empirical formula, and outputs continuous accuracy control commands for CNC machining of hardware parts based on the updated toolpath position compensation parameters and the preset empirical formulas for hardware load and tool wear.

[0052] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0053] In this invention, a stable cutting baseline is established by analyzing the multi-dimensional operating state of the machine tool and extracting the cross-axis current characteristics. Based on the real-time load characteristic residual, the local resistance change situation is accurately perceived. Combined with the tool mechanical coordinate mapping, the boundary of the high-hardness abnormal toolpath is anchored. According to the abnormality mark, the feed rate writing command is dynamically issued to force the overload state to be pulled back. This effectively suppresses the destructive impact of the instantaneous increase in cutting force on the cutting edge, avoids the risk of dimensional distortion caused by edge chipping and tool holder elastic retreat, and integrates dimensional deviation data to introduce loss error assessment. The bias logic is updated by using experience to fine-tune parameters and output closed-loop accuracy adjustment command to eliminate the influence of residual error extension, thus ensuring the workpiece surface forming quality and tool life. Attached Figure Description

[0054] Figure 1 This is the main flow chart for the CNC machining process control of hardware parts according to the present invention;

[0055] Figure 2 This is a flowchart illustrating the cutting load anomaly identification effect of the present invention;

[0056] Figure 3 This is a flowchart illustrating the dynamic feed deceleration control effect of the present invention.

[0057] Figure 4 This is a flowchart illustrating the tool-repair correction and experience feedback effect of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0059] Please see Figures 1 to 4This embodiment provides a method for controlling the CNC machining process of hardware parts. In practical applications, such as during the actual operation of a CNC machine tool for cutting continuous curved surfaces, transition areas of holes and slots, and locally hardened areas of metal connectors, the machining controller continuously receives data from the spindle driver, feed axis servo driver, CNC interpolation controller, tool coordinate feedback interface, and workpiece 3D model data interface, and transmits the collected data, control commands, tool compensation information, and dimensional measurement feedback information under the same machining task identifier, including the following steps.

[0060] S1: Processes the operating status and CNC command parameters during the CNC machine tool cutting process of hardware parts to obtain a multi-dimensional time series state vector, extracts the historical cross-axis current sequence, and determines the moving average field and data standard deviation field of the historical cross-axis current sequence as the stable cutting history baseline. The multi-dimensional time series state vector is a state data object formed after being aligned with the interpolation clock, carrying spindle speed, feed rate, spindle cross-axis current, feed axis output current, tool mechanical coordinates, CNC code program segment number, and theoretical interpolation coordinates, and enters the subsequent load analysis, anomaly identification, and tool compensation feedback stages. The stable cutting history baseline is a reference data object of the cross-axis current change characteristics under stable cutting conditions, formed by effective sampling during the stable period, stored in the baseline buffer of the current machining task, and called by S2 and S3 in subsequent cutting processes of the same batch.

[0061] Valid sampled values ​​are jointly confirmed by the interpolation clock, driver status word, and the integrity of the acquisition interface. If the sampled data contains missing timestamps, duplicate timestamps, coordinate feedback mismatch, driver fault indicators, the spindle not entering cutting mode, or the CNC program segment number cannot be resolved, the corresponding sample is marked as invalid and written to the acquisition anomaly log. Invalid states are not included in the stable cutting history baseline but are only retained in the traceability cache for verification during the machining process. If the historical cross-axis current sequence has not yet formed a stable baseline after the machine tool starts, the initial baseline field corresponding to the material grade, tool type, and process stage in the machining process library is called. After continuous writing of valid samples during the stable period, the baseline field formed on-site replaces the initial baseline field, and the replacement record is written to the machining task log.

[0062] S111: Acquire the three-phase AC stator current of the spindle, the actual output current of the feed axis servo motor, the actual mechanical coordinates of the tool, the real-time spindle speed, the actual feed speed of the feed axis, the CNC code program segment number and the theoretical interpolation coordinates. Convert the three-phase AC stator current of the spindle into the quadrature axis current data of the spindle through Clark transformation and Park transformation. Based on the interpolation clock reference, encapsulate the real-time spindle speed, the actual feed speed of the feed axis, the quadrature axis current data of the spindle, the actual output current of the feed axis servo motor, the actual mechanical coordinates of the tool, the CNC code program segment number and the theoretical interpolation coordinates to obtain a multi-dimensional time series state vector.

[0063] The three-phase AC stator current of the spindle comes from the spindle driver current sampling interface, the actual output current of the feed axis servo motor comes from the feedback interface of each feed axis servo driver, the actual mechanical coordinates of the tool come from the machine tool position feedback channel, and the CNC code program segment number and theoretical interpolation coordinates come from the CNC interpolation controller. In this method, Clark transform and Park transform refer to the signal processing procedures used in the drive control field to convert the three-phase stator current into current components in a rotating coordinate system. The output spindle cross-axis current data is used to represent the current components related to the spindle cutting torque. Before each field enters the multidimensional time series state vector, the acquisition source is verified, timestamps are aligned, and program segment numbers are matched. If there are inconsistencies in the format of the acquired fields, the field boundaries are restored according to the field order registered in the interface configuration table. If restoration is not possible, the previous valid state is retained, and the current sample is marked as a state to be completed.

[0064] The cutting state data of the hardware parts at the current sampling time and the cutting state data of the hardware parts at historical sampling points are extracted from the multidimensional time series state vector. A weighted smoothing process is then performed on the current and historical cutting state data using a finite impulse response (FIR) algorithm. The weighted smoothing result is used to filter out high-frequency modulation noise in the multidimensional time series state vector, generating a filtered time series state vector. In this method, the FIR algorithm refers to a digital filtering process that uses the current and historical sampling fields within a preset filtering window as input and the smoothing weight fields registered in the process rule library as the processing basis. The weight fields are derived from the machine tool driver acquisition characteristics, tool process segment type, and interpolation control method, and are stored in the filtering rule buffer. When historical sampling is insufficient, the filtering input boundary is supplemented with already obtained valid samples and the previous valid state. A stable filtering state is entered after continuous and complete historical sampling.

[0065] S112: Collect the historical cross-axis current sequence of the filtered time series state vector during the cutting steady period, determine the moving average field and data standard deviation field of the historical cross-axis current sequence, and integrate the moving average field and data standard deviation field as the historical baseline for stable cutting.

[0066] The stable cutting period is jointly determined by the CNC code program segment number, theoretical interpolation coordinates, actual feed rate of the feed axis, and the change status of the spindle cross-axis current. When the program segment is in a continuous cutting phase, the tool mechanical coordinates match the theoretical interpolation coordinates, the feed rate has not entered a reversal or emergency stop control state, and the spindle cross-axis current is not occupied by an abnormal state indicator, the corresponding sample is entered into the historical cross-axis current sequence. The moving average field records the central trend of the spindle cross-axis current under stable cutting conditions, and the data standard deviation field records the normal fluctuation boundary of the spindle cross-axis current under stable cutting conditions. Together, they constitute the stable cutting historical baseline. The stable cutting historical baseline is stored in conjunction with the machining task identifier, material process identifier, and tool identifier. In S2, it is used to form the absolute residual of the actual load deviation from the baseline, and in S3, it is used to form the basic fluctuation judgment threshold field.

[0067] S2: Based on the multi-dimensional time series state vector, the first-order time derivative of the cross-axis current and the rate of change of the current vector are extracted as the actual load characteristic data set of the hardware parts. The absolute residual of the actual load deviation from the baseline is obtained using the stable cutting history baseline and the actual load characteristic data set of the hardware parts. The actual load characteristic data set of the hardware parts is a data object describing the dynamic changes of the current cutting load, including the trend field of the spindle cross-axis current changing with the interpolation cycle, and the load change field formed by the synthesis of the multi-axis currents of the feed axes. The absolute residual of the actual load deviation from the baseline is the deviation state field of the current cutting state from the stable cutting history baseline. It is entered into S3 as the basis for abnormal working condition identification and into S4 as the basis for feed rate adjustment.

[0068] S211: Extract the CNC code program segment number matching interpolation instruction information from the filtered time series state vector, establish the current machining state instruction set sequence, determine the geometric features of the interpolation point based on the current machining state instruction set sequence, generate subsequent toolpath hardware surface normal vector data, extract the geometric change features of the current machining state instruction set sequence based on the theoretical cutting thickness of the cutting tool and the cutting contact angle parameters of the tool, and generate the theoretical load expected change rate based on the preset cutting force mechanism logic operation model.

[0069] The current machining state instruction set sequence is a time-series data object composed of CNC code program segment number, theoretical interpolation coordinates, tool path type, tool posture field, and current process stage field. It describes the interpolation execution state of the current toolpath segment and adjacent toolpath segments. The geometric features of the interpolation points include the surface orientation between interpolation points, the toolpath entry and exit relationship, the change relationship of the tool-workpiece contact area, and the change relationship of the surface normal direction. The subsequent toolpath hardware part surface normal vector data comes from the surface patches in the 3D hardware part model mesh space coordinate system corresponding to the theoretical interpolation coordinates. The outward normal direction of the patch is unified according to the external direction of the workpiece entity. The normal direction of non-planar surface areas is organized using the adjacent patch consistency rule to ensure that the subsequent tool compensation correction direction is consistent with the workpiece surface geometric boundary.

[0070] The preset cutting force mechanism logic operation model is a textualized cutting load prediction rule registered in the process rule library. The material standard shear yield stress serves as the material reference field, sourced from the material process library. The theoretical cutting thickness of the cutting tool comes from the CNC interpolation path and tool geometry parameters. The tool cutting contact wrap angle parameters come from the tool type, cutting posture, and surface contact state. After geometric change characteristics are entered into this prediction rule, a theoretical load expected change rate field is formed according to the order of material shear state, tool contact state, and theoretical cutting thickness change. This field describes the trend that should occur when the load changes due to the toolpath geometry itself, and in S3, it distinguishes between geometrically abrupt load changes and locally abrupt resistance changes in load, together with the actual load change state.

[0071] S212: Obtain the interpolation time interval of the current trajectory interpolation control cycle, call the spindle cross-axis current data of the filtered time series state vector and the interpolation time interval to form a differential change rate field, obtain the first-order time derivative value of the cross-axis current, extract the actual output current of the feed axis servo motor of the filtered time series state vector to form a multi-axis current synthesis intensity field, construct the current vector synthesis change rate, use the first-order time derivative value of the cross-axis current and the current vector synthesis change rate as the hardware actual load feature data set, form the current absolute deviation field based on the current spindle cross-axis current value of the filtered time series state vector and the moving average field of the stable cutting history baseline, and synthesize the current absolute deviation field and the first-order time derivative value of the cross-axis current in the hardware actual load feature data set according to the contribution relationship registered in the load parsing rule base to form the actual load deviation from the baseline absolute residual.

[0072] In this method, the first-order time derivative of the quadrature-axis current refers to the trend field of the spindle quadrature-axis current as the interpolation time progresses. The input sources are the filtered spindle quadrature-axis current data and the interpolation time interval provided by the interpolation controller. The rate of change of the current vector synthesis refers to the trend field between adjacent effective samples after the actual output currents of each feed axis are synthesized into a single multi-axis load intensity at the same sampling moment. The multi-axis current synthesis intensity field is generated according to a unified synthesis caliber based on the servo controller's contribution to the current amplitude of each axis, used to avoid directly dispersing the judgment of currents from different feed axes. The synthesis caliber comes from the machine tool axis configuration table and is updated synchronously with the machine tool axis definitions, driver feedback channels, and coordinate system configuration.

[0073] The absolute current deviation field indicates the degree of deviation of the current spindle cross-axis current from the moving average field of the historical cutting baseline. The contribution relationship field comes from the load analysis rule base, which registers the contribution boundaries of different load characteristics in residual synthesis according to machining process, tool type, and material process identifier. When the cross-axis current data is missing but the feed axis output current is complete, the current sampling is marked as the spindle current pending completion state, only the feed axis change trend is retained and the output anomaly judgment is paused; when the feed axis current is missing but the spindle cross-axis current is complete, the spindle load single-source monitoring state is entered, and the source data gap is recorded in the log. After subsequent sampling is restored, the multi-source load analysis state is re-entered.

[0074] S3: When the actual load deviates from the baseline absolute residual exceeding the basic fluctuation judgment threshold, a local resistance change machining state for the hardware part is established, and the corresponding cutting timestamp data is retrieved. The cutting timestamp data is added as a time attribute to the spatial boundary information of the 3D hardware part mesh obtained by mapping the actual mechanical coordinates of the tool to the 3D hardware part model mesh spatial coordinate system, thus obtaining the high-hardness abnormal toolpath segment marking data. The basic fluctuation judgment threshold is a judgment boundary generated from the standard deviation field of the stable cutting history baseline and the normal load fluctuation tolerance field in the process rule library, used to identify load states that exceed the range of stable cutting fluctuations. The high-hardness abnormal toolpath segment marking data is a toolpath marking object with time attributes, spatial boundary attributes, program segment attributes, and abnormal state attributes. Entering S4 triggers feed rate reduction control, and entering S5 serves as an index for dimensional measurement feedback and tool compensation update.

[0075] S311: Determine the cutting tool trajectory curvature change rate field based on the current machining state instruction set sequence, and obtain the preset geometric change threshold field. Set the basic fluctuation judgment threshold field based on the data standard deviation field of the stable cutting history baseline. Monitor the current absolute deviation field in the absolute residual of the actual load deviation from the baseline. Compare the current absolute deviation field with the basic fluctuation judgment threshold field. When the current absolute deviation field is determined to enter an abnormal fluctuation state, the cutting tool trajectory curvature change rate field has not entered a geometric change state, and the theoretical load expected change rate remains stable, determine that the current cutting tool machining position has reached the preset cutting abnormal condition, and establish the local resistance change machining state of the hardware part.

[0076] The preset geometric change threshold field is derived from the toolpath process rule library, registered based on tool type, surface machining segment type, interpolation control strategy, and machine tool axis motion boundary. The normal load fluctuation tolerance field is derived from the load fluctuation statistical rules under a no-hardness-change test environment and is not rewritten based on a single abnormal sampling in the field. The standard deviation field of the stable cutting history baseline data is incorporated into this rule to form the basic fluctuation judgment threshold field and stored in the abnormal judgment cache of the current machining task. Multiple judgment criteria are executed in a fixed order: first, it is confirmed that the absolute current deviation field has entered an abnormal fluctuation state; then, it is confirmed that the tool trajectory curvature change rate field has not been occupied by the geometric change state; subsequently, the theoretical load expected change rate field is read to confirm that the toolpath geometry has not caused the expected load change. If any of the preceding judgments fails, a local resistance change machining state is not established, but the sampling state is written to the corresponding geometric load change record or the load to be confirmed record.

[0077] The local resistance change machining state of hardware parts is a status indicator of a sudden increase in load when the current tool cutting position experiences a stable toolpath geometry. This status indicator includes the machining task identifier, program segment number, tool mechanical coordinate index, residual state, geometric state, and theoretical load state. After the state is established, the anomaly identification cache locks the corresponding sampling window to prevent duplicate sampling and subsequent marking. If subsequent sampling restores the stable state, the anomaly identification cache retains the already formed status indicator and passes the restored state to S5. If the controller log writing fails, the status indicator is first written to a local temporary cache and then rewritten after the log interface recovers. Before rewriting, it does not affect S4's call to feed control commands.

[0078] S312: Obtain the preset three-dimensional hardware model mesh spatial coordinate system. For the processing state of local resistance change in the hardware, retrieve the cutting timestamp data corresponding to the time of occurrence. Based on the cutting timestamp data, extract the actual mechanical coordinates of the tool matched in the filtered time series state vector. Call the three-dimensional hardware model mesh spatial coordinate system to perform spatial geometric position mapping operation on the actual mechanical coordinates of the tool, obtain the spatial position boundary information of the three-dimensional hardware mesh, and add the cutting timestamp data as a time attribute to the spatial position boundary information of the three-dimensional hardware mesh to obtain the high hardness abnormal toolpath segment marking data.

[0079] The 3D hardware model mesh spatial coordinate system is a spatial data object formed by aligning the workpiece 3D model, machine tool clamping coordinate system, and tool mechanical coordinate system. It contains triangular mesh patches, patch outward normals, mesh boundaries, program segment indexes, and workpiece entity boundaries. Before the actual tool mechanical coordinates are mapped, they are aligned with the workpiece model coordinates using clamping coordinate transformation rules derived from the clamping process file and machine tool coordinate system configuration. If alignment fails, the workpiece model version is inconsistent with the machining task identifier, or the program segment index cannot be matched, the current abnormal state enters a spatial mapping pending confirmation state, and the formation of high-hardness abnormal toolpath segment marker data is paused until the model version or coordinate transformation relationship is restored, at which point mapping continues.

[0080] When acquiring the spatial position boundary information of the 3D hardware part mesh, a spherical collision bounding box corresponding to a preset spatial radius field is constructed with the actual mechanical coordinates of the tool as the geometric center point. The preset spatial radius field is derived from the tool radius, machining allowance, and process safety boundary configuration and is stored in the tool process rule library. The spherical collision bounding box performs spatial topological intersection detection with each triangular facet mesh in the spatial coordinate system of the 3D hardware part model mesh. Triangular facet meshes with spatial overlap attributes are organized into intersecting mesh clusters. The maximum and minimum coordinate fields of the intersecting mesh clusters in each orthogonal axis direction are extracted as the spatial position boundary information of the 3D hardware part mesh. After the cutting timestamp data, program segment number, and abnormal status identifier are written into this boundary information, high-hardness abnormal toolpath segment marker data is formed, which can be jointly invoked by feed control, measurement feedback, and tool compensation update.

[0081] S4: Based on the high-hardness abnormal toolpath segment marker data, the numerical lower limit constraint function is called to obtain the constrained dynamic feed rate write instruction. This instruction is then issued to reduce the machine tool feed axis speed, adjusting the machine tool feed state to a dynamic speed reduction load forced pull-back control state. In this method, the numerical lower limit constraint function refers to the boundary verification processing registered in the controller rule base. It is used to execute a lower limit constraint between the target feed rate reduction factor and the feed rate lower limit threshold field, ensuring that the feed control instruction does not enter a tool-holding interference risk state. The constrained dynamic feed rate write instruction is a control instruction object written to the feed rate control register, carrying the target feed rate field, lower limit constraint state, program segment index, and abnormal toolpath segment marker index.

[0082] S411: Based on the high-hardness abnormal toolpath segment marking data, within the time window confirming the triggering of the preset cutting abnormal state, extract the spindle motor torque constant field, the ball end mill maximum allowable cutting torque upper limit field, and the preset exponential mapping relationship field between the cutting torque and the feed rate reduction ratio. For the actual load deviating from the baseline absolute residual current field, form the actual cutting torque overload field with the spindle motor torque constant field. Compare the actual cutting torque overload field with the ball end mill maximum allowable cutting torque upper limit field to form the cutting torque difference field. Generate the torque approximation limit field based on the cutting torque difference field.

[0083] The spindle motor torque constant field is derived from the spindle driver parameter table. The maximum allowable cutting torque upper limit field for ball end mills is derived from the tool technology library and tool life management records. The exponential mapping relationship field is derived from the feed control strategy table and is used to convert the torque approximation state into a feed rate reduction state. The actual cutting torque overload field represents the overload state after converting the current current deviation state to the cutting torque side. The cutting torque difference field represents the degree of approximation of the current overload state relative to the tool's allowable cutting boundary. The torque approximation limit field serves as the input for S412 to select the target feed rate reduction factor. When the spindle motor torque constant field is missing, the control process reads the equipment parameter cache of the same spindle driver model. When the tool upper limit field is missing, dynamic reduction factor writing is not performed, the machine tool feed state enters a protection pause pending confirmation state, and a manual review flag is output.

[0084] S412: Based on the torque approximation limit field and the exponential mapping relationship field, perform mapping processing to obtain the target feed rate reduction factor field and the preset feed rate lower limit threshold field. Call the numerical lower limit constraint function to perform boundary cross-validation on the target feed rate reduction factor field to determine whether the target feed rate reduction factor field is lower than the feed rate lower limit threshold field. When the target feed rate reduction factor field is not lower than the feed rate lower limit threshold field, obtain the constrained dynamic feed rate write instruction. Issue the constrained dynamic feed rate write instruction through the feed speed control register to reduce the machine tool feed axis movement speed, reduce the volume of metal material removed by the cutting edge per unit time, and adjust the machine tool feed state to the dynamic speed reduction load forced pull-back control state.

[0085] The feed rate lower limit threshold field is determined by the proportional boundary formed by the critical interference feed rate field in the previous tool holding test record and the machine tool's rated machining feed rate field. The critical interference feed rate field comes from the process verification record of the tool and material combination, while the machine tool's rated machining feed rate field comes from the CNC machining process document and machine tool parameter table. When comparing the target feed rate reduction factor field with the feed rate lower limit threshold field, if the target field is above the lower limit boundary, the target field is directly written as the constrained dynamic feed rate instruction; if the target field is below the lower limit boundary, the lower limit threshold field is written as the constrained dynamic feed rate instruction. This processing result is written to the feed rate control register, and the register feedback status is bound to the machining task identifier for storage.

[0086] After the control command is issued, the system waits for the feed axis servo driver to return an execution confirmation status. If the register write is unconfirmed, the servo driver returns an error, or the feed axis is in an emergency stop or paused state, the control status enters the command unconfirmed branch. The constrained dynamic feed rate write command is retained in the control buffer, the abnormal status and the reason for unconfirmation are written to the control log, and a protection pause control flag is output. Once the feed axis feedback speed matches the command status, the machine tool feed status is marked as dynamically decelerated and forced back to control status. This status is synchronously transmitted to S5 along with the high-hardness abnormal toolpath segment marking data for subsequent feed upper limit locking and tool compensation correction.

[0087] S5: Locks the feed upper limit and generates real-time tool compensation correction data. It receives actual dimensional deviation measurement data associated with high-hardness abnormal toolpath segment marker data as model loss error. It obtains empirical fine-tuning parameters through a gradient descent algorithm, updates the toolpath position compensation parameters and model empirical formulas using these parameters, and outputs continuous precision control commands for CNC machining of hardware parts based on the updated toolpath position compensation parameters and preset empirical formulas for hardware load and tool wear. Real-time tool compensation correction data is the compensation data object used in the current machining task to correct the actual cutting position of the tool, carrying three-dimensional compensation direction, compensation status, tool wear association fields, and abnormal toolpath segment marker indexes. Model loss error is the error feedback field between the actual dimensional deviation measurement data and the model prediction deviation, used to update empirical coefficients, toolpath position compensation parameters, and load wear empirical rules.

[0088] S511: When the absolute deviation field of the current from the baseline absolute residual of the actual load is detected to be lower than the normal recovery judgment threshold field, the spindle cross-axis current average field is extracted to establish the current baseline current average field. The current offset difference field between the current baseline current average field and the stable cutting history baseline moving average field is determined. The textual empirical rule corresponding to the preset hardware load and tool wear empirical formula is called to determine the actual effective radius deviation field corresponding to the current offset difference field. The spatial component of the actual effective radius deviation field is extracted based on the subsequent toolpath hardware surface normal vector data to obtain the three-dimensional compensation vector. The three-dimensional compensation vector is integrated with the machine tool's original three-dimensional tool compensation data to generate real-time tool compensation correction data.

[0089] The normal recovery judgment threshold field is derived from the stable cutting history baseline, feed control status, and recovery boundaries registered in the process rule library, and is stored in the recovery judgment buffer of the current machining task. When the absolute current deviation field is lower than the recovery judgment threshold field, it indicates that the cutting load has exited the abnormal overload state and entered the data conditions for tool compensation correction. The spindle cross-axis current average field is taken from the effective sampled data during the recovery phase, and the current baseline current average field is used to reflect the offset state of the current tool load baseline after passing through the abnormal section and speed reduction control. The current offset difference field is entered into the empirical rule of hardware load and tool wear. The empirical coefficient of this rule is derived from the historical machining records of the same material, the same tool, and the same process, as well as the dimensional measurement feedback of this batch, and is used to organize the load baseline offset into the actual effective radius change state of the tool.

[0090] The actual effective radius deviation field is decomposed into spatial compensation directions along the normal vector data of the hardware surface in the subsequent toolpath. The three-dimensional compensation vector enters the machine tool tool compensation buffer and is checked for consistency with the original three-dimensional tool compensation data in the same machine tool coordinate system and the same workpiece coordinate system. After the consistency check is passed, real-time tool compensation correction data is generated and bound to the high-hardness abnormal toolpath segment marker data. If the coordinate system is inconsistent, the normal vector data is missing, or the original tool compensation data is locked, the real-time tool compensation correction data enters the pending confirmation state, and subsequent program segments do not call this compensation data. The control log records the coordinate, normal, or tool compensation locking reason.

[0091] S512: Based on the current offset difference field, a feed down adjustment field is formed and the feed upper limit is locked; the actual size deviation measurement data associated with the high hardness abnormal toolpath segment marking data is received, the actual size deviation measurement data is used as the model loss error, and the empirical coefficient field corresponding to the preset hardware load and tool wear empirical formula is used as the iterative weight parameter. The iterative weight parameter is adjusted by the gradient descent algorithm for the model loss error to obtain the empirical fine-tuning parameter. The empirical fine-tuning parameter is called to update the toolpath position compensation parameter and the model empirical formula. The toolpath position compensation parameter for subsequent continuous surface machining operations of the same batch of hardware parts is updated according to the real-time tool compensation correction data. Based on the updated toolpath position compensation parameter, the updated preset hardware load and tool wear empirical rule and the feed upper limit, the continuous accuracy control command for hardware CNC machining is output.

[0092] The feed reduction field is formed after the current offset difference field is entered into the feed control rule base, and is used to limit the upper limit of the feed for subsequent continuous surface machining segments. The feed upper limit lock record includes the machining task identifier, the high-hardness abnormal toolpath segment marker index, the feed control status, and the recovery status. It is stored in the control buffer and output to the CNC interpolation controller. The actual dimensional deviation measurement data comes from the online probe, the in-machine measurement program, or the post-machining dimensional detection interface. Before entering this step, it needs to be matched with the spatial boundary and program segment number in the high-hardness abnormal toolpath segment marker data. If the measurement data has inconsistent workpiece identifiers, cannot be mapped to measurement coordinates, cannot be associated with abnormal segments, or the measurement interface returns an abnormality, it will not enter the empirical fine-tuning process and will be set to a measurement data pending verification status.

[0093] In this method, gradient descent refers to the iterative rules for adjusting empirical coefficient fields based on model loss error feedback. After the model loss error enters the update process, the current empirical coefficient fields, toolpath position compensation parameters, and real-time tool compensation correction data are first read. Then, the model's predicted deviation direction is compared with the actual dimensional deviation direction, and the empirical coefficient fields are updated along the adjustment direction that reduces the error, forming empirical fine-tuning parameters. These empirical fine-tuning parameters do not directly overwrite all historical empirical rules; instead, they form an updated version in the empirical records corresponding to the current material, tool, process, and abnormal segment markers. After the updated version passes rule consistency verification, it is written to the model empirical rule cache and the toolpath position compensation parameter cache. If the rule consistency verification fails, the previous empirical rules are retained, the empirical fine-tuning parameters are written to the pending review cache, and output to subsequent machining segments is paused.

[0094] The continuous precision control command for CNC machining of hardware parts includes updated toolpath position compensation parameters, real-time tool compensation correction data, feed upper limit lock status, abnormal section marker index, and empirical rule version identifier. After this control command enters the CNC interpolation controller, subsequent continuous surface machining operations adjust the tool position according to the updated compensation parameters and perform feed control according to the feed upper limit. After the control command is confirmed by the CNC interpolation controller, the confirmation status is written to the machining task log; if the control command is not confirmed, subsequent program segments retain the original control status and output a pending confirmation flag, and update the tool compensation and feed control caches only after the controller returns a confirmation status.

[0095] The CNC machining process control system for hardware parts, used in conjunction with the aforementioned method, includes a cutting state preprocessing module, a cutting load analysis module, an abnormal working condition identification module, a parameter dynamic correction module, and a machining closed-loop feedback module. The cutting state preprocessing module handles the acquisition, alignment, filtering, and stable cutting history baseline generation in S1. Its input interface connects to the spindle driver, feed axis servo driver, tool coordinate feedback interface, and CNC interpolation controller. Its output is a filtered time series state vector and a stable cutting history baseline. The cutting load analysis module handles the instruction set sequence organization, theoretical load expected rate of change generation, actual load characteristic data set construction, and residual generation in S2. Its output is the absolute residual of the actual load deviation from the baseline. The abnormal working condition identification module handles the threshold field setting, geometrical abrupt change elimination, local resistance mutation state establishment, and high-hardness abnormal toolpath segment marking data generation in S3. Its output is the abnormal state and spatial boundary marking. The parameter dynamic correction module handles the torque approximation state organization, feed rate lower limit constraint, register writing, and dynamic speed reduction load forced pull-back control in S4. Its output is the constrained dynamic feed rate writing instruction and its confirmation status. The machining closed-loop feedback module in S5 handles feed upper limit locking, real-time tool compensation correction data generation, dimensional measurement feedback reception, empirical fine-tuning parameter updates, and continuous accuracy control command output, transmitting update results to the CNC interpolation controller, tool compensation buffer, and model empirical rule buffer. Data relationships between modules are maintained using machining task identifiers, program segment numbers, time attributes, and spatial boundary indexes. Acquisition anomalies, mapping anomalies, unconfirmed control, and measurement feedback anomalies are all written to the corresponding log buffers. These log buffers are bound to machining task records for machining process traceability and subsequent process rule updates.

[0096] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for controlling the CNC machining process of hardware parts, characterized in that, Includes the following steps: S1: Process the operating status and numerical control command parameters of the CNC machine tool during the cutting process of hardware parts to obtain a multi-dimensional time series state vector, extract the historical cross-axis current sequence, and calculate the moving average value and data standard deviation of the historical cross-axis current sequence as a stable cutting history baseline. S2: Based on the multidimensional time series state vector, extract the first time derivative of the cross-axis current and the rate of change of the current vector as the actual load feature data set of the hardware parts, and use the stable cutting history baseline and the actual load feature data set of the hardware parts to calculate the absolute residual of the actual load deviation from the baseline. S3: When the actual load deviates from the baseline absolute residual and exceeds the basic fluctuation judgment threshold, establish the local resistance change processing state of the hardware and retrieve the corresponding cutting timestamp data. Add the cutting timestamp data as a time attribute to the three-dimensional hardware mesh spatial position boundary information obtained by mapping the actual mechanical coordinates of the tool to the three-dimensional hardware model mesh spatial coordinate system to obtain the high hardness abnormal toolpath section marking data. S4: Based on the high hardness abnormal toolpath segment marking data, call the numerical lower limit limit function to obtain the constrained dynamic feed rate writing instruction, and issue the constrained dynamic feed rate writing instruction to reduce the machine tool feed axis movement speed, and adjust the machine tool feed state to the dynamic speed reduction load forced pull-back control state to realize tool overload protection. S5: Lock the upper limit of feed and generate real-time tool compensation correction data. Receive actual size deviation measurement data associated with the high-hardness abnormal toolpath segment marking data as model loss error. Obtain empirical fine-tuning parameters through gradient descent algorithm. Call the empirical fine-tuning parameters to update the toolpath position compensation parameters and model empirical formula. Based on the updated toolpath position compensation parameters and the preset empirical formulas for hardware load and tool wear, output continuous precision control instructions for hardware CNC machining.

2. The method for controlling the CNC machining process of hardware parts according to claim 1, characterized in that, The specific steps of S1 are as follows: S111: Acquire the three-phase AC stator current of the spindle, the actual output current of the feed axis servo motor, the actual mechanical coordinates of the tool, the real-time spindle speed, the actual feed speed of the feed axis, the CNC code program segment number, and the theoretical interpolation coordinates. Calculate the spindle cross-axis current data of the three-phase AC stator current of the spindle using Clarke transform and Park transform. Encapsulate the real-time spindle speed, the actual feed speed of the feed axis, the spindle cross-axis current data, the actual output current of the feed axis servo motor, the actual mechanical coordinates of the tool, the CNC code program segment number, and the theoretical interpolation coordinates according to the interpolation clock reference to obtain a multi-dimensional time-series state vector. Extract the cutting state data of the hardware part at the current sampling moment and the cutting state data of the hardware part at historical sampling points from the multi-dimensional time-series state vector. Calculate the weighted sum of the current cutting state data and the historical cutting state data using the finite impulse response algorithm. Call the weighted sum to filter out the high-frequency modulation noise of the multi-dimensional time-series state vector to generate a filtered time-series state vector. S112: Collect the historical cross-axis current sequence of the filtered time series state vector during the cutting steady period, calculate the moving average value and data standard deviation of the historical cross-axis current sequence, and integrate the moving average value and the data standard deviation as the historical baseline for stable cutting.

3. The method for controlling the CNC machining process of hardware parts according to claim 2, characterized in that, The specific steps of S2 are as follows: S211: Extract the CNC code program segment number matching interpolation instruction information of the filtered time series state vector, establish the current machining state instruction set sequence, calculate the geometric features of the interpolation point according to the current machining state instruction set sequence, generate the subsequent toolpath hardware surface normal vector data, extract the geometric change features of the current machining state instruction set sequence according to the theoretical cutting thickness of the cutting tool and the cutting contact angle parameter of the cutting tool, and calculate the expected change rate of the theoretical load according to the preset cutting force mechanism logic operation model; S212: Obtain the interpolation time interval of the current trajectory interpolation control cycle, call the spindle cross-axis current data of the filtered time series state vector and the interpolation time interval to calculate the differential rate of change, obtain the first-order time derivative value of the cross-axis current, extract the actual output current of the feed axis servo motor of the filtered time series state vector to calculate the Euclidean norm change, construct the current vector composite rate of change, use the first-order time derivative value of the cross-axis current and the current vector composite rate of change as the actual load feature data set of the hardware, calculate the absolute current deviation value based on the current spindle cross-axis current value of the filtered time series state vector and the moving average value of the stable cutting historical baseline, calculate the weighted sum of the absolute current deviation value and the first-order time derivative value of the cross-axis current in the actual load feature data set of the hardware, and use the weighted sum as the absolute residual of the actual load deviation from the baseline.

4. The method for controlling the CNC machining process of hardware parts according to claim 3, characterized in that, The process of calculating and generating the theoretical expected rate of change of load based on the preset cutting force mechanism logic operation model is as follows: The material standard shear yield stress is set as the material reference parameter of the preset cutting force mechanism logic operation model. Based on the material reference parameter, the product multiplier relationship between the theoretical cutting thickness of the cutting tool and the cutting contact angle parameter of the tool, a cutting force mapping function is constructed. The geometric change characteristics are substituted into the cutting force mapping function to perform time difference differentiation operation to obtain the expected rate of change of the theoretical load. The process of constructing the current vector synthesis rate of change is as follows: The actual output current of each feed axis in the three-dimensional mechanical coordinate system is extracted as the actual output current of the feed axis servo motor. The sum of squares of the actual output current of each feed axis at the same sampling time is calculated. The square root operation is performed on the sum of squares to obtain the current norm at the current sampling time. The current norm at the historical sampling time corresponding to the interpolation time interval is called. The Euclidean norm change between the current norm at the current sampling time and the current norm at the historical sampling time is calculated. The ratio of the Euclidean norm change to the interpolation time interval is set as the current vector synthesis rate of change.

5. The method for controlling the CNC machining process of hardware parts according to claim 1, characterized in that, The specific steps of S3 are as follows: S311: Calculate the cutting tool trajectory curvature change rate value according to the current machining state instruction set sequence, and obtain the preset geometric change threshold. Set the basic fluctuation judgment threshold based on the data standard deviation of the stable cutting history baseline. Monitor the current absolute deviation value of the actual load deviating from the baseline absolute residual. Compare the current absolute deviation value with the basic fluctuation judgment threshold. Under the condition that the current absolute deviation value exceeds the basic fluctuation judgment threshold, the cutting tool trajectory curvature change rate value is lower than the preset geometric change threshold, and the theoretical load expected change rate remains stable, determine that the current cutting tool machining position has reached the preset cutting abnormal condition, and establish the hardware part local resistance sudden change machining state. S312: Obtain a preset three-dimensional hardware model mesh spatial coordinate system. For the processing state of the hardware part with local resistance change, retrieve the cutting timestamp data corresponding to the time of occurrence. Based on the cutting timestamp data, extract the actual mechanical coordinates of the tool matched in the filtered time series state vector. Call the three-dimensional hardware model mesh spatial coordinate system to perform spatial geometric position mapping operation on the actual mechanical coordinates of the tool to obtain the spatial position boundary information of the three-dimensional hardware mesh. Add the cutting timestamp data as a time attribute to the spatial position boundary information of the three-dimensional hardware mesh to obtain the high hardness abnormal toolpath segment marking data.

6. The method for controlling the CNC machining process of hardware parts according to claim 5, characterized in that, The process of setting the basic fluctuation judgment threshold based on the data standard deviation of a stable cutting history baseline is as follows: Extract the confidence factor of normal load fluctuation under a test environment without sudden hardness change as the preset fluctuation tolerance coefficient; The extreme value limit of fluctuation is obtained by multiplying the standard deviation of the stable cutting history baseline data with the preset fluctuation tolerance coefficient. The extreme value limit of the fluctuation is determined as the basic fluctuation judgment threshold; The process of obtaining the spatial location boundary information of the three-dimensional hardware component mesh is as follows: A spherical collision bounding box with a preset spatial radius is constructed with the actual mechanical coordinates of the cutting tool as the geometric center point; Calculate the spatial topological intersection relationship between the spherical surface of the spherical collision bounding box and each triangular mesh contained in the spatial coordinate system of the three-dimensional hardware model mesh; Extract triangular facet meshes with spatial overlap properties to construct intersecting mesh clusters; Retrieve the maximum and minimum coordinate values ​​of the intersecting mesh cluster in the three orthogonal axes of the spatial coordinate system; The maximum coordinate value and the minimum coordinate value are used as the spatial boundary information of the three-dimensional hardware mesh.

7. The method for controlling the CNC machining process of hardware parts according to claim 1, characterized in that, The specific steps of S4 are as follows: S411: Based on the high-hardness abnormal toolpath segment marking data, within the time window for confirming the triggering of the preset cutting abnormal state, extract the spindle motor torque constant, the maximum allowable cutting torque upper limit parameter of the ball end mill, and the exponential mapping relationship between the preset cutting torque and feed rate reduction ratio. Perform a product operation on the absolute current deviation value of the actual load deviation from the baseline absolute residual and the spindle motor torque constant to obtain the actual cutting torque overload value. Compare the actual cutting torque overload value with the maximum allowable cutting torque upper limit parameter of the ball end mill to perform a difference calculation to obtain the cutting torque difference value. Generate a torque approximation limit value based on the cutting torque difference value. S412: Based on the torque approximation limit and the exponential mapping relationship, perform mapping calculation to obtain the target feed rate reduction factor, obtain the preset feed rate lower limit threshold, call the numerical lower limit constraint function to perform boundary cross-validation on the target feed rate reduction factor to determine whether the target feed rate reduction factor is lower than the feed rate lower limit threshold, and obtain the constrained dynamic feed rate write instruction under the condition that the target feed rate reduction factor is not lower than the feed rate lower limit threshold. Issue the constrained dynamic feed rate write instruction through the feed speed control register to reduce the machine tool feed axis movement speed, reduce the volume of hardware material removed by the cutting edge per unit time, and adjust the machine tool feed state to the dynamic speed reduction load forced pull-back control state.

8. The method for controlling the CNC machining process of hardware parts according to claim 7, characterized in that, The process of obtaining the constrained dynamic feed rate write instruction under the condition that the target feed rate reduction factor is not lower than the feed rate lower limit threshold is as follows: Obtain the critical interference feed rate from the previous tool holding test record, and obtain the rated machining feed rate of the machine tool; Calculate the ratio parameter between the critical interference feed rate and the rated machining feed rate of the machine tool, and set the ratio parameter as the lower limit threshold of the feed rate; Compare the numerical relationship between the target feed rate reduction factor and the feed rate lower limit threshold. If the target feed rate reduction factor is determined to be greater than or equal to the feed rate lower limit threshold, the target feed rate reduction factor is written as the constrained dynamic feed rate into the instruction. If the target feed rate reduction factor is determined to be less than the feed rate lower limit threshold, the feed rate lower limit threshold is written as the constrained dynamic feed rate instruction.

9. The method for controlling the CNC machining process of hardware parts according to claim 1, characterized in that, The specific steps of S5 are as follows: S511: When the absolute deviation value of the current from the baseline absolute residual of the actual load is detected to be lower than the normal recovery judgment threshold, the average value of the spindle cross-axis current is extracted to establish the current baseline current average value. The current offset difference between the current baseline current average value and the moving average value of the stable cutting history baseline is calculated. The actual effective radius deviation corresponding to the current offset difference is calculated by calling the preset empirical formula of hardware load and tool wear. The spatial component of the actual effective radius deviation is extracted according to the subsequent toolpath hardware surface normal vector data to obtain the three-dimensional compensation vector. The vector sum of the three-dimensional compensation vector and the original three-dimensional tool compensation data of the machine tool is calculated to generate real-time tool compensation correction data. S512: Calculate the feed reduction value based on the current offset difference and lock the feed upper limit; The system receives actual dimensional deviation measurement data associated with the high-hardness abnormal toolpath segment marking data, uses the actual dimensional deviation measurement data as model loss error, and uses the empirical coefficients of the preset empirical formula for hardware load and tool wear as iterative weight parameters. It calculates the gradient for the model loss error using a gradient descent algorithm to update the iterative weight parameters, obtaining empirical fine-tuning parameters. It then calls the empirical fine-tuning parameters to update the toolpath position compensation parameters and the model empirical formula. Based on the real-time tool compensation correction data, it updates the toolpath position compensation parameters for subsequent continuous surface machining operations of the same batch of hardware parts. Based on the updated toolpath position compensation parameters, the updated preset empirical formula for hardware load and tool wear, and the feed upper limit, it outputs continuous precision control commands for CNC machining of hardware parts.

10. A CNC machining process control system for hardware parts, characterized in that, The system is used to implement the CNC machining process control method for hardware parts as described in any one of claims 1-9, and the system includes: The cutting state preprocessing module processes the operating state and numerical control command parameters during the cutting process of hardware parts CNC machine tools to obtain a multi-dimensional time series state vector, extracts the historical cross-axis current sequence, and calculates the moving average value and data standard deviation of the historical cross-axis current sequence as a stable cutting history baseline. The cutting load analysis module extracts the first-order time derivative of the cross-axis current and the rate of change of the current vector synthesis based on the multi-dimensional time series state vector as the actual load feature data set of the hardware parts. It uses the stable cutting history baseline and the actual load feature data set of the hardware parts to calculate and obtain the absolute residual of the actual load deviation from the baseline. The abnormal working condition identification module establishes a local resistance change processing state of the hardware part when the actual load deviates from the baseline absolute residual and exceeds the basic fluctuation judgment threshold, and retrieves the corresponding cutting timestamp data. The cutting timestamp data is added as a time attribute to the three-dimensional hardware part mesh spatial position boundary information obtained by mapping the actual mechanical coordinates of the tool to the three-dimensional hardware part model mesh spatial coordinate system, so as to obtain the high hardness abnormal toolpath section marking data. The parameter dynamic correction module, based on the high hardness abnormal toolpath section marking data, calls the numerical lower limit limit function to obtain the constrained dynamic feed rate writing instruction, and issues the constrained dynamic feed rate writing instruction to reduce the machine tool feed axis movement speed, and adjusts the machine tool feed state to a dynamic speed reduction load forced pull-back control state to achieve tool overload protection. The machining closed-loop feedback module locks the upper limit of the feed and generates real-time tool compensation correction data. It receives actual size deviation measurement data associated with the high-hardness abnormal toolpath segment marking data as model loss error, obtains empirical fine-tuning parameters through gradient descent algorithm, calls the empirical fine-tuning parameters to update the toolpath position compensation parameters and model empirical formula, and outputs continuous accuracy control commands for CNC machining of hardware parts based on the updated toolpath position compensation parameters and the preset empirical formulas for hardware load and tool wear.