A cloud-based analytics-based monitoring data processing system for CNC machining centers

By constructing a cloud-based CNC machining center monitoring data processing system, performing time-frequency domain data enhancement and spatial topology awareness, and combining an improved Autoformer encoder and GAT model, the system solves the problems of multi-source data collaborative analysis and spatial dependency mining, and achieves accurate monitoring and efficient alarm of the CNC machining center's operating status.

CN122286603BActive Publication Date: 2026-07-31YONGKAI INTELLIGENT EQUIP (NANTONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YONGKAI INTELLIGENT EQUIP (NANTONG) CO LTD
Filing Date
2026-06-01
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively mine the coupling characteristics of the time and frequency domains when processing multi-source heterogeneous data from CNC machining centers. They neglect the physical layout of sensors in the machine tool's spatial structure, cannot utilize the spatial dependencies between components for tracing, resulting in an imbalance between false alarm and false alarm rates. Furthermore, they are poorly adaptable to dynamic changes in machining conditions, cannot adjust the sensitivity of anomaly detection based on real-time cutting parameters, and have limited generalization ability and robustness.

Method used

A cloud-based CNC machining center monitoring data processing system is constructed. The system enhances time-frequency domain data through an enhancement module, captures spatial adjacency relationships using a fusion module, performs deep fusion using an improved Autoformer encoder, decomposes and decodes sequences through a reconstruction module, and determines anomalies through a judgment module. Combined with dynamic threshold adjustment of cutting parameters, the system achieves accurate monitoring of machining status.

Benefits of technology

It significantly improves the sensitivity to early and weak fault signals and spatial tracing capabilities, reduces false alarms and missed alarms under complex operating conditions, achieves highly robust anomaly alarms, and provides reliable data decision support for cloud-based intelligent operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122286603B_ABST
    Figure CN122286603B_ABST
Patent Text Reader

Abstract

This invention discloses a cloud-based CNC machining center monitoring data processing system, relating to the field of monitoring data processing technology. It constructs a standard data matrix and performs data augmentation processing to obtain a time-domain augmented data matrix and a frequency-domain augmented data matrix. Based on Gaussian Articulation Technology (GAT), spatial feature enhancement is performed on the time-domain and frequency-domain augmented data matrices respectively to obtain a first spatial augmented feature matrix and a second spatial augmented feature matrix. An improved Autoformer encoder is used to perform time-series encoding on the time-domain and frequency-domain augmented data matrices, and then fused with the corresponding first and second spatial augmented feature matrices to obtain a first time-series encoded feature and a second time-series encoded feature, which are then fused to obtain the final encoded feature matrix. The standard data matrix is ​​then subjected to sequence decomposition, and decoded based on the final encoded feature matrix to obtain the final output reconstructed data matrix, followed by anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of monitoring data processing technology, and in particular to a monitoring data processing system for CNC machining centers based on cloud analytics. Background Technology

[0002] In recent years, with the deep integration of industrial IoT, edge computing and cloud computing technologies, CNC machining centers, as core equipment of intelligent manufacturing, have evolved from single threshold alarms to intelligent operation and maintenance driven by multi-source data in their operation status monitoring. By deploying various types of sensors for vibration, temperature, current and power on key components such as machine tool spindles, feed axes and motors, real-time data reflecting the health status of the equipment is collected. Combined with the spatial topology information provided by CAD layout drawings, a digital twin is constructed to achieve transparent monitoring of the machining process. This has become an important means to ensure machining accuracy and improve equipment utilization. However, the manufacturing workshop environment is complex, and the machining process is affected by multiple factors such as cutting parameters and workpiece materials. The data collected by the sensors often exhibits nonlinearity, non-stationarity and strong noise interference, which brings severe challenges to data traceability and anomaly detection. Existing technologies for processing such multi-source heterogeneous data typically employ independent time-series models for trend prediction or simple feature splicing for fusion analysis. However, these methods have significant shortcomings. These include: traditional methods struggle to effectively and collaboratively mine the coupling characteristics of raw machining data in the time and frequency domains, resulting in insufficient characterization of early, subtle faults such as tool wear and spindle thermal deformation; most monitoring models neglect the physical layout of sensors within the machine tool's spatial structure, failing to leverage spatial dependencies between components to trace and enhance abnormal signals, making it difficult to balance false alarm and false negative rates; and existing monitoring systems exhibit poor adaptability to dynamic changes in machining conditions, unable to adjust the sensitivity of anomaly detection based on real-time cutting parameters, thus limiting the model's generalization ability and robustness in complex actual machining scenarios. Summary of the Invention

[0003] The technical problem addressed by this invention is that existing technologies, when processing such multi-source heterogeneous data, typically employ independent time-series models for trend prediction or simple feature splicing for fusion analysis. However, these methods have significant shortcomings, including: traditional methods struggle to effectively collaboratively mine the coupling characteristics of raw machining data in the time and frequency domains, resulting in insufficient characterization of early, subtle faults such as tool wear and spindle thermal deformation; most monitoring models neglect the physical layout of sensors within the machine tool's spatial structure, failing to utilize spatial dependencies between components to trace and enhance abnormal signals, making it difficult to balance false alarm and false negative rates; and existing monitoring systems exhibit poor adaptability to dynamic changes in machining conditions, unable to adjust the sensitivity of anomaly detection based on real-time cutting parameters, thus limiting the model's generalization ability and robustness in real-world complex machining scenarios.

[0004] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a cloud-based CNC machining center monitoring data processing system, comprising an enhancement module, a fusion module, an encoding module, a reconstruction module, and a judgment module; The enhancement module constructs a standard data matrix based on the original processing data and CAD layout drawings, and performs data enhancement processing on the standard data matrix to obtain a time-domain enhanced data matrix and a frequency-domain enhanced data matrix. The fusion module performs spatial feature enhancement on the time-domain enhanced data matrix and the frequency-domain enhanced data matrix based on GAT, respectively, to obtain the first spatial enhanced feature matrix and the second spatial enhanced feature matrix. The encoding module uses an improved Autoformer encoder to perform time-series encoding on the time-domain enhanced data matrix and fuse it with the first spatial enhanced feature matrix to obtain the first time-series encoded feature. It also performs time-series encoding on the frequency-domain enhanced data matrix and fuses it with the second spatial enhanced feature matrix to obtain the second time-series encoded feature. The first temporal coding feature and the second temporal coding feature are fused to obtain the final coding feature matrix; The reconstruction module performs sequence decomposition on the standard data matrix to obtain the initial trend component and the initial seasonal component. It then uses an improved Autoformer decoder to decode the initial trend component and the initial seasonal component based on the final encoded feature matrix, thus obtaining the final output reconstructed data matrix. The judgment module performs anomaly judgment based on the final output reconstructed data matrix and the standard data matrix.

[0005] As a preferred embodiment of the cloud-based CNC machining center monitoring data processing system described in this invention, the construction of the standard data matrix includes performing data augmentation processing on the standard data matrix to obtain a time-domain augmented data matrix and a frequency-domain augmented data matrix. Raw machining data is collected by sensors deployed on the CNC machining center, and CAD layout drawings of the sensors on the CNC machining center are obtained. The sensors include shaft temperature sensor, vibration sensor, current sensor, power sensor, feed rate sensor and spindle speed sensor; The raw machining data includes spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data; The spindle temperature sensor, vibration sensor, current sensor, power sensor, feed rate sensor, and spindle speed sensor correspond to spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data, respectively. The spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data constitute time series data, forming the original data matrix; In this matrix, the number of rows corresponds to the length of the sliding time window, and the number of columns corresponds to the number of sensors.

[0006] As a preferred embodiment of the cloud-based CNC machining center monitoring data processing system described in this invention, the installation position coordinates of each sensor on the CNC machining center machine tool are extracted according to the CAD layout drawing, and the Euclidean distance between each pair of sensors is calculated one by one. A spatial adjacency matrix is ​​constructed based on the Euclidean distance, and the number of rows and columns of the spatial adjacency matrix are equal to the number of sensors; If the Euclidean distance between any two sensors is less than a preset distance threshold, then the corresponding elements of the two sensors in the spatial adjacency matrix are set to 1, indicating that the two sensors are adjacent. Otherwise, the value is 0, indicating that the two sensors are not adjacent; The original data matrix is ​​then Z-score standardized to obtain a standard data matrix.

[0007] As a preferred embodiment of the cloud-based CNC machining center monitoring data processing system described in this invention, the data enhancement processing includes adding Gaussian noise to a standard data matrix to obtain a time-domain enhanced data matrix. Perform a one-dimensional discrete Fourier transform on the standard data matrix to obtain the amplitude spectrum and phase spectrum. Add Gaussian noise to the amplitude spectrum and phase spectrum respectively to obtain the noisy amplitude spectrum and phase spectrum. Based on the amplitude spectrum and phase spectrum after noise addition, a noisy frequency domain complex spectrum is constructed. An inverse Fourier transform is performed on the noisy frequency domain complex spectrum to obtain an intermediate complex matrix. The real part of the intermediate complex matrix is ​​taken to obtain the frequency domain enhanced data matrix.

[0008] As a preferred embodiment of the cloud-based CNC machining center monitoring data processing system described in this invention, the process of obtaining the first spatial enhancement feature matrix includes using an improved Autoformer encoder to perform time-series encoding on the time-domain enhancement data matrix and the frequency-domain enhancement data matrix respectively, and fusing them with the corresponding spatial enhancement feature matrix to obtain the corresponding first encoding representation and second encoding representation. The first and second encoded representations are concatenated and linearly fused to obtain the final encoded feature matrix. The temporal augmentation data matrix is ​​transposed to obtain the graph node feature matrix of GAT. The spatial adjacency matrix is ​​used as the graph structure of GAT and input into an independent attention head of GAT. The independent attention head obtains the feature vectors of each node from the graph node feature matrix, performs a linear transformation on the feature vectors, concatenates the transformed feature vectors, and maps them to attention coefficients through the attention parameter vectors, dynamically calculating the attention coefficients between each sensor node. The expression for the attention coefficient is as follows: ; in, Attention coefficient Let be the feature vector of node i, corresponding to the column vector of the i-th column in the time-domain augmented data matrix. Let be the feature vector of node j, corresponding to the column vector of the j-th column in the temporal augmentation data matrix; W is the matrix for linear transformation of the feature vector; and a is the attention parameter vector. This is a vector concatenation operation. It is a linear rectified activation function with leakage; The attention coefficients are normalized to obtain the attention weights; The first spatial sub-feature matrix of the independent attention head is obtained by weighting and summing the features corresponding to neighboring nodes in the graph node feature matrix based on attention weights.

[0009] As a preferred embodiment of the cloud-based CNC machining center monitoring data processing system described in this invention, a multi-head attention mechanism is adopted, and K independent attention heads are dynamically calculated in parallel. Each attention head outputs a first spatial sub-feature matrix. The first spatial sub-feature matrices output by the K independent attention heads are concatenated in the feature dimension to obtain the first spatial enhancement feature matrix corresponding to the time-domain enhanced data matrix. The number of rows in the first spatial augmentation feature matrix is ​​equal to the number of sensors, and the number of columns is the feature dimension; The process of obtaining the first spatial enhancement feature matrix is ​​performed on the frequency domain enhanced data matrix to obtain the second spatial enhancement feature matrix corresponding to the frequency domain enhanced data matrix.

[0010] As a preferred embodiment of the cloud-based CNC machining center monitoring data processing system described in this invention, the fusion logic specifically includes using the temporal domain enhanced data matrix as the initial input of the encoder and the first spatial enhanced feature matrix as the spatial fusion feature. In each layer of the encoder, the latent representation of the current layer is additively fused with the first spatial augmented feature matrix; The encoder consists of n layers, each layer including an autocorrelation layer, a sequence decomposition layer, and a feedforward network layer; For each layer, the autocorrelation layer performs periodic discovery and aggregation on the input encoding representation of the current layer to obtain the autocorrelation output; The first spatial enhancement feature matrix is ​​mapped to the same feature dimension as the input encoding representation of the current layer through a linear projection layer to obtain a spatial projection matrix. The spatial projection matrix is ​​then extended along the time dimension to obtain extended spatial features. The extended spatial features are then added to the autocorrelation output and the input encoding representation of the current layer to obtain fused features. The fused features are decomposed by a sequence decomposition layer to extract seasonal components. The seasonal components are then input into a feedforward network layer for nonlinear transformation to obtain feedforward transformed features. The feedforward transformed features are added to the input seasonal components and decomposed again by the sequence decomposition layer to obtain the output seasonal components of the sequence decomposition layer. By traversing n layers, the first temporal coding feature corresponding to the temporal domain augmentation data is obtained; The frequency domain enhanced data matrix is ​​temporally encoded using the aforementioned fusion logic and fused with the second spatial enhanced feature matrix to obtain the second temporally encoded feature. The first temporal coding feature and the second temporal coding feature are concatenated along the feature dimension to obtain the concatenated feature; The concatenated features are input into a linear layer and linearly fused to obtain the final encoded feature matrix.

[0011] As a preferred embodiment of the cloud-based CNC machining center monitoring data processing system described in this invention, the dimensions of the initial trend component and the initial seasonal component are the same as those of the standard data matrix. The decoding process includes taking the initial seasonal component as the input of the first layer of the decoder, taking the initial trend component as the initial accumulated trend term, and taking the final encoded feature matrix as the cross-attention input of the decoder. The initial trend component, the initial seasonal component, and the final encoded feature matrix are decoded to obtain the reconstructed data matrix. The decoder comprises M layers, each layer consisting of 2 decoder autocorrelation layers and 3 decoder sequence decomposition layers; Among them, the two decoder autocorrelation layers are the first decoder autocorrelation layer and the second decoder autocorrelation layer, respectively; The three decoder sequence decomposition layers are the first decoder sequence decomposition layer, the second decoder sequence decomposition layer, and the third decoder sequence decomposition layer; During the decoding process, an accumulation trend term is set, and the initial accumulation trend term is used as the accumulation trend term before the first layer of processing; For each layer, the input of the current layer is processed by the first decoder autocorrelation layer to obtain the first autocorrelation output; The first autocorrelation output is added to the input of the current layer and then decomposed through the first decoder sequence decomposition layer to obtain the first seasonal component and the first trend component. The first seasonal component and the final encoded feature matrix are input into the autocorrelation layer of the second decoder for cross-autocorrelation processing to obtain the second autocorrelation output. The second autocorrelation output is added to the first seasonal component, and then decomposed through the second decoder sequence decomposition layer to obtain the second seasonal component and the second trend component. The second seasonal component is input into the feedforward network layer for nonlinear transformation to obtain the feedforward output; The feedforward output is added to the second seasonal component and then decomposed through the third decoder sequence decomposition layer to obtain the third seasonal component and the third trend component. The first trend component, the second trend component, and the third trend component are added to the cumulative trend term of the previous layer to obtain the cumulative trend term of the current layer. The third-season component output from the current layer is used as the input to the next layer, and the decoding process is performed layer by layer. After traversing M layers, the third-season component output from the last layer is added to the cumulative trend term of the last layer to obtain the reconstructed data matrix.

[0012] As a preferred embodiment of the cloud-based CNC machining center monitoring data processing system described in this invention, the abnormal score is calculated based on the error between the reconstructed data matrix and the standard data matrix, and the abnormal score is subjected to multi-window averaging and smoothing to obtain a smoothed abnormal score. The calculation process of the anomaly score includes calculating the mean square error of each time point in each sensor dimension based on the reconstructed data matrix and the standard data matrix, which is used as the initial anomaly score; The multi-window averaging process includes, when multiple time points appear simultaneously in multiple sliding windows during sliding window processing, calculating the average of the initial anomaly scores in each sliding window at that time point, and obtaining the final anomaly score at that time point; The moving average smoothing process involves taking the final outlier score at each time point and then taking the scores of the previous and next L time points as the center to obtain the smoothed outlier score.

[0013] As a preferred embodiment of the cloud-based CNC machining center monitoring data processing system described in this invention, the smoothed abnormal score is compared with a dynamic threshold, specifically including: setting a benchmark threshold and constructing a mapping relationship between cutting parameter combinations and threshold adjustment coefficients; The cutting parameter combination is a two-dimensional vector consisting of the current value of the feed rate data read from the CNC controller of the CNC machining center and the current value of the spindle speed sensor; Based on the two-dimensional vector, query the corresponding threshold adjustment coefficient in the mapping relationship; The product of the baseline threshold and the threshold adjustment coefficient is used as the dynamic threshold; The smoothed abnormal score is compared with the dynamic threshold. If the smoothed abnormal score is greater than the dynamic threshold, the corresponding time point is determined to be an abnormal moment, and an alarm is triggered.

[0014] The beneficial effects of this invention are as follows: By constructing a deep monitoring model that integrates time-frequency domain enhancement and spatial topology perception, it effectively solves the shortcomings of existing technologies in multi-source data collaborative analysis, spatial dependency mining, and adaptive operation. By introducing a frequency domain enhancement mechanism to reconstruct the amplitude and phase spectra of the original data with added noise, and combining it with a graph attention network to capture the spatial adjacency relationships of sensors based on CAD layout, it achieves decoupling and complementary enhancement of time-frequency domain features, significantly improving the model's sensitivity to early weak fault signals and spatial source tracing capability. At the same time, by using an improved Autoformer encoder to deeply integrate spatial enhancement features with periodic temporal features, it breaks through the bottleneck of traditional methods that cannot simultaneously take into account nonlinear temporal fluctuations and component spatial correlation. By constructing a dynamic threshold adjustment mechanism based on cutting parameters, the anomaly judgment can adapt to the real-time changes in feed rate and spindle speed, greatly reducing the false alarm and missed alarm rates under complex operating conditions. Ultimately, it achieves accurate reconstruction of the operating status of CNC machining centers and highly robust anomaly alarms, providing reliable data decision support for cloud-based intelligent operation and maintenance. Attached Figure Description

[0015] Figure 1 This is a basic flowchart of a cloud-based CNC machining center monitoring data processing system provided as an embodiment of the present invention. Detailed Implementation

[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0017] Example, refer to Figure 1 As an embodiment of the present invention, a cloud-based CNC machining center monitoring data processing system is provided, including an enhancement module, a fusion module, an encoding module, a reconstruction module, and a judgment module; The enhancement module constructs a standard data matrix based on the original processing data and CAD layout drawings, and performs data enhancement processing on the standard data matrix to obtain a time-domain enhanced data matrix and a frequency-domain enhanced data matrix. The fusion module performs spatial feature enhancement on the time-domain enhanced data matrix and the frequency-domain enhanced data matrix based on GAT, respectively, to obtain the first spatial enhanced feature matrix and the second spatial enhanced feature matrix. The encoding module uses an improved Autoformer encoder to perform time-series encoding on the time-domain enhanced data matrix and fuse it with the first spatial enhanced feature matrix to obtain the first time-series encoded feature. It also performs time-series encoding on the frequency-domain enhanced data matrix and fuses it with the second spatial enhanced feature matrix to obtain the second time-series encoded feature. The first temporal coding feature and the second temporal coding feature are fused to obtain the final coding feature matrix; The reconstruction module performs sequence decomposition on the standard data matrix to obtain the initial trend component and the initial seasonal component. It then uses an improved Autoformer decoder to decode the initial trend component and the initial seasonal component based on the final encoded feature matrix, thus obtaining the final output reconstructed data matrix. The judgment module performs anomaly judgment based on the final output reconstructed data matrix and the standard data matrix.

[0018] In one embodiment, the system employs an edge-cloud collaborative architecture. The edge side is deployed on the industrial computer or edge intelligent gateway (e.g., Advantech UNO-2484G) of the CNC machining center, including raw machining data reading, sliding time window construction, Z-score standardization, and adding Gaussian noise. The edge side is also responsible for uploading the standardized data matrix to the cloud MQTT Broker via the MQTT over TLS protocol (data format: Protobuf, upload frequency: once per sliding window). The cloud deploys a GAT model, an improved Autoformer encoder and decoder, and a judgment module. After receiving the standard data matrix uploaded from the edge, the cloud calls the GAT and Autoformer models for inference, obtains the reconstructed data matrix, and calculates the anomaly score. Simultaneously, the cloud reads the feed rate and spindle speed values ​​in real time from the CNC controller's OPC UA server for dynamic threshold adjustment. When an anomaly is detected, the cloud calls back to the edge gateway via an HTTP API. The edge gateway triggers the machine tool alarm light via a digital output module (e.g., Moxa E1212) or sends a pause command to the CNC via an I / O interface. All the above communication protocols and interfaces are implemented using industry standards.

[0019] To comprehensively capture the multi-source data characteristics of CNC machining centers under complex working conditions and improve anomaly monitoring accuracy, this solution designs a five-step collaborative processing framework including an enhancement module, a fusion module, an encoding module, a reconstruction module, and a judgment module. The enhancement module first constructs a standard data matrix based on the original machining data and CAD layout drawings, and then performs time-frequency domain data enhancement processing on the standard data matrix to overcome the limitations of single-domain data representation. By introducing noise and frequency domain transformation, it enriches the diversity of the data, obtaining a time-domain enhanced data matrix and a frequency-domain enhanced data matrix. The fusion module performs spatial feature enhancement on the time-domain and frequency-domain enhanced data matrices based on a graph attention network (GAT), explicitly introducing the physical spatial adjacency relationships of sensors on the machine tool into the model. By dynamically calculating attention coefficients, it captures the spatial dependencies between components, thus obtaining a first spatial enhanced feature matrix and a second spatial enhanced feature matrix, effectively solving the problem of traditional methods ignoring spatial topological information. The encoding module uses an improved Autoformer encoder to perform periodic time-series encoding on the time-domain and frequency-domain enhanced data matrices, and then performs deep fusion with the corresponding first and second spatial enhanced feature matrices to obtain a first time-series encoded feature matrix and a second spatial enhanced feature matrix. The second temporal coding feature is then concatenated and fused with the first and second temporal coding features to generate the final coding feature matrix. This matrix is ​​used to achieve the synergistic expression of temporal fluctuation features and spatial structure features, significantly improving the model's comprehensive perception capability of early weak fault signals. The reconstruction module performs sequence decomposition on the standard data matrix to extract the initial trend component and the initial seasonal component. An improved Autoformer decoder is then used to accurately decode and reconstruct these two components based on the final coding feature matrix. This utilizes the temporal decomposition mechanism to reduce the interference of data non-stationarity, thereby obtaining a high-quality reconstructed data matrix. The judgment module determines anomalies by calculating the error between the reconstructed data matrix and the standard data matrix, achieving accurate monitoring of the processing status. The entire framework, through a progressive process of enhancement, fusion, encoding, reconstruction, and judgment, organically connects multi-source data from time-frequency domain enhancement, spatial topology perception, to deep temporal decoding, ultimately achieving high-precision and robust monitoring of CNC machining center operation status anomalies in the cloud. In this embodiment, the sensors are connected to the control system of the CNC machining center, specifically including: a spindle temperature sensor (PT100 type) connected to the industrial computer's PCIe bus via an analog input module (NI 9215); a vibration sensor (piezoelectric ICP type, PCB 352C33) synchronously acquired via an IEPE acquisition card (NI 9234); a current sensor (Hall effect type, LF310-S) and a power sensor (LWK-3) transmitted via a PLC analog module (Siemens SM331) using the PROFIBUS-DP protocol; feed rate and spindle speed data are directly read from the OPC UA server of the CNC controller (Siemens 840D sl), with a sampling frequency of 1Hz. All raw machining data are acquired by the edge-side industrial computer (operating system Ubuntu 20.04, real-time patch) using a unified time-series scheduling task: vibration data sampling frequency is 10kHz, and other sensors are sampled at 1Hz. The edge program reads the latest data from the circular buffer every 100ms, downsamples the vibration data to 1Hz using peak detection to align with other sensors. Within each sliding window (100 seconds long, 1-second step), each sensor sequentially extracts values ​​from 100 time points to form the raw data matrix. For timestamp alignment, an edge gateway clock based on PTP (Precise Time Protocol) synchronization is used, and data from each acquisition subsystem is timestamped globally. The edge program uses linear interpolation to align asynchronous sampling points to whole seconds. When an alarm is triggered after an anomaly is detected, the cloud sends an alarm signal (JSON format, including the anomaly time point and sensor index) to the edge-side industrial control computer via HTTP API. The edge-side industrial control computer outputs a 24V high level to the alarm light relay in the machine tool electrical cabinet via the digital output module (MoxaE1212, DO channel 1), and simultaneously writes it to DB100.DBX0.0 (custom alarm address) in the CNC controller via OPC UA, causing the machine tool to pause in the next machining program segment.

[0020] Constructing a standard data matrix includes performing data augmentation processing on the standard data matrix to obtain a time-domain augmented data matrix and a frequency-domain augmented data matrix; Raw machining data is collected by sensors deployed on the CNC machining center, and CAD layout drawings of the sensors on the CNC machining center are obtained. The sensors include shaft temperature sensor, vibration sensor, current sensor, power sensor, feed rate sensor and spindle speed sensor; The raw machining data includes spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data; The spindle temperature sensor, vibration sensor, current sensor, power sensor, feed rate sensor, and spindle speed sensor correspond to spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data, respectively. The spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data constitute time series data, forming the original data matrix; In this matrix, the number of rows corresponds to the length of the sliding time window, and the number of columns corresponds to the number of sensors.

[0021] Based on the CAD layout drawings, extract the installation position coordinates of each sensor on the CNC machining center machine tool, and calculate the Euclidean distance between each pair of sensors one by one. A spatial adjacency matrix is ​​constructed based on Euclidean distance, where the number of rows and columns of the spatial adjacency matrix are equal to the number of sensors. If the Euclidean distance between any two sensors is less than a preset distance threshold, then the corresponding elements of the two sensors in the spatial adjacency matrix are set to 1, indicating that the two sensors are adjacent. Otherwise, the value is 0, indicating that the two sensors are not adjacent; The original data matrix is ​​then Z-score standardized to obtain a standard data matrix.

[0022] Data augmentation processing includes adding Gaussian noise to a standard data matrix to obtain a time-domain augmented data matrix; Perform a one-dimensional discrete Fourier transform on the standard data matrix to obtain the amplitude spectrum and phase spectrum. Add Gaussian noise to the amplitude spectrum and phase spectrum respectively to obtain the noisy amplitude spectrum and phase spectrum. Based on the amplitude spectrum and phase spectrum after noise addition, a noisy frequency domain complex spectrum is constructed. An inverse Fourier transform is performed on the noisy frequency domain complex spectrum to obtain an intermediate complex matrix. The real part of the intermediate complex matrix is ​​taken to obtain the frequency domain enhanced data matrix.

[0023] In one embodiment, during the specific implementation of constructing a standard data matrix and performing data augmentation, this solution first collects raw machining data using sensors deployed on the CNC machining center machine tool, and simultaneously acquires the precise installation coordinates of each sensor in the machine tool's CAD layout drawing. Specifically, the sensors include, but are not limited to, shaft temperature sensors, vibration sensors, current sensors, power sensors, feed rate sensors, and spindle speed sensors, which respectively collect spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data. These data collectively constitute a time series and form a raw data matrix. The number of rows in the raw data matrix corresponds to the length of a preset sliding time window. In this embodiment, the sliding time window length is set to 100 time points to balance data real-time performance and historical information. The number of columns corresponds to the number of sensors. The system consists of 6 columns. The 3D spatial coordinates of each sensor are extracted from the CAD layout drawings. The Euclidean distance between each pair of sensors is calculated, and a spatial adjacency matrix is ​​constructed based on these Euclidean distances. The number of rows and columns in this spatial adjacency matrix is ​​equal to the number of sensors (6). The construction rule for the spatial adjacency matrix is ​​that if the Euclidean distance between any two sensors is less than a preset distance threshold of 0.5 meters, the corresponding element in the adjacency matrix is ​​set to 1, indicating that the two sensors are adjacent; otherwise, it is set to 0, indicating that they are not adjacent. This threshold of 0.5 meters is set based on prior knowledge of the spatial correlation of key components in the CNC machining center, ensuring that sensors physically close to each other can be identified as adjacent nodes in the graph structure. This explicitly quantifies the physical spatial adjacency relationship of sensors on the machine tool into a graph structure, providing a structural foundation for the subsequent graph attention network to capture spatially dependent features, achieving mapping and alignment from physical space to feature space. The original data matrix is ​​Z-score standardized to obtain a standard data matrix. Standardization ensures that all original processed data are compared under the same dimensions, eliminating the influence of different physical quantity units and improving stability. Time-domain enhancement is then performed by adding Gaussian noise to the standard data matrix to obtain a time-domain enhanced data matrix. The Gaussian noise used is a Gaussian white noise sequence with a mean of 0 and a variance of 0.01. Appropriate perturbations are introduced to improve the model's generalization ability while ensuring that the main features of the original data are not obscured. Frequency-domain enhancement is then performed. First, a one-dimensional discrete Fourier transform is performed column-wise on the standard data matrix to obtain the amplitude and phase spectra. Then, the same Gaussian noise sequence with a mean of 0 and a variance of 0.01 is independently added to the amplitude and phase spectra respectively to obtain noisy amplitude and phase spectra. Finally, the frequency domain is reconstructed based on the noisy amplitude and phase spectra. The complex spectrum is processed by performing an inverse Fourier transform to obtain an intermediate complex matrix. The real part of this intermediate complex matrix is ​​then used as the frequency domain enhancement data matrix. Frequency domain enhancement involves decomposing the time-domain signal into the frequency domain using Fourier transform. By adding noise to the amplitude and phase, the spectral characteristics of the signal are perturbed and enhanced, allowing the model to learn robust features in the frequency domain. This complements the time-domain enhancement, thereby improving the model's ability to perceive frequency-sensitive features. The time-domain and frequency-domain enhancement data matrices obtained through the above processing serve as inputs to the subsequent fusion module. The design of the entire data preparation stage aims to perform dual enhancement of the original data from both the time and frequency domains. Combined with the construction of a spatial adjacency matrix, this provides the model with richer and more robust multi-perspective inputs, effectively solving the problem of limited single-domain data representation capabilities and fundamentally improving adaptability to complex working conditions.

[0024] The process of obtaining the first spatial augmented feature matrix includes using an improved Autoformer encoder to perform time-series encoding on the time-domain augmented data matrix and the frequency-domain augmented data matrix respectively, and fusing them with the corresponding spatial augmented feature matrix to obtain the corresponding first encoding representation and second encoding representation. The first and second encoded representations are concatenated and linearly fused to obtain the final encoded feature matrix. The temporal augmentation data matrix is ​​transposed to obtain the graph node feature matrix of GAT. The spatial adjacency matrix is ​​used as the graph structure of GAT and input into an independent attention head of GAT. The independent attention head obtains the feature vectors of each node from the feature matrix of the graph nodes, performs a linear transformation on the feature vectors, concatenates the transformed feature vectors, and maps them to attention coefficients through the attention parameter vectors, dynamically calculating the attention coefficients between each sensor node. The expression for the attention coefficient is as follows: ; in, Attention coefficient Let be the feature vector of node i, corresponding to the column vector of the i-th column in the time-domain augmented data matrix. Let be the feature vector of node j, corresponding to the column vector of the j-th column in the temporal augmentation data matrix; W is the matrix for linear transformation of the feature vector; and a is the attention parameter vector. This is a vector concatenation operation. It is a linear rectified activation function with leakage; The attention coefficients are normalized to obtain the attention weights; The first spatial sub-feature matrix of the independent attention head is obtained by weighting and summing the features corresponding to neighboring nodes in the graph node feature matrix based on attention weights.

[0025] A multi-head attention mechanism is adopted to perform dynamic calculations of K independent attention heads in parallel. Each attention head outputs a first spatial sub-feature matrix. The first spatial sub-feature matrices output by the K independent attention heads are concatenated in the feature dimension to obtain the first spatial augmented feature matrix corresponding to the temporal augmented data matrix. The number of rows in the first spatial augmentation feature matrix is ​​equal to the number of sensors, and the number of columns is the feature dimension; The process of obtaining the first spatial enhancement feature matrix is ​​performed on the frequency domain enhanced data matrix to obtain the second spatial enhancement feature matrix corresponding to the frequency domain enhanced data matrix.

[0026] In one embodiment, the process of obtaining the first spatial enhancement feature matrix in the fusion module is specifically implemented as follows: To capture the spatial dependencies between sensors using the Graph Attention Network (GAT), the temporal enhancement data matrix is ​​first transposed to obtain the graph node feature matrix of the GAT. The shape of this graph node feature matrix is ​​the number of rows of sensors multiplied by the length of the sliding window. In this embodiment, the number of sensors is 6 and the sliding window length is 100, so the graph node feature matrix is ​​6 rows and 100 columns, where each row corresponds to the time series feature vector of a sensor node within the sliding window, and each column corresponds to a time point. The aforementioned constructed spatial adjacency matrix is ​​used as the graph structure of the GAT and input to an independent attention head of the GAT. The purpose of this attention head is to adaptively aggregate the feature information of spatially adjacent sensors by dynamically calculating the attention coefficients between neighboring nodes, thereby strengthening the feature representation of the target node. In this independent attention head, the feature vector of each node in the graph node feature matrix is ​​first processed. and Linear transformations are performed separately, with the transformation matrix W set to a dimension of 100×64, mapping the original 100-dimensional features to a 64-dimensional latent space. The value of this dimension is determined empirically to balance the model's expressive power and computational efficiency. Then, the transformed feature vectors are concatenated and mapped to attention coefficients through a learnable attention parameter vector a with a dimension of 128×1. In the calculation formula, the negative slope coefficient of LeakyReLU is set to 0.2. The purpose of calculating this attention coefficient is to measure the importance of node j to node i. The spatial weights related to the task are obtained through end-to-end learning. The attention coefficients of all neighboring nodes j related to node i, including node i itself, are subjected to softmax normalization to obtain the attention weights, so that the sum of the weights of all neighboring nodes is 1. This normalization operation is used to ensure the reasonable distribution of weights and gradient stability. Based on the attention weights, the features corresponding to the neighboring nodes in the graph node feature matrix are weighted and summed, that is, the transformed features of each neighboring node are multiplied by the weight and then accumulated to obtain the first spatial sub-feature matrix output by the attention head. The matrix has a shape of 6 rows and 64 columns, where each row corresponds to the feature representation of a node after single-head spatial enhancement. A multi-head attention mechanism is adopted to improve the stability and richness of feature representation. In this embodiment, K=4 independent attention heads are executed in parallel. The transformation matrix W and attention parameter vector a of each attention head are initialized independently. Each head outputs a 6× The first spatial sub-feature matrix is ​​64. The outputs of the four heads are concatenated along the feature dimension to obtain the final first spatial augmented feature matrix, which has a shape of 6 rows and 256 columns (6×64×4). The number of rows corresponds to the number of sensors, and the number of columns is 256, which is the feature dimension after concatenation. The multi-head attention mechanism is used to capture various dependencies between sensors from different representation subspaces, enhancing the expressive power and robustness of the model. For the frequency domain augmented data matrix, the process of obtaining the first spatial augmented feature matrix is ​​repeated to obtain the second spatial augmented feature matrix corresponding to the frequency domain augmented data matrix, which also has a shape of 6 rows and 256 columns. This parallel processing is used to enable the time domain and frequency domain data to obtain spatial augmented representations that match their domain characteristics, providing aligned feature inputs for subsequent encoding fusion. The entire fusion module is used to dynamically integrate physical spatial adjacency relationships into time and frequency domain features through a graph attention network, enabling the model to perceive the spatial topology of sensors on the machine tool, thereby effectively solving the problem of inaccurate abnormal positioning caused by ignoring spatial dependencies in traditional methods, and improving the comprehensive perception capability of multi-source data from the feature level. It should be noted that Autoformer is a time series forecasting model based on autocorrelation mechanism. Its encoder consists of multiple stacked layers, each of which includes: an autocorrelation layer (Auto-Correlation), used to discover the periodicity of the sequence and aggregate similar subsequences through fast Fourier transform; a series decomp layer (Series Decomp), used to decompose the sequence into seasonal and trend components; and a feed-forward network layer (Feed-Forward). The decoder adopts a similar structure and introduces cross-autocorrelation. The above is the general structure of Autoformer. The improved Autoformer encoder structure in this invention specifically includes: In each encoder layer, a spatial feature injection branch is set after the autocorrelation layer and before the sequence decomposition layer. This branch linearly projects and expands the first spatial augmentation feature matrix, then adds the residuals of the output of the autocorrelation layer and the input encoded representation of the current layer, forming a fusion structure of "input encoded representation + autocorrelation output + expanded spatial features". Taking a certain layer of the encoder as an example, let the input encoded representation be the implicit representation obtained before the current layer passes the temporal augmentation data matrix, and its shape is the length of the time window multiplied by the hidden layer dimension column; the autocorrelation output is the result of periodic discovery and aggregation of the input encoded representation; the spatial projection matrix is ​​obtained by linearly projecting the first spatial augmentation feature matrix, and its shape is the number of sensors multiplied by the hidden layer dimension column; expanding the spatial projection matrix along the time dimension yields the expanded spatial features, whose shape is the length of the time window multiplied by the product of the number of sensors and the hidden layer dimension column. Then the fused feature is equal to the input encoded representation plus the autocorrelation output plus the expanded spatial features; subsequently, the seasonal component is extracted through the sequence decomposition layer.

[0027] The difference between the above structure and the standard Autoformer is that the autocorrelation output in the standard Autoformer is only added to the input encoded representation, while this invention introduces extended space features as a third term for additive fusion.

[0028] The complete structure of the decoder is as follows: each decoder layer includes a first decoder autocorrelation layer, a second decoder autocorrelation layer, and three decoder sequence decomposition layers. The final encoded feature matrix is ​​introduced as a cross-attention input in the second decoder autocorrelation layer, and three trend components are accumulated within each decoder layer. In the operational logic of the above structure, periodicity detection uses Fast Fourier Transform, and autocorrelation aggregation uses a confidence-based rolling average. The improvements to this structure are: a spatial feature injection branch is added to the encoder to achieve residual fusion of temporal features and spatially enhanced features; cross-autocorrelation and three-layer trend accumulation are introduced in the decoder to achieve guided reconstruction of encoded features.

[0029] The fusion logic specifically includes using the temporal augmented data matrix as the initial input of the encoder and the first spatial augmented feature matrix as the spatial fusion feature; In each layer of the encoder, the latent representation of the current layer is additively fused with the first spatial augmented feature matrix; The encoder consists of n layers, each layer including an autocorrelation layer, a sequence decomposition layer, and a feedforward network layer; For each layer, the autocorrelation layer performs periodic discovery and aggregation on the input encoding representation of the current layer to obtain the autocorrelation output; The first spatial enhancement feature matrix is ​​mapped to the same feature dimension as the input encoding representation of the current layer through a linear projection layer to obtain a spatial projection matrix. The spatial projection matrix is ​​then extended along the time dimension to obtain extended spatial features. The extended spatial features are then added to the autocorrelation output and the input encoding representation of the current layer to obtain fused features. The fused features are decomposed by a sequence decomposition layer to extract seasonal components. The seasonal components are then input into a feedforward network layer for nonlinear transformation to obtain feedforward transformed features. The feedforward transformed features are added to the input seasonal components and decomposed again by the sequence decomposition layer to obtain the output seasonal components of the sequence decomposition layer. By traversing n layers, the first temporal coding feature corresponding to the temporal domain augmentation data is obtained; The frequency domain enhanced data matrix is ​​temporally encoded using fusion logic and fused with the second spatial enhanced feature matrix to obtain the second temporally encoded feature. The first temporal coding feature and the second temporal coding feature are concatenated along the feature dimension to obtain the concatenated feature; The concatenated features are input into a linear layer and linearly fused to obtain the final encoded feature matrix.

[0030] In one embodiment, the specific implementation process of the fusion logic in the encoding module is as follows: To deeply fuse spatial augmentation features with the temporal coding process, the temporal augmentation data matrix is ​​first used as the initial input of the encoder. The shape of this matrix is ​​a sliding window length of 100 rows multiplied by the number of sensors (6 columns). Simultaneously, the first spatial augmentation feature matrix is ​​used as the spatial fusion feature. The shape of this matrix is ​​the number of sensors (6 rows multiplied by the feature dimension of 256 columns). The encoder is designed as an n-layer structure. In this embodiment, n is taken as 2 to balance model depth and computational efficiency. Each layer includes an autocorrelation layer, a sequence decomposition layer, and a feedforward network layer. For each layer, the autocorrelation layer first performs periodic discovery and aggregation on the input encoding representation of the current layer. The autocorrelation layer is implemented by performing a Fast Fourier Transform on the input sequence to obtain its frequency domain representation, calculating its autocorrelation to identify significant periods, and then performing rolling aggregation on the sequence based on the identified periods. Subsequences with similar periods are weighted and fused to obtain the autocorrelation output. This autocorrelation layer is used to aggregate information by utilizing the periodic properties of the sequence. Compared with traditional attention mechanisms, it has lower computational complexity and better interpretability, and can effectively capture periodic fluctuation patterns in CNC machining data, such as cutting cycles. To achieve the fusion of spatial and temporal features, the first spatial enhancement feature matrix is ​​mapped to the same feature dimension as the current layer's input encoding representation through a linear projection layer. The shape of the current layer's input encoding representation is 100× ,in In this embodiment, the hidden layer dimension is used as the model's hidden layer dimension. The weight matrix of the linear projection layer is set to 128; the shape of the weight matrix is ​​256×128. The 6×256 first spatial enhancement feature matrix is ​​projected into a 6×128 spatial projection matrix. This projection operation aligns the spatial feature dimension with the hidden layer dimension. The spatial projection matrix is ​​then expanded along the time dimension to obtain expanded spatial features. Specifically, the 6×128 matrix is ​​copied 100 times and stacked along the time dimension to obtain a 100×6×128 three-dimensional tensor, which is then reshaped into a 100×(6×128), i.e., 100×768 two-dimensional matrix, aligning it with the 100 time dimension of the encoder input. This expansion operation enables the spatial features to be fused point-by-point with the temporal features at each time point. The expanded spatial... The features are added to the autocorrelation output and the input encoding representation of the current layer to obtain the fused features, i.e., fused features = input encoding representation + autocorrelation output + extended spatial features. This additive fusion is used to directly inject spatial information into the temporal coding process through residual connections, enabling the capture of time dependence while always sensing the spatial topological relationship of the sensor. The fused features are decomposed through a sequence decomposition layer to extract the seasonal component. The sequence decomposition layer is implemented using a moving average method, specifically by performing a moving average of the fused features along the time dimension with a window size of 25 to extract the trend component, and then subtracting the trend component from the fused features to obtain the seasonal component. The moving average window size of 25 is set according to the data sampling frequency. This decomposition operation is used to decompose the time-series data into trend terms. The seasonal component is decomposed to facilitate modeling different time patterns. The decomposed seasonal component is input into a feedforward network layer for nonlinear transformation. This feedforward network layer consists of two fully connected layers: the first fully connected layer maps the input dimension from 768 to 2048 and applies the ReLU activation function; the second fully connected layer maps the 2048 dimension back to 768. The feedforward transformed feature is then added to the input seasonal component to achieve residual connection, and then decomposed again through a sequence decomposition layer to obtain the final output seasonal component. The output shape of this layer remains unchanged at 100×768. The two-layer encoder structure is traversed, and the seasonal component output from the last layer is used as the first temporal coding feature corresponding to the temporal augmentation data, with a shape of 100×768. A fully... Using the same fusion logic, the frequency domain enhanced data matrix is ​​processed and fused with the second spatial enhanced feature matrix to obtain the second temporal coding feature, which also has a shape of 100×768. This parallel processing is used to enable the temporal domain enhanced data matrix and the frequency domain enhanced data matrix to obtain temporal coding representations that match the characteristics of the temporal domain enhanced data matrix and the frequency domain enhanced data matrix, respectively. The first temporal coding feature and the second temporal coding feature are concatenated along the feature dimension to obtain the concatenated feature, which has a shape of 100×1536, i.e., 768+768. Then, the concatenated feature is input into a linear layer for linear fusion. The weight matrix of the linear layer has a shape of 1536×768, and the final coding feature matrix is ​​output, which has a shape of 100×768.This fusion operation compresses and integrates the encoded information in the time and frequency domains, generating a unified representation that includes features from both the time and frequency domains. The entire encoding module is used to jointly model time dependence, periodicity, and spatial topology by injecting spatial enhancement features layer by layer into the improved Autoformer encoder, thereby generating a final encoded feature matrix rich in multi-source information, providing high-quality input for subsequent decoding and reconstruction.

[0031] The dimensions of the initial trend component and the initial seasonal component are the same as those of the standard data matrix; The decoding process includes taking the initial seasonal component as the input of the first layer of the decoder, taking the initial trend component as the initial accumulated trend term, and taking the final encoded feature matrix as the cross-attention input of the decoder. The initial trend component, the initial seasonal component, and the final encoded feature matrix are decoded to obtain the reconstructed data matrix. The decoder consists of M layers, each layer comprising two decoder autocorrelation layers and three decoder sequence decomposition layers; Among them, the two decoder autocorrelation layers are the first decoder autocorrelation layer and the second decoder autocorrelation layer, respectively; The three decoder sequence decomposition layers are the first decoder sequence decomposition layer, the second decoder sequence decomposition layer, and the third decoder sequence decomposition layer; During the decoding process, an accumulation trend term is set, and the initial accumulation trend term is used as the accumulation trend term before the first layer of processing; For each layer, the input of the current layer is processed by the first decoder autocorrelation layer to obtain the first autocorrelation output; The first autocorrelation output is added to the input of the current layer and then decomposed through the first decoder sequence decomposition layer to obtain the first seasonal component and the first trend component. The first seasonal component and the final encoded feature matrix are input into the autocorrelation layer of the second decoder for cross-autocorrelation processing to obtain the second autocorrelation output. The second autocorrelation output is added to the first seasonal component, and then decomposed through the second decoder sequence decomposition layer to obtain the second seasonal component and the second trend component. The second seasonal component is input into the feedforward network layer for nonlinear transformation to obtain the feedforward output; The feedforward output is added to the second seasonal component and then decomposed through the third decoder sequence decomposition layer to obtain the third seasonal component and the third trend component. The first trend component, the second trend component, and the third trend component are added to the cumulative trend term of the previous layer to obtain the cumulative trend term of the current layer. The third-season component output from the current layer is used as the input to the next layer, and the decoding process is performed layer by layer. After traversing M layers, the third-season component output from the last layer is added to the cumulative trend term of the last layer to obtain the reconstructed data matrix.

[0032] In one embodiment, the decoding process in the reconstruction module is implemented as follows: First, the standard data matrix is ​​decomposed sequentially to obtain initial trend components and initial seasonal components. The dimensions of the initial trend components and initial seasonal components are the same as those of the standard data matrix, i.e., the shape is a sliding window with a length of 100 rows multiplied by the number of sensors (6 columns). The sequential decomposition method is consistent with the sequential decomposition layer in the encoder, using the moving average method. The moving average window size is also set to 25. After extracting the trend components from the standard data matrix, the seasonal components are obtained by subtracting the trend components from the original matrix. This decomposition operation is used to separate the original data into stable trend components and periodic seasonal components, which facilitates reconstruction by the decoder. The initial seasonal components are used as the first layer of the decoder. The input is taken as the initial trend component as the initial accumulated trend term, and the final encoded feature matrix is ​​taken as the cross-attention input of the decoder, ready for decoding processing. The decoder is designed as an M-layer structure, in this embodiment M is set to 2, consistent with the number of encoder layers to balance encoding and decoding capabilities. Each layer includes two decoder autocorrelation layers (first decoder autocorrelation layer and second decoder autocorrelation layer) and three decoder sequence decomposition layers (first decoder sequence decomposition layer, second decoder sequence decomposition layer, and third decoder sequence decomposition layer). For the decoding processing of each layer, the input of the current layer is first processed through the first decoder autocorrelation layer. The implementation of this autocorrelation layer is the same as that of the autocorrelation layer in the encoder: the input sequence is subjected to a fast Fourier transform to obtain... The input sequence is represented in the frequency domain. The autocorrelation of the input sequence is calculated to identify significant periods. Then, based on the identified periods, the sequence is rolled and aggregated to obtain the first autocorrelation output. This layer is used to self-enhance the periodic patterns of the current decoding input, enabling the decoded features to continue the periodicity of the input. The first autocorrelation output is added to the input of the current layer to establish a residual connection. Then, it is decomposed through the first decoder sequence decomposition layer to obtain the first seasonal component and the first trend component. The sequence decomposition layer also uses a moving average method with a moving average window size of 25. The trend is extracted from the added features to obtain the seasonal component. To guide decoding using encoded features, the first seasonal component is used as the query, and the final encoded feature matrix is... The first seasonal component and the second value are input to the second decoder autocorrelation layer for cross-autocorrelation processing. Specifically, the cross-autocorrelation is implemented by performing Fast Fourier Transform on the first seasonal component and the final encoded feature matrix, calculating their cross-correlation in the frequency domain, identifying periodic patterns aligned with the encoded features, and then performing rolling aggregation on the encoded features based on the identified periods to obtain the second autocorrelation output. This cross-autocorrelation layer enables the decoding process to perceive the time-frequency domain fusion features extracted during the encoding stage, achieving efficient information transmission and reconstruction guidance. The second autocorrelation output is added to the first seasonal component and decomposed through the second decoder sequence decomposition layer to obtain the second seasonal component and the second trend component. The second seasonal component is then input into the feedforward network layer for nonlinear transformation.The feedforward network layer consists of two fully connected layers. The first fully connected layer maps the input dimension from 768 (the second seasonal component has a shape of 100×768) to 2048 and applies the ReLU activation function. The second fully connected layer maps the 2048 dimension back to 768 dimension, obtaining the feedforward output. The feedforward output is then added to the second seasonal component to achieve a residual connection, and then decomposed through a third decoder sequence decomposition layer to obtain the third seasonal component and the third trend component. This feedforward network is used to introduce nonlinear transformations to enhance the model's expressive power. The first, second, and third trend components obtained in this layer are added to the accumulated trend term of the previous layer to obtain the accumulated trend term of the current layer. For the first layer, the accumulated trend term of the previous layer is the initial accumulated trend term and initial trend component. The accumulation operation progressively accumulates the extracted trends from each layer. Trend information makes the final trend reconstruction more accurate; the third seasonal component output from the current layer is used as the input for the next layer, and decoding is performed layer by layer; the two-layer structure of the decoder is traversed; after traversing M layers, the third seasonal component output from the last layer is added to the accumulated trend term of the last layer to obtain the final reconstructed data matrix, which has a shape of 100 rows by 6 columns, consistent with the dimensions of the original standard data matrix; this addition operation is used to merge the decoded seasonal components with the accumulated trend components to complete the complete reconstruction of the original data; the entire reconstruction module is used to gradually restore the trend and seasonal components of the original data from the final encoded feature matrix through multi-layer cascaded autocorrelation, cross-autocorrelation and sequence decomposition mechanisms, combined with the accumulated trend term, thereby generating a high-quality reconstructed data matrix, providing an accurate benchmark for subsequent anomaly detection; The training dataset for GAT and the improved Autoformer model was collected from data collected from a CNC machining center that had been running continuously for 720 hours after maintenance and calibration, with no abnormal events confirmed on-site. This data included six categories of raw machining data: spindle temperature, vibration, current, power, feed rate, and spindle speed. The sampling frequency was uniformly resampled at 1Hz, and samples were constructed using a sliding time window of 100 steps. 80% of the dataset was used as the training set, 10% as the validation set, and 10% as the test set. The loss function for training the GAT and improved Autoformer models was the mean squared error (MSE) between the reconstructed data matrix and the input standard data matrix, expressed as: ; in, Let T represent the loss function, T represent the time window length, and N represent the number of sensors. This represents the index of a time point within the time window. The sensor index x represents the input. Represents the first element in the input standard data matrix. Time point, number Sensor values, Indicates the reconstructed output. The representation indicates the data matrix reconstructed by the decoder. The time point, the first The reconstructed value of each sensor channel, which is related to... The positions in the matrix correspond one-to-one, no additional regularization terms are used, the optimizer is AdamW, the initial learning rate is set to 0.001, the batch size is 64, the training epochs are 200, and an early stopping mechanism is adopted (the model stops if the validation set loss does not decrease for 20 consecutive epochs). The model is initialized using Xavier uniform initialization. The training process is executed on a cloud GPU server (NVIDIA Tesla T4). After training is completed, the parameters of GAT and the improved Autoformer model are fixed and saved, and deployed to the cloud inference service.

[0033] Anomaly scores are calculated based on the error between the reconstructed data matrix and the standard data matrix. The anomaly scores are then subjected to multi-window averaging and smoothing to obtain smoothed anomaly scores. The calculation process of the anomaly score includes calculating the mean square error of each time point in each sensor dimension based on the reconstructed data matrix and the standard data matrix, which is used as the initial anomaly score; Multi-window averaging includes calculating the average of the initial outlier scores in each sliding window when multiple time points appear simultaneously in the sliding window process, to obtain the final outlier score for that time point. The moving average smoothing process involves taking the final outlier score at each time point and then taking the scores of the previous and next L time points as the center to obtain the smoothed outlier score.

[0034] The smoothed outlier score is compared with a dynamic threshold, specifically including setting a baseline threshold and constructing a mapping relationship between the cutting parameter combination and the threshold adjustment coefficient; The cutting parameter combination is a two-dimensional vector consisting of the current value of the feed rate data read from the CNC controller of the CNC machining center and the current value of the spindle speed sensor; Based on the two-dimensional vector, query the corresponding threshold adjustment coefficient in the mapping relationship; The product of the baseline threshold and the threshold adjustment coefficient is used as the dynamic threshold; The smoothed anomaly score is compared with the dynamic threshold. If the smoothed anomaly score is greater than the dynamic threshold, the corresponding time point is determined to be an anomaly and an alarm is triggered.

[0035] In one embodiment, the anomaly determination process in the determination module is implemented as follows: First, based on the sliding window processing mechanism, the sliding window step size is set to a single time point, and the window length is maintained at 100 time points. Therefore, there is an overlap of 99 time points between adjacent windows, and each time point is covered by multiple consecutive windows. For each window, based on the reconstructed data matrix and the standard data matrix corresponding to the window, the mean square error of each time point in the window in each sensor dimension is calculated. That is, the arithmetic mean of the squared differences between the reconstructed values ​​and the original values ​​of the 6 sensors at that time point is taken as the initial anomaly score under that window. This calculation method is used to quantify the model reconstruction error. The larger the error, the further the data pattern at that time point deviates from the normal pattern. Multi-window averaging is performed. For each time point, the initial outlier scores calculated by all windows covering that time point are collected, and the arithmetic mean of the initial outlier scores is calculated as the final outlier score for that time point. Multi-window averaging is used to eliminate the boundary effects and random fluctuations of individual windows by utilizing the window overlap mechanism, thereby improving the stability and reliability of outlier scores. Moving average smoothing is then applied to the final outlier score at each time point. Eleven points (five before and five after each time point) are taken with equal weight and averaged to obtain the smoothed outlier score. The window size for moving average smoothing is set based on the data sampling frequency of one point per second and the duration of the outlier event, ensuring that the smoothing window covers five seconds before and after the outlier, effectively suppressing transient noise interference. While preventing disturbances, it retains continuous abnormal characteristics; a preset benchmark threshold is set, which is obtained by statistically analyzing historical normal machining data. Specifically, the data is collected during the first 720 hours of continuous operation after the equipment has completed maintenance and calibration, provided that no abnormal events such as tool breakage, collision, or over-limit alarms have occurred, and the workpiece dimensional accuracy is confirmed to meet the drawing tolerance requirements after subsequent inspection. The smoothed anomaly score at each time point is calculated according to the same process, and the sum of the average smoothed anomaly score and three times the standard deviation is taken as the benchmark threshold; a mapping relationship between cutting parameter combinations and threshold adjustment coefficients is constructed; firstly, feed speed data and spindle speed data are read in real time from the CNC controller of the CNC machining center to form a two-dimensional data processing system. The system uses a 3D vector; it divides the feed rate range from 0 to 2000 mm / min into 10 equal intervals, and the spindle speed range from 0 to 10,000 rpm into 10 equal intervals, resulting in 100 cutting parameter combinations. Using historical normal machining data, each time point is grouped according to its feed rate and spindle speed range. The mean and standard deviation of the smoothed anomaly scores for all time points within each group are calculated, and the mean plus three times the standard deviation is used as the anomaly threshold for that group under the current operating conditions. The ratio of this group's threshold to the global baseline threshold is then used as the threshold adjustment coefficient for that group. For groups with insufficient data, bilinear interpolation is used to extrapolate from the coefficients of adjacent combinations. This mapping relationship is pre-calculated and stored in the system.During real-time anomaly detection, the current feed rate and spindle speed at the current time point determine the corresponding cutting parameter combination, retrieve the corresponding threshold adjustment coefficient, and calculate the dynamic threshold, which is equal to the baseline threshold multiplied by this coefficient. The smoothed anomaly score at the current time point is compared with the dynamic threshold. If the smoothed anomaly score is greater than the dynamic threshold, the time point is determined to be an anomaly, triggering an alarm. This dynamic threshold adjustment mechanism enables the anomaly detection threshold to adapt to the normal fluctuation range under different cutting loads, avoiding false alarms due to increased normal fluctuations under high-speed heavy-load conditions, or missed alarms due to excessively high thresholds under low-speed light-load conditions. The entire detection module obtains stable and smooth anomaly measurement through multi-window averaging and moving average, and combines it with the condition-adaptive dynamic threshold to achieve high-precision, low-false-alarm anomaly monitoring of the CNC machining center's operating status. The first and second spatial augmented feature matrices output by the fusion module are directly fed into two parallel encoder branches in the encoding module. The first branch processes the temporal augmented data matrix, and the second branch processes the frequency domain augmented data matrix. Each encoder branch, at each layer, receives a tensor formed by linear projection and dimensional expansion of the corresponding spatial augmented feature matrix, and adds it as a residual to the autocorrelation output of that layer and the input encoded representation of the current layer. The final encoded feature matrix output by the encoding module is directly used as the cross-attention input to the decoder in the reconstruction module. The decoder also receives the initial trend and initial seasonal components obtained by the reconstruction module through sequence decomposition of the standard data matrix. The input to the decision module is the reconstructed data matrix output by the reconstruction module and the standard data matrix output by the augmentation module.

[0036] This invention effectively addresses the shortcomings of existing technologies in multi-source data collaborative analysis, spatial dependency mining, and adaptive operation by constructing a deep monitoring model that integrates time-frequency domain enhancement and spatial topology awareness. It introduces a frequency domain enhancement mechanism to reconstruct the amplitude and phase spectra of the original data with added noise, and combines this with a graph attention network to capture the spatial adjacency relationships of sensors based on CAD layout. This achieves decoupling and complementary enhancement of time-frequency domain features, significantly improving the model's sensitivity to early weak fault signals and its spatial source tracing capability. Simultaneously, an improved Autoformer encoder is used to deeply integrate spatial enhancement features with periodic temporal features, overcoming the bottleneck of traditional methods that struggle to simultaneously address nonlinear temporal fluctuations and component spatial correlations. By constructing a dynamic threshold adjustment mechanism based on cutting parameters, anomaly detection can adaptively adapt to real-time changes in feed rate and spindle speed, significantly reducing false alarms and missed alarms under complex operating conditions. Ultimately, this achieves accurate reconstruction of the CNC machining center's operating status and highly robust anomaly alarms, providing reliable data decision support for cloud-based intelligent operation and maintenance.

[0037] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0038] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the protection scope of the present invention.

Claims

1. A cloud-based CNC machining center monitoring data processing system, characterized in that, It includes an enhancement module, a fusion module, an encoding module, a reconstruction module, and a decision module; The enhancement module constructs a standard data matrix based on the original processing data and CAD layout drawings, and performs data enhancement processing on the standard data matrix to obtain a time-domain enhanced data matrix and a frequency-domain enhanced data matrix. The fusion module performs spatial feature enhancement on the time-domain enhanced data matrix and the frequency-domain enhanced data matrix based on GAT, respectively, to obtain the first spatial enhanced feature matrix and the second spatial enhanced feature matrix. The encoding module employs an improved Autoformer encoder to perform time-series encoding on the time-domain enhanced data matrix and fuse it with the first spatial enhanced feature matrix to obtain the first time-series encoded feature. It also performs time-series encoding on the frequency-domain enhanced data matrix and fuses it with the second spatial enhanced feature matrix to obtain the second time-series encoded feature. The first temporal coding feature and the second temporal coding feature are fused to obtain the final coding feature matrix; The reconstruction module performs sequence decomposition on the standard data matrix to obtain the initial trend component and the initial seasonal component. It then uses an improved Autoformer decoder to decode the initial trend component and the initial seasonal component based on the final encoded feature matrix, thus obtaining the final output reconstructed data matrix. The judgment module performs anomaly judgment based on the final output reconstructed data matrix and the standard data matrix.

2. The cloud-based CNC machining center monitoring data processing system as described in claim 1, characterized in that, Constructing a standard data matrix includes performing data augmentation processing on the standard data matrix to obtain a time-domain augmented data matrix and a frequency-domain augmented data matrix; Raw machining data is collected by sensors deployed on the CNC machining center, and CAD layout drawings of the sensors on the CNC machining center are obtained. The sensors include shaft temperature sensor, vibration sensor, current sensor, power sensor, feed rate sensor and spindle speed sensor; The raw machining data includes spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data; The spindle temperature sensor, vibration sensor, current sensor, power sensor, feed rate sensor, and spindle speed sensor correspond to spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data, respectively. The spindle temperature data, vibration data, current data, power data, feed rate data, and spindle speed data constitute time series data, forming the original data matrix; In this matrix, the number of rows corresponds to the length of the sliding time window, and the number of columns corresponds to the number of sensors.

3. The cloud-based CNC machining center monitoring data processing system as described in claim 2, characterized in that, Based on the CAD layout drawings, extract the installation position coordinates of each sensor on the CNC machining center machine tool, and calculate the Euclidean distance between each pair of sensors one by one. A spatial adjacency matrix is ​​constructed based on the Euclidean distance, and the number of rows and columns of the spatial adjacency matrix are equal to the number of sensors; If the Euclidean distance between any two sensors is less than a preset distance threshold, then the corresponding elements of the two sensors in the spatial adjacency matrix are set to 1, indicating that the two sensors are adjacent. Otherwise, the value is 0, indicating that the two sensors are not adjacent; The original data matrix is ​​then Z-score standardized to obtain a standard data matrix.

4. The cloud-based CNC machining center monitoring data processing system as described in claim 3, characterized in that, The data augmentation process includes adding Gaussian noise to a standard data matrix to obtain a time-domain augmented data matrix. Perform a one-dimensional discrete Fourier transform on the standard data matrix to obtain the amplitude spectrum and phase spectrum. Add Gaussian noise to the amplitude spectrum and phase spectrum respectively to obtain the noisy amplitude spectrum and phase spectrum. Based on the amplitude spectrum and phase spectrum after noise addition, construct the frequency domain complex spectrum after noise addition. Perform inverse Fourier transform on the frequency domain complex spectrum after noise addition to obtain the intermediate complex matrix. Take the real part of the intermediate complex matrix to obtain the frequency domain enhanced data matrix.

5. The CNC machining center monitoring data processing system based on cloud analytics as described in claim 4, characterized in that, The process of obtaining the first spatial augmented feature matrix includes using an improved Autoformer encoder to perform time-series encoding on the time-domain augmented data matrix and the frequency-domain augmented data matrix respectively, and then fusing them with the corresponding spatial augmented feature matrix to obtain the corresponding first encoding representation and second encoding representation. The first and second encoded representations are concatenated and linearly fused to obtain the final encoded feature matrix. The temporal augmentation data matrix is ​​transposed to obtain the graph node feature matrix of GAT. The spatial adjacency matrix is ​​used as the graph structure of GAT and input into an independent attention head of GAT. The independent attention head obtains the feature vectors of each node from the graph node feature matrix, performs a linear transformation on the feature vectors, concatenates the transformed feature vectors, and maps them to attention coefficients through the attention parameter vectors, dynamically calculating the attention coefficients between each sensor node. The expression for the attention coefficient is as follows: ; in, Attention coefficient Let be the feature vector of node i, corresponding to the column vector of the i-th column in the time-domain augmented data matrix. Let be the feature vector of node j, corresponding to the column vector of the j-th column in the temporal augmentation data matrix; W is the matrix for linear transformation of the feature vector; and a is the attention parameter vector. This is a vector concatenation operation. It is a linear rectified activation function with leakage; The attention coefficients are normalized to obtain the attention weights; The first spatial sub-feature matrix of the independent attention head is obtained by weighting and summing the features corresponding to neighboring nodes in the graph node feature matrix based on attention weights.

6. The cloud-based CNC machining center monitoring data processing system as described in claim 5, characterized in that, A multi-head attention mechanism is adopted to perform dynamic calculations of K independent attention heads in parallel. Each attention head outputs a first spatial sub-feature matrix. The first spatial sub-feature matrices output by the K independent attention heads are concatenated in the feature dimension to obtain the first spatial augmented feature matrix corresponding to the temporal augmented data matrix. The number of rows in the first spatial augmentation feature matrix is ​​equal to the number of sensors, and the number of columns is the feature dimension; The process of obtaining the first spatial enhancement feature matrix is ​​performed on the frequency domain enhanced data matrix to obtain the second spatial enhancement feature matrix corresponding to the frequency domain enhanced data matrix.

7. The cloud-based CNC machining center monitoring data processing system as described in claim 6, characterized in that, The fusion logic specifically includes using the temporal augmented data matrix as the initial input of the encoder and the first spatial augmented feature matrix as the spatial fusion feature; In each layer of the encoder, the latent representation of the current layer is additively fused with the first spatial augmented feature matrix; The encoder consists of n layers, each layer including an autocorrelation layer, a sequence decomposition layer, and a feedforward network layer; For each layer, the autocorrelation layer performs periodic discovery and aggregation on the input encoding representation of the current layer to obtain the autocorrelation output; The first spatial enhancement feature matrix is ​​mapped to the same feature dimension as the input encoding representation of the current layer through a linear projection layer to obtain a spatial projection matrix. The spatial projection matrix is ​​then extended along the time dimension to obtain extended spatial features. The extended spatial features are then added to the autocorrelation output and the input encoding representation of the current layer to obtain fused features. The fused features are decomposed by a sequence decomposition layer to extract seasonal components. The seasonal components are then input into a feedforward network layer for nonlinear transformation to obtain feedforward transformed features. The feedforward transformed features are added to the input seasonal components and decomposed again by the sequence decomposition layer to obtain the output seasonal components of the sequence decomposition layer. By traversing n layers, the first temporal coding feature corresponding to the temporal domain augmentation data is obtained; The frequency domain enhanced data matrix is ​​temporally encoded using the aforementioned fusion logic and fused with the second spatial enhanced feature matrix to obtain the second temporally encoded feature. The first temporal coding feature and the second temporal coding feature are concatenated along the feature dimension to obtain the concatenated feature; The concatenated features are input into a linear layer and linearly fused to obtain the final encoded feature matrix.

8. The cloud-based CNC machining center monitoring data processing system as described in claim 7, characterized in that, The dimensions of the initial trend component and the initial seasonal component are the same as those of the standard data matrix; The decoding process includes taking the initial seasonal component as the input of the first layer of the decoder, taking the initial trend component as the initial accumulated trend term, and taking the final encoded feature matrix as the cross-attention input of the decoder. The initial trend component, the initial seasonal component, and the final encoded feature matrix are decoded to obtain the reconstructed data matrix. The decoder comprises M layers, each layer consisting of 2 decoder autocorrelation layers and 3 decoder sequence decomposition layers; Among them, the two decoder autocorrelation layers are the first decoder autocorrelation layer and the second decoder autocorrelation layer, respectively; The three decoder sequence decomposition layers are the first decoder sequence decomposition layer, the second decoder sequence decomposition layer, and the third decoder sequence decomposition layer; During the decoding process, an accumulation trend term is set, and the initial accumulation trend term is used as the accumulation trend term before the first layer of processing; For each layer, the input of the current layer is processed by the first decoder autocorrelation layer to obtain the first autocorrelation output; The first autocorrelation output is added to the input of the current layer and then decomposed through the first decoder sequence decomposition layer to obtain the first seasonal component and the first trend component. The first seasonal component and the final encoded feature matrix are input into the autocorrelation layer of the second decoder for cross-autocorrelation processing to obtain the second autocorrelation output. The second autocorrelation output is added to the first seasonal component, and then decomposed through the second decoder sequence decomposition layer to obtain the second seasonal component and the second trend component. The second seasonal component is input into the feedforward network layer for nonlinear transformation to obtain the feedforward output; The feedforward output is added to the second seasonal component and then decomposed through the third decoder sequence decomposition layer to obtain the third seasonal component and the third trend component. The first trend component, the second trend component, and the third trend component are added to the cumulative trend term of the previous layer to obtain the cumulative trend term of the current layer. The third-season component output from the current layer is used as the input to the next layer, and the decoding process is performed layer by layer. After traversing M layers, the third-season component output from the last layer is added to the cumulative trend term of the last layer to obtain the reconstructed data matrix.

9. The CNC machining center monitoring data processing system based on cloud analytics as described in claim 8, characterized in that, Anomaly scores are calculated based on the error between the reconstructed data matrix and the standard data matrix. The anomaly scores are then subjected to multi-window averaging and smoothing to obtain smoothed anomaly scores. The calculation process of the anomaly score includes calculating the mean square error of each time point in each sensor dimension based on the reconstructed data matrix and the standard data matrix, which is used as the initial anomaly score; The multi-window averaging process includes, when multiple time points appear simultaneously in multiple sliding windows during sliding window processing, calculating the average of the initial anomaly scores in each sliding window at that time point, and obtaining the final anomaly score at that time point; The moving average smoothing process involves taking the final outlier score at each time point and then taking the scores of the previous and next L time points as the center to obtain the smoothed outlier score.

10. The cloud-based CNC machining center monitoring data processing system as described in claim 9, characterized in that, The smoothed outlier score is compared with a dynamic threshold, specifically including setting a baseline threshold and constructing a mapping relationship between the cutting parameter combination and the threshold adjustment coefficient; The cutting parameter combination is a two-dimensional vector consisting of the current value of the feed rate data read from the CNC controller of the CNC machining center and the current value of the spindle speed sensor; Based on the two-dimensional vector, query the corresponding threshold adjustment coefficient in the mapping relationship; The product of the baseline threshold and the threshold adjustment coefficient is used as the dynamic threshold; The smoothed abnormal score is compared with the dynamic threshold. If the smoothed abnormal score is greater than the dynamic threshold, the corresponding time point is determined to be an abnormal moment, and an alarm is triggered.