Computer numerical control system data desensitization method based on machine learning

By employing machine learning-based methods, linear fitting, and energy density analysis, the problem of false alarms caused by material hardness fluctuations in computer numerical control systems was solved. This enabled high-precision tool wear monitoring and data desensitization, ensuring the security of workpiece geometric information.

CN121785238BActive Publication Date: 2026-05-08NANJING GAOSHANG ELECTROMECHANICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING GAOSHANG ELECTROMECHANICAL TECH CO LTD
Filing Date
2026-03-06
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing computer numerical control (CNC) system data processing methods, while achieving data anonymization of cutting data, struggle to ensure robust monitoring. In particular, when dealing with batch fluctuations in raw material, they cannot effectively distinguish between changes in material hardness and tool wear, leading to false alarms or relaxed thresholds, and missing early wear.

Method used

A machine learning-based approach is adopted to obtain the real-time cutting load sequence of the CNC system, perform linear fitting using the locally stored standard cutting load sequence, obtain the material hardness coefficient and wear characteristic components, calculate the energy density, and upload these features to the cloud for fault warning, avoiding the direct uploading of workpiece geometric information.

Benefits of technology

It enables precise differentiation between material hardness fluctuations and tool wear without disclosing workpiece geometry information, improving monitoring accuracy, accurately capturing fault locations and providing early warning signals, and enhancing the security of data anonymization and the reliability of monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121785238B_ABST
    Figure CN121785238B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data processing, and in particular to a computer numerical control system data desensitization method based on machine learning. The method takes the real-time cutting load sequence of the numerical control system based on the spindle position, eliminates the influence of speed fluctuation; linear fitting is performed with the standard cutting load sequence stored locally as the independent variable and the real-time cutting load sequence as the dependent variable, decoupling is performed to obtain the fitting slope representing the material hardness coefficient and the residual sequence representing the wear characteristic component; the material hardness coefficient is used for normalization processing of the characteristic component and energy density is calculated to generate the grinding energy accumulation value; the grinding energy accumulation value, the material hardness coefficient and the fault occurrence position are uploaded to the cloud storage and fault early warning is performed. The present application embodiment can realize data desensitization without uploading the original data of the workpiece geometry, effectively solving the technical problems of tool wear monitoring false alarm and workpiece geometry privacy leakage caused by material hardness fluctuation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more specifically to a data anonymization method for computer numerical control systems based on machine learning. Background Technology

[0002] In modern precision manufacturing, particularly in aerospace and high-end consumer electronics processing, spindle load data from Computer Numerical Control (CNC) systems is considered a core indicator for process monitoring. With the development of the Industrial Internet of Things (IIoT), uploading high-frequency load data to the cloud for big data analysis has become a mainstream trend for achieving full lifecycle management and predictive maintenance of cutting tools. However, this process faces significant data security challenges. Because the time-domain or angular-domain variations in load waveforms during machining are highly correlated with the workpiece's geometry, the raw load data essentially contains implicit CAD design information. For manufacturing companies dealing with core secrets or high-value-added products, directly uploading raw data containing waveform details poses a significant reverse engineering risk, necessitating a data anonymization technology capable of effectively stripping away geometrically sensitive information at the edge.

[0003] However, existing data processing methods, while achieving data anonymization, often struggle to ensure robust monitoring, particularly when dealing with batch variations in raw material. In mass production, castings typically exhibit batch-specific hardness differences. Increased material hardness leads to a linear amplification of the overall cutting force amplitude, while tool wear manifests more as a nonlinear distortion of the cutting force. Traditional monitoring methods, usually based on fixed thresholds or simple statistical characteristics (such as mean and RMS), cannot effectively distinguish between "an overall increase in cutting force due to material hardening" and "changes in mechanical characteristics due to tool wear." This coupling phenomenon often results in monitoring systems generating numerous false alarms when material batches change, or being forced to relax thresholds to accommodate hardness fluctuations, thus missing early, subtle wear. Summary of the Invention

[0004] To address the technical problem that existing data processing methods, while achieving data anonymization in CNC systems, cannot simultaneously ensure monitoring robustness and distinguish the causes of increased cutting forces, the present invention aims to provide a data anonymization method for computer numerical control systems based on machine learning. The specific technical solution adopted is as follows:

[0005] This invention proposes a data anonymization method for computer numerical control systems based on machine learning, the method comprising:

[0006] Obtain the real-time cutting load sequence of the CNC system based on the spindle position;

[0007] Using elements from the locally stored standard cutting load sequence as independent variables and elements from the real-time cutting load sequence as dependent variables, a linear fit is performed to obtain the slope and residual sequence of the fitting result; the slope is used as the material hardness coefficient and the residual sequence is used as the wear characteristic component.

[0008] The wear characteristic components are normalized by the material hardness coefficient to calculate the energy density and obtain the wear energy accumulation value. The wear energy accumulation value, material hardness coefficient, and fault location are stored in the cloud as storage data. The fault location is located based on the energy density, and a warning signal is fed back based on the wear energy accumulation value and material hardness coefficient.

[0009] Furthermore, the method for obtaining the standard cutting load sequence includes:

[0010] In the template construction mode of the CNC system, the cutting load sequence generated by a preset number of complete machining cycles is used as the base sequence. After aligning the base sequence, the average is calculated to obtain the standard cutting load sequence.

[0011] Furthermore, prior to the linear fitting process, an alignment process is included between the standard cutting load sequence and the real-time cutting load sequence. This alignment process includes:

[0012] A reference element is searched in both the standard cutting load sequence and the real-time cutting load sequence. The reference element is the element whose load first exceeds a preset contact threshold and is also greater than the previous element. The index offset is obtained by subtracting the index value of the reference element in the standard cutting load sequence from the index value of the reference element in the real-time cutting load sequence.

[0013] An offset interval is constructed with the index offset as the center. For each candidate offset in the offset interval, the real-time cutting load sequence is resampled and interpolated based on the candidate offset to obtain the reconstructed sequence.

[0014] Obtain the correlation coefficient between the reconstructed sequence and the standard cutting load sequence, and select the reconstructed sequence with the largest correlation coefficient as the alignment result between the real-time cutting load sequence and the standard cutting load sequence.

[0015] Furthermore, the correlation coefficient is the Pearson correlation coefficient.

[0016] Furthermore, the fitting results also include:

[0017] If the material hardness obtained from the fitting result is within the preset danger range, a serious fault alarm signal is fed back, the residual sequence acquisition process is interrupted, and the material hardness is stored in the cloud.

[0018] Furthermore, the method for obtaining the energy density includes:

[0019] The basic noise threshold is obtained based on the standard deviation of the standard cutting load sequence; for each wear feature in the wear feature component, after eliminating the basic noise threshold from the wear feature, the energy density is obtained by mapping using the material hardness coefficient, and the energy density is greater than 0.

[0020] Furthermore, the method for locating the fault location includes:

[0021] The spindle position corresponding to the maximum energy density is selected as the location where the fault occurred.

[0022] Furthermore, the step of feeding back the early warning signal based on the accumulated wear energy value and the material hardness coefficient includes:

[0023] The sequence of cumulative wear energy and material hardness coefficients is statistically analyzed, corresponding to the machining cycle of the real-time cutting load sequence and the sequence of cumulative wear energy formed by multiple consecutive machining cycles before it.

[0024] If the real-time material hardness coefficient of the real-time cutting load sequence exceeds the preset safety range, then it is determined whether the real-time material hardness coefficient has undergone a step change based on the material hardness coefficient sequence. If a step change occurs, then a material batch hardness abnormality signal is fed back.

[0025] If the real-time material hardness coefficient does not change abruptly, the wear energy accumulation value sequence is linearly fitted to obtain the wear growth slope. Based on the wear growth slope and the difference between the real-time wear energy accumulation value of the real-time cutting load sequence and the preset failure threshold, the expected life is obtained. If the expected life is less than the preset life threshold, a tool replacement suggestion signal is fed back.

[0026] The difference in accumulated wear energy between the real-time machining cycle and the previous machining cycle is obtained. If the difference in accumulated wear energy is greater than a preset chipping threshold, the subsequent cutting signal is blocked.

[0027] Further, the step of determining whether the real-time material hardness coefficient undergoes a step change based on the material hardness coefficient sequence includes:

[0028] If the difference between the real-time material hardness coefficient and the preset stable hardness threshold is greater than the preset difference threshold, and the standard deviation of the material hardness coefficient sequence is less than the preset standard deviation threshold, then a step change is determined to have occurred.

[0029] Furthermore, the method for obtaining the expected lifespan includes:

[0030] The difference between the failure threshold and the real-time wear energy accumulation value is used as the numerator, and the wear growth slope is used as the denominator. The resulting ratio is then rounded down to obtain the expected lifespan.

[0031] The present invention has the following beneficial effects:

[0032] To ensure a strict mapping between the workpiece's geometric spatial position and the cutting data during data acquisition, this invention first selects a real-time cutting load sequence based on the spindle position as the analysis data. Since this real-time cutting load sequence, being sensitive CNC data containing geometric features, cannot be directly uploaded to the cloud, a locally stored standard cutting load sequence is used for joint analysis. Linear fitting decouples the signal features, and the resulting slope reflects the material hardness under real-time machining cycles. This means the material hardness coefficient can independently quantify the overall linear scaling of the cutting force due to different batches of blanks, effectively distinguishing between material hardness fluctuations and tool wear, and avoiding false tool alarms caused by material hardening. Simultaneously, the residual sequence is used as a wear feature component. Calculating the residual eliminates interference from the workpiece's geometric contour on the monitoring signal, thus effectively representing wear characteristics. Furthermore, combining these two features determines the energy density corresponding to the wear feature component, eliminating the "amplification effect" of hardness differences on the wear signal amplitude. This makes the cumulative wear energy value comparable across different material batches, improving the monitoring accuracy of minor wear. In addition, based on energy density, the location of faults can be precisely captured, accurately pinpointing the specific coordinates of sudden faults (such as chipping) on ​​the workpiece. Finally, only statistical scalars such as hardness coefficient, cumulative wear energy value, and fault location are uploaded to the cloud, so that the cloud can still provide early warning signals based on these characteristics even without access to the original waveform data containing the workpiece's geometric privacy. Attached Figure Description

[0033] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 The flowchart illustrates a data anonymization method for a computer numerical control system based on machine learning, as provided in one embodiment of the present invention. Detailed Implementation

[0035] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a machine learning-based data desensitization method for computer numerical control systems proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0037] The following description, in conjunction with the accompanying drawings, details a specific scheme for a machine learning-based data desensitization method for computer numerical control systems provided by this invention.

[0038] Please see Figure 1 The diagram illustrates a flowchart of a machine learning-based data anonymization method for computer numerical control systems according to an embodiment of the present invention. The method includes:

[0039] Step S1: Obtain the real-time cutting load sequence of the CNC system based on the spindle position.

[0040] For each machining cycle, there exists machining data containing process information of the workpiece to be processed. In this embodiment of the invention, for each machining cycle, a real-time cutting load sequence is obtained based on the spindle position. That is, the real-time cutting load sequence is in signal form, with the horizontal axis representing the spindle position and the vertical axis representing the cutting load.

[0041] In this embodiment of the invention, the specific calibration method for the spindle position and the method for acquiring the real-time cutting load sequence include:

[0042] In this embodiment of the invention, the spindle rotation angle is used as the spindle position. The spindle rotation angle is determined by the value of the spindle absolute position encoder, and the number of spindle rotations is recorded simultaneously. This embodiment also uses the spindle motor current value to characterize the cutting force, i.e., the spindle motor current value is used as tangential load information. In other implementations of this invention, a load percentage value can also be selected as the load information, which will not be elaborated upon or limited here. Because the corresponding rotation angle value returns to 0 after one rotation of the spindle, this embodiment further sets an angular domain resampling resolution to solve the problem of the angle period returning to 0 during rotation. The value is 0.5 degrees, and the cumulative rotation angle of the spindle since the start of the machining cycle is calculated. The cumulative rotation angle can be expressed as... ;in Let be the cumulative rotation angle at time t. Let be the value of the spindle absolute position encoder at time t. This represents the number of spindle rotations at real-time time t. It should be noted that the above time refers to the time generated based on the angular domain resampling resolution, not the time generated by directly setting the sampling frequency in the time domain. It should also be noted that, to ensure a strict mapping between the workpiece's geometric position and the cutting data, the cumulative rotation angle should be collected every 0.5 degrees, while simultaneously collecting the cutting load data. This forms a strict mapping between the spindle position and the cutting load, resulting in a real-time cutting load sequence. Furthermore, the CNC system can monitor the status of the computer CNC system, for example, by monitoring specific G-code line numbers (such as the G01 instruction line entering the cutting cycle), or when the spindle load first exceeds a preset contact threshold (which can be set to 110% of the no-load current). This indicates that the machining cycle has started. At this time, the cumulative rotation angle can be zeroed, and data can be collected according to the angular domain resampling resolution. When a tool retraction command is detected or the current machining cycle ends, data collection stops, forming a real-time cutting load sequence. In this embodiment of the invention, the real-time cutting load sequence can be represented as: ;in This represents the real-time cutting load sequence. This indicates that the spindle has rotated relative to the cutting start point. The cutting load at the angular position. Through the above information acquisition mechanism, regardless of the fluctuations in feed rate or spindle speed during the machining process, the data generated at the same workpiece geometric position always lies within the same index range in the sequence.

[0043] Step S2: Using the elements in the locally stored standard cutting load sequence as independent variables and the elements in the real-time cutting load sequence as dependent variables, perform linear fitting to obtain the slope and residual sequence of the fitting results; use the slope as the material hardness coefficient and the residual sequence as the wear characteristic component.

[0044] The real-time cutting load sequence contains crucial machining information from real-time machining cycles, including the workpiece's overall contour features. This sensitive data cannot be directly uploaded to the cloud after being acquired locally. This invention, in its embodiment, utilizes a locally stored standard cutting load sequence to orthogonally decompose the real-time cutting load sequence. Through linear fitting, the signal is physically separated into a hardness component and a wear residual component. The hardness component can be considered a linear transformation of the standard cutting load sequence based on the hardness of different batches of materials and geometric interference. The wear residual component represents the nonlinear difference caused by tool wear. Therefore, the fitted slope obtained during linear fitting can be used as the material hardness coefficient, the fitting intercept can be considered as the reference load drift, and the final residual sequence can be used as the wear characteristic component.

[0045] In this embodiment of the invention, elements from a locally stored standard cutting load sequence are used as independent variables, and elements from a real-time cutting load sequence are used as dependent variables for linear fitting. Linear fitting yields the fitting slope and intercept of the fitted line. Substituting the fitting slope and intercept into the fitted line yields the linear transformation result of the standard cutting load sequence. This result fully preserves the geometric contour features of the workpiece. Furthermore, because it includes information about the fitting slope and intercept, the result absorbs linear amplitude changes caused by material hardness. Therefore, the difference between the corresponding real data in the real-time cutting load sequence and this transformation result can be compared to obtain a residual sequence. The residual sequence removes workpiece geometric information and material hardness interference, resulting in nonlinear distortion information containing only the actual cutting process relative to the ideal linear model. This feature is purely tool wear or chipping characteristics.

[0046] As an example, in a specific implementation of this invention, the above process can be expressed by the following formula:

[0047] (1) Constructing a linear fitting model:

[0048] With standard cutting load sequence elements in X is used as the independent variable to implement the cutting load sequence. elements in Using Y as the dependent variable, construct a univariate linear regression model:

[0049] ;in Let be the slope to be fitted. The intercept to be fitted is denoted as .

[0050] (2) Calculation of regression coefficients:

[0051] In one specific implementation of this invention, the least squares method can be used to perform linear fitting and obtain the fitting slope and fitting intercept.

[0052] (3) Calculation of residual sequence:

[0053] Standard cutting load sequence elements in Substituting these values ​​into the univariate linear regression model above, we obtain the geometric loading components for each index k. ; This is the transformation result described above. This result fully preserves the geometric contour features of the workpiece, and because it includes information on the fitting slope and intercept, it absorbs the linear amplitude changes caused by material hardness. This will then be used to implement the cutting load sequence. elements in minus The residual at index k can then be obtained. The residual sequence is obtained according to the index order.

[0054] It should be noted that the least squares fitting method is a well-known technique in the field of science and will not be elaborated on here.

[0055] Preferably, in one implementation of this invention, the standard cutting load sequence serves as an important standard template stored locally. It represents the cutting information of a normal machining cycle where the tool has not worn. Therefore, under a specific template construction mode in the CNC system, the cutting load sequences generated by a preset number of complete machining cycles are used as the base sequence. Because the base sequence is limited by mechanical transmission backlash or bus communication packet loss during acquisition, the length of the acquired sample sequences may have slight differences, typically within 1%. However, for template standardization, the base sequences still need to be aligned and then averaged to obtain the standard cutting load sequence.

[0056] In one specific implementation of this invention, the preset quantity can be selected between 10 and 20, specifically 10.

[0057] As a concrete example, the process of aligning the underlying sequence includes:

[0058] (1) Count the length of all basic sequences and select the length value with the highest frequency as the target length. If there is no length value with the highest frequency, select the median as the target length.

[0059] (2) Obtain the absolute value of the difference between the length of each basic sequence and the target length, and remove basic sequences whose absolute value of the difference exceeds 2% of the target length. Such sequences may be abnormal loops caused by abnormal situations such as mid-process stoppage.

[0060] (3) For the remaining basic sequences, a linear interpolation algorithm is used to uniformly resample the length to the target length. For example, if the length of the original basic sequence is m and the target length is K, then the value of the j-th point in the resampled basic sequence is the value of the original basic sequence at index [m]. The interpolation results are then used to obtain the resampled sequence corresponding to the remaining base sequence, which is then used as the aligned base sequence.

[0061] It should be noted that the above-mentioned linear interpolation algorithm, sequence averaging and other detailed methods are all technical means well known to those skilled in the art, and will not be elaborated on here.

[0062] Furthermore, in a specific implementation of this invention, after obtaining the standard cutting load sequence, a verification step is included. This step involves obtaining the variance of the elements in the standard cutting load sequence. If the variance is less than a preset minimum cutting fluctuation threshold, the current template is deemed invalid, indicating that it does not contain valid cutting geometry features. This may be due to continuous abnormal machining cycles such as tool idling. Therefore, a visual prompt is needed on the human-machine interface, such as "No valid cutting detected, please check machine status." The standard cutting load sequence is then reconstructed until the verification passes, ensuring the accuracy and usability of the template data. In this embodiment, the preset minimum cutting fluctuation threshold can be set to the square of 5% of the motor's rated current.

[0063] Preferably, in a specific implementation of this invention, considering that there may be length differences between the standard cutting load sequence and the real-time cutting load sequence, the two sequences need to be aligned before the linear fitting process. Therefore, the linear fitting process also includes an alignment process between the standard cutting load sequence and the real-time cutting load sequence, the alignment process including:

[0064] Reference elements are searched in both the standard cutting load sequence and the real-time cutting load sequence. These reference elements are used to initially label the index deviation between the two sequences; therefore, they should have significant initialization characteristics. In this embodiment, the reference element is set to the element whose load first exceeds a preset contact threshold and is also greater than the previous element. The preset contact threshold can be set to 110% of the no-load current, because the machine tool has only a very small background noise current when idling. When the tool contacts the workpiece and begins cutting, the load suddenly increases. Exceeding the threshold signifies "cutting begins," which is the most significant and stable feature point in the signal, suitable for positioning. Setting the contact threshold condition can eliminate idling noise interference and lock the starting point of the effective signal. The condition of being greater than the previous element means that the gradient of the target element is positive, indicating that the cutting load is increasing. At the start of tool entry, the load must be from low to high. Therefore, setting this condition can prevent misjudgment caused by a single contact threshold condition, ultimately obtaining the reference elements corresponding to each of the two sequences as the cutting starting point.

[0065] Then, the index value of the reference element in the real-time cutting load sequence is subtracted from the index value of the reference element in the standard cutting load sequence to obtain the index offset. That is, the index offset represents the angular domain deviation corresponding to the cutting start point of the two sequences. Therefore, the alignment analysis needs to be based on this index offset during the alignment process.

[0066] Because the index offset obtained above is a basic offset constructed with the starting point as the anchor point, this offset may not be the optimal offset. Therefore, an offset interval is constructed centered on the index offset. For each candidate offset in the offset interval, the real-time cutting load sequence is resampled and interpolated based on the candidate offset to obtain a reconstructed sequence. The correlation coefficient between the reconstructed sequence and the standard cutting load sequence is obtained, and the reconstructed sequence with the largest correlation coefficient is selected as the alignment result between the real-time cutting load sequence and the standard cutting load sequence. That is, the largest correlation coefficient indicates that the reconstructed sequence is more closely matched with the standard cutting load sequence, the interpolation effect is better, and it is easier to perform subsequent linear fitting. Therefore, the corresponding candidate offset is the optimal offset.

[0067] In this embodiment of the invention, the index offset is used. Centered on the target, search forward one index unit and then backward one index unit to obtain the offset interval. And search all candidate offsets within this interval with a search step size of 0.1. For each candidate offset The interpolation formula for the element value at the k-th index in the corresponding reconstructed sequence includes:

[0068]

[0069] in To reconstruct the value of the element at index k in the sequence, For weighting coefficients and , where i is the index value in the real-time cutting load sequence, and , The floor symbol indicates rounding down. This represents the value of the element at index i in the real-time cutting load sequence. This represents the element value at index i+1 in the real-time cutting load sequence.

[0070] It should be noted that the above interpolation formula is a linear interpolation process well-known to those skilled in the art, and the specific meaning and logic of the formula will not be elaborated further. Data alignment through coarse alignment of the starting point followed by fine alignment can eliminate spurious residuals at high-frequency edges, ensuring the alignment effect.

[0071] Furthermore, in this embodiment of the invention, the correlation coefficient is chosen as the Pearson correlation coefficient. A larger Pearson correlation coefficient indicates a more linear correlation between the two sequences.

[0072] Preferably, in this embodiment of the invention, considering that the slope obtained during the linear fitting process can be used as the material hardness coefficient, and a negative or excessively large value clearly reflects the anomaly of the current real-time processing cycle, subsequent wear analysis can be omitted, and the anomaly can be directly identified, and cloud storage and fault alarms can be performed. Therefore, if the material hardness of the fitting result is within a preset danger range, a serious fault alarm signal is fed back, the residual sequence acquisition process is interrupted, and the material hardness is stored in the cloud. In this embodiment of the invention, the danger range is set as two ranges: the material hardness coefficient is less than or equal to 0, and the material hardness coefficient is greater than a positive integer 3. If the material hardness coefficient is within the danger range, it can be determined that the sensor is faulty or a serious impact accident has occurred, and a "serious fault" alarm signal can be directly fed back. This alarm signal is the highest priority alarm.

[0073] Step S3: After normalizing the characteristic components in the wear characteristic components with the material hardness coefficient, calculate the energy density to obtain the cumulative wear energy value; store the cumulative wear energy value, material hardness coefficient, and fault location as storage data in the cloud, locate the fault location based on the energy density, and provide a warning signal based on the cumulative wear energy value and material hardness coefficient.

[0074] Because the wear characteristic component is a data sequence, it needs to be further dimensionality-reduced and converted into a statistical scalar for easier subsequent early warning and monitoring. Since the harder the material, the larger the absolute value of the mechanical residual for the same wear depth, this invention eliminates the natural amplification effect of material hardness on the residual amplitude. In this embodiment, the wear characteristic component is normalized using the material hardness coefficient to calculate the energy density. This calculated energy density ensures comparability of wear characteristics between processing batches with different hardness levels, effectively quantifying the wear characteristics of each batch. Because each spindle position corresponds to an energy density in the wear characteristic component, and the magnitude of the energy density reflects the strength of the wear, the fault location can be determined based on the energy density. The accumulated wear energy value, material hardness coefficient, and fault location are then stored in the cloud. This data package contains only dimensionless statistical characteristics and no time-series or angular-domain waveform data, preventing the leakage of processing information. This achieves data anonymization while providing early warning signals based on the accumulated wear energy value and material hardness coefficient.

[0075] In one specific implementation of this invention, the CNC system can upload data packets to a cloud server via encrypted channels such as HTTPS or MQTT over TLS. After the data packet sending instruction is executed, the system can perform a forced destruction operation in the RAM of the local edge node, overwriting and clearing the real-time cutting load sequence and its derived reconstruction sequence, as well as other derived data obtained from linear fitting, generated during the above process. Through this mechanism, the system ensures that any vector data containing workpiece geometric contour details "does not reside on the ground and does not leave the edge node" during its lifecycle, physically eliminating the possibility of reconstructing workpiece drawings through reverse engineering. Furthermore, since the cumulative wear energy value and material hardness coefficient are machining characteristic parameters characterizing the real-time machining cycle, the current tool status in the CNC system can be determined by numerical comparison and trend comparison, thereby providing effective early warning signal feedback.

[0076] It should be noted that the fault location is determined only after the cumulative wear energy value and material hardness coefficient are fed back as early warning signals.

[0077] Preferably, in this embodiment of the invention, the method for obtaining energy density includes:

[0078] The basic noise threshold is obtained based on the standard deviation of the standard cutting load sequence; for each wear feature in the wear feature component, after removing the basic noise threshold from the wear feature, the energy density is obtained by mapping using the material hardness coefficient, and the energy density should be a positive number greater than 0.

[0079] As a concrete example, the method for obtaining the energy density described above can be expressed by the following formula:

[0080] ;in Let `max` be the energy density at the k-th index, and `max` be the maximum value selection function. This refers to the wear feature at the k-th index in the pattern feature components. The base noise threshold is the threshold value. The value is the hardness coefficient of the material.

[0081] It should be noted that the base noise threshold can be set to three times the standard deviation of the standard cutting load sequence, i.e., following the 3-Sigma statistical criterion, representing a fixed-base electronic noise. Since the wear characteristics are calculated through residuals during linear fitting, positive and negative values ​​may exist. Therefore, absolute values ​​need to be used for mapping, and noise can be removed directly through subtraction, ensuring that effective energy is only included when nonlinear distortion exceeds the background noise level, thus filtering out random electromagnetic interference. Furthermore, the results are mapped to a standard hardness reference using a ratio. To avoid obtaining an energy density of 0, a maximum value selection function is chosen to further restrict the results.

[0082] Preferably, in this embodiment of the invention, instead of directly comparing the accumulated wear energy value and the material hardness coefficient with thresholds to determine whether it is normal or abnormal, trend analysis is combined with time-series analysis to determine the wear condition corresponding to the real-time processing cycle, specifically including:

[0083] This invention statistically analyzes the machining cycles corresponding to the real-time cutting load sequence and the cumulative wear energy value sequence and material hardness coefficient sequence formed by multiple consecutive machining cycles preceding them. In this embodiment, the invention statistically analyzes ten consecutive machining cycles of the current CNC machine tool, including the real-time machining cycle, to obtain a cumulative wear energy value sequence of length 10 and a material hardness coefficient sequence of length 10. Both sequences are arranged in chronological order, meaning the last element represents information from the real-time machining cycle.

[0084] If the real-time material hardness coefficient of the real-time cutting load sequence exceeds the preset safety range, it indicates an anomaly in the real-time material hardness coefficient. Further analysis of the trend at the corresponding time point is needed. Based on the material hardness coefficient sequence, it should be determined whether the real-time material hardness coefficient exhibits a step change. If a step change occurs, it indicates an abnormal change in the hardness of the current batch, not a normal material change within the same process, and a batch hardness anomaly signal is fed back. It should be noted that the batch hardness anomaly signal only indicates an abnormal change in the hardness of the batch material corresponding to the current real-time machining cycle; it does not indicate an anomaly in the CNC system. Therefore, in this state, the CNC system will not trigger a wear alarm or stop the machine; it will only provide visual feedback of the batch hardness anomaly signal, prompting personnel to check the upstream casting process. Conversely, if no step change occurs, it indicates that the current real-time material hardness coefficient exhibits a monotonous, slow, drifting non-step change, caused by the baseline drift of the cutting force due to uniform wear of the tool face. In this case, it is necessary to further consider the cumulative wear energy characteristics for tool life prediction.

[0085] In this embodiment of the invention, the size of the safety range can be specifically set according to the specific production environment of the CNC system. In this embodiment of the invention, it is set to be between 0.8 and 1.2.

[0086] If the real-time material hardness coefficient does not undergo a step change, a linear fit is performed on the cumulative wear energy value sequence, and the resulting slope is used as the wear growth slope. Based on the wear growth slope and the difference between the real-time cumulative wear energy value of the real-time cutting load sequence and the preset failure threshold, the expected lifespan is obtained. If the expected lifespan is less than the preset lifespan threshold, a tool preparation suggestion signal is fed back. That is, the lifespan threshold is the safety margin for tool preparation preset by the CNC system. In this embodiment of the invention, it is set to 20 times. The tool preparation suggestion is sent from the cloud to the machine tool's tool management system, which can be used to prompt the operator to prepare new tools and avoid downtime.

[0087] Simultaneously, the possibility of sudden tool breakage should be considered, requiring further assessment of the tool's real-time status through changes in the cumulative wear energy value. The difference in cumulative wear energy between the current machining cycle and the previous machining cycle is obtained. If this difference exceeds a preset tool breakage threshold, subsequent cutting signals are blocked, and the location of the fault is reported. The cloud platform sends a high-priority "feed hold" or "prohibit next cycle start" command to the machine tool PLC via a low-latency channel to block subsequent cutting and prevent workpiece scrapping or machine spindle damage caused by a damaged tool. In this embodiment, the tool breakage threshold can be set to three times the standard deviation of the cumulative wear energy value sequence, or it can be obtained by statistically analyzing historical data. Specific settings can be tailored to accuracy requirements and are not elaborated upon or limited here.

[0088] Further, determining whether the real-time material hardness coefficient undergoes a step change based on the material hardness coefficient sequence includes:

[0089] If the difference between the real-time material hardness coefficient and the preset stable hardness threshold is greater than the preset difference threshold, and the standard deviation of the material hardness coefficient sequence is less than the preset standard deviation threshold, then a step change is determined to have occurred.

[0090] It should be noted that the stable hardness threshold, chipping threshold, and failure threshold proposed in this embodiment of the invention can all be obtained through historical data statistics. To address the problem of determining the failure threshold for a single machine tool, this embodiment of the invention utilizes the "group control vision" advantage for parameter management in a cloud-based system. The cloud aggregates data from multiple machine tools performing the same process within the same workshop, establishing a historical database. The average value of the normal and stable material hardness coefficient in the historical database is used as the stable hardness threshold; the average cumulative wear energy value of the last machining cycle corresponding to a confirmed wear failure tool is used as the failure threshold (or the 90th quantile of this cumulative wear energy value set is calculated); the average value (or its 80th quantile) of the energy jump values ​​(differences between adjacent cumulative wear energy values) at historical chipping alarm moments is selected as the chipping threshold. Other specific setting methods for data such as difference thresholds and standard deviation thresholds can be customized according to the implementer's needs, and are not elaborated or limited here.

[0091] Preferably, in this embodiment of the invention, the method for obtaining the expected lifespan includes:

[0092] The difference between the failure threshold and the accumulated real-time wear energy is used as the numerator, and the wear growth slope is used as the denominator. The resulting ratio is then rounded down to obtain the expected lifespan. It should be noted that because the failure threshold is a preset statistical or empirical value, it is a significantly large value, therefore the resulting ratio will not be less than 0. Furthermore, because the wear characteristics inevitably increase with tool use, the wear growth slope is also a positive number, thus enabling an accurate and effective determination of the expected lifespan.

[0093] In summary, this invention utilizes the real-time cutting load sequence of the CNC system based on the spindle position to eliminate the influence of speed fluctuations. A linear fit is performed using the locally stored standard cutting load sequence as the independent variable and the real-time cutting load sequence as the dependent variable, decoupling to obtain the fitting slope characterizing the material hardness coefficient and the residual sequence characterizing the wear feature components. The feature components are normalized using the material hardness coefficient, and the energy density is calculated to generate a cumulative wear energy value. The cumulative wear energy value, material hardness coefficient, and fault location are uploaded to the cloud for storage and fault warning. This invention enables data anonymization without uploading the original workpiece geometry data, effectively solving the technical problems of false alarms in tool wear monitoring and leakage of workpiece geometry privacy caused by material hardness fluctuations.

[0094] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0095] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A data anonymization method for computer numerical control systems based on machine learning, characterized in that, The method includes: Obtain the real-time cutting load sequence of the CNC system based on the spindle position; Using elements from the locally stored standard cutting load sequence as independent variables and elements from the real-time cutting load sequence as dependent variables, a linear fit is performed to obtain the slope and residual sequence of the fitting result; the slope is used as the material hardness coefficient and the residual sequence is used as the wear characteristic component. The wear characteristic components are normalized by the material hardness coefficient to calculate the energy density and obtain the wear energy accumulation value. The wear energy accumulation value, material hardness coefficient, and fault location are stored in the cloud as storage data. The fault location is located based on the energy density, and a warning signal is fed back based on the wear energy accumulation value and material hardness coefficient.

2. The data anonymization method for computer numerical control systems based on machine learning according to claim 1, characterized in that, The method for obtaining the standard cutting load sequence includes: In the template construction mode of the CNC system, the cutting load sequence generated by a preset number of complete machining cycles is used as the base sequence. After aligning the base sequence, the average is calculated to obtain the standard cutting load sequence.

3. The data anonymization method for computer numerical control systems based on machine learning according to claim 1, characterized in that, The linear fitting process is preceded by an alignment process between the standard cutting load sequence and the real-time cutting load sequence, which includes: A reference element is searched in both the standard cutting load sequence and the real-time cutting load sequence. The reference element is the element whose load first exceeds a preset contact threshold and is also greater than the previous element. The index offset is obtained by subtracting the index value of the reference element in the standard cutting load sequence from the index value of the reference element in the real-time cutting load sequence. An offset interval is constructed with the index offset as the center. For each candidate offset in the offset interval, the real-time cutting load sequence is resampled and interpolated based on the candidate offset to obtain the reconstructed sequence. Obtain the correlation coefficient between the reconstructed sequence and the standard cutting load sequence, and select the reconstructed sequence with the largest correlation coefficient as the alignment result between the real-time cutting load sequence and the standard cutting load sequence.

4. The data anonymization method for computer numerical control systems based on machine learning according to claim 3, characterized in that, The correlation coefficient mentioned is the Pearson correlation coefficient.

5. The data anonymization method for computer numerical control systems based on machine learning according to claim 1, characterized in that, The fitting results also include: If the material hardness obtained from the fitting result is within the preset danger range, a serious fault alarm signal is fed back, the residual sequence acquisition process is interrupted, and the material hardness is stored in the cloud.

6. The data anonymization method for computer numerical control systems based on machine learning according to claim 1, characterized in that, The method for obtaining the energy density includes: The basic noise threshold is obtained based on the standard deviation of the standard cutting load sequence; for each wear feature in the wear feature component, after eliminating the basic noise threshold from the wear feature, the energy density is obtained by mapping using the material hardness coefficient, and the energy density is greater than 0.

7. The data anonymization method for computer numerical control systems based on machine learning according to claim 1, characterized in that, The method for locating the fault location includes: The spindle position corresponding to the maximum energy density is selected as the location where the fault occurred.

8. The data anonymization method for computer numerical control systems based on machine learning according to claim 1, characterized in that, The method of feeding back the early warning signal based on the accumulated wear energy value and the material hardness coefficient includes: The sequence of cumulative wear energy and material hardness coefficients is statistically analyzed, corresponding to the machining cycle of the real-time cutting load sequence and the sequence of cumulative wear energy formed by multiple consecutive machining cycles before it. If the real-time material hardness coefficient of the real-time cutting load sequence exceeds the preset safety range, then it is determined whether the real-time material hardness coefficient has undergone a step change based on the material hardness coefficient sequence. If a step change occurs, then a material batch hardness abnormality signal is fed back. If the real-time material hardness coefficient does not change abruptly, the wear energy accumulation value sequence is linearly fitted to obtain the wear growth slope. Based on the wear growth slope and the difference between the real-time wear energy accumulation value of the real-time cutting load sequence and the preset failure threshold, the expected life is obtained. If the expected life is less than the preset life threshold, a tool replacement suggestion signal is fed back. The difference in accumulated wear energy between the real-time machining cycle and the previous machining cycle is obtained. If the difference in accumulated wear energy is greater than a preset chipping threshold, the subsequent cutting signal is blocked.

9. A data anonymization method for a computer numerical control system based on machine learning according to claim 8, characterized in that, The step of determining whether the real-time material hardness coefficient undergoes a step change based on the material hardness coefficient sequence includes: If the difference between the real-time material hardness coefficient and the preset stable hardness threshold is greater than the preset difference threshold, and the standard deviation of the material hardness coefficient sequence is less than the preset standard deviation threshold, then a step change is determined to have occurred.

10. A data anonymization method for a computer numerical control system based on machine learning according to claim 8, characterized in that, The method for obtaining the expected lifespan includes: The difference between the failure threshold and the real-time wear energy accumulation value is used as the numerator, and the wear growth slope is used as the denominator. The resulting ratio is then rounded down to obtain the expected lifespan.

Citation Information

Patent Citations

  • Numerical control machine tool machining environment monitoring system

    CN120779865A

  • Intelligent mold part machining cutting tool control method and system

    CN121143179A