Numerical control machine tool spindle fault feature accurate extraction method based on deep learning

By using signal processing involving multi-feature fusion and phase coding reconstruction, combined with dual-path convolutional neural networks and multi-physical information constraints, accurate extraction and real-time diagnosis of fault features of CNC machine tool spindles are achieved. This solves the problems of unbalanced multi-source data processing and insufficient feature extraction in existing technologies, and improves the accuracy and reliability of fault diagnosis.

CN121834299AInactive Publication Date: 2026-04-10WUHAN VOCATIONAL COLLEGE OF SOFTWARE & ENG (WUHAN OPEN UNIV)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-04-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies for extracting fault features from CNC machine tool spindles suffer from several problems, including unbalanced processing of multi-source data, neglect of signal phase information during feature reconstruction, single-path structure of feature extraction networks, failure to incorporate multi-physics information during network parameter initialization, and lack of quantification and visualization of fault severity in diagnostic results. These issues result in insufficient accuracy and practicality in fault diagnosis.

Method used

Vibration signals are processed by adaptive segmentation and dynamic standardization using multi-feature fusion. A phase-sensitive texture map is generated by reconstructing phase encoding. A dual-path convolutional neural network is constructed and combined with multi-task self-supervised pre-training and multi-physical information constraints to achieve synchronous output of fault type and severity. Diagnostic results are provided through multi-domain feature visualization.

Benefits of technology

It improves the accuracy and reliability of CNC machine tool spindle fault feature extraction, reduces operating condition interference, enhances adaptability to real-time operating conditions, provides intuitive fault decision-making basis, and improves the accuracy and reliability of fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834299A_ABST
    Figure CN121834299A_ABST
Patent Text Reader

Abstract

The invention discloses a deep learning-based numerical control machine tool spindle fault feature accurate extraction method, and relates to the technical field of numerical control machine tool fault analysis. Multi-source data of a numerical control machine tool spindle are collected, and multi-feature fusion adaptive segmentation and dynamic standardization processing is performed on vibration signals in the multi-source data to obtain standardized signal segments; and reconstructing the standardized signal segment into a two-dimensional matrix through phase coding, and generating a phase-sensitive texture mapping graph after gray level enhancement and texture consistency verification. According to the invention, phase coding reconstruction and texture consistency verification enhance the characterization capability of two-dimensional features to faults and reduce ineffective feature interference; the double-path convolutional neural network and a channel attention mechanism realize accurate fusion of global and local features, and the feature extraction integrity is improved; the multi-physical information constrained pre-training enhances the adaptability of the network to real-time working conditions, and reduces diagnosis errors under different working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machine tool fault analysis technology, and in particular to a method for accurately extracting fault features of CNC machine tool spindles based on deep learning. Background Technology

[0002] The CNC machine tool spindle is the core moving component of the machine tool, and its operating status directly determines machining accuracy and production efficiency. If spindle bearing wear, shaft imbalance, and other faults are not detected in time, they can easily lead to a chain reaction of problems such as spindle jamming and scrapped workpieces, causing significant economic losses. Current spindle fault feature extraction technology has several limitations:

[0003] In multi-source data processing, traditional vibration signal segmentation uses a fixed window length without dynamically adjusting based on spindle speed and bearing temperature. Standardization does not consider the impact of temperature on signal amplitude, resulting in a large deviation between the preprocessed data and the actual working conditions.

[0004] Feature reconstruction ignores the role of signal phase information in characterizing fault features and lacks verification of the consistency of reconstructed texture, which easily introduces invalid features.

[0005] Feature extraction networks are mostly single-path structures, which cannot simultaneously take into account global operating condition features and local fine fault features, and feature fusion does not optimize the weights of key fault features.

[0006] The network parameter initialization did not incorporate multi-physics information of the main axis to construct constraints, resulting in poor adaptability to real-time operating conditions; the diagnostic results only included fault types, lacking fault severity quantification, multi-domain feature visualization, and physical interpretability, making it difficult to support on-site operation and maintenance decisions.

[0007] Therefore, there is an urgent need for a deep learning method that integrates multi-source operating condition information and adapts to real-time scenarios to improve the accuracy of spindle fault feature extraction and diagnostic practicality. Summary of the Invention

[0008] To address the aforementioned technical problems, this invention provides a method for accurately extracting fault features of CNC machine tool spindles based on deep learning. The technical solution adopted is as follows:

[0009] A method for accurately extracting fault features of CNC machine tool spindles based on deep learning includes the following steps:

[0010] Step 1: Collect multi-source data from the CNC machine tool spindle, and perform adaptive segmentation and dynamic standardization processing on the vibration signals in the multi-source data to obtain standardized signal segments;

[0011] Step 2: The standardized signal segments are reconstructed into a two-dimensional matrix through phase encoding. After grayscale enhancement and texture consistency verification, a phase-sensitive texture map is generated.

[0012] Step 3: Construct a dual-path convolutional neural network, which includes a global feature extraction path and a local fine feature extraction path. The dual-path features are fused using a channel attention mechanism to achieve synchronous output of fault type and fault severity.

[0013] Step 4: Initialize the parameters of the dual-path convolutional neural network based on multi-task self-supervised pre-training, and dynamically adjust the pre-training task parameters and multi-physical information constraints in combination with real-time multi-source data to optimize the network's ability to learn fault characteristics under real-time operating conditions.

[0014] Step 5: Fine-tune the dual-path convolutional neural network using labeled fault samples with real-time operating condition labels. Perform end-to-end fault diagnosis based on the fine-tuned dual-path convolutional neural network. Combine real-time multi-source data to dynamically correct the diagnosis results and fault feature output content. Visualize the specific fault features under real-time operating conditions through multi-domain features.

[0015] Optionally, the multi-source data in step 1 includes spindle vibration signal, real-time spindle speed data, and spindle bearing temperature data;

[0016] The adaptive segmentation based on multi-feature fusion is as follows: Based on the health status data of the spindle under no-load and rated load, the peak value, variance, kurtosis and impulse exponent of the vibration signal are calculated to construct a multi-feature vector. The hierarchical clustering algorithm is used to determine the health threshold range of each feature. Then, according to the health vibration law under different speeds, the mapping relationship between speed and feature threshold is established to generate a dynamic threshold model.

[0017] A sliding window analysis is performed on the online vibration signal. The weighted sum of multiple feature vectors within each window is calculated as a comprehensive evaluation value. When the comprehensive evaluation value exceeds the threshold corresponding to the current rotational speed output by the dynamic threshold model, the signal of the corresponding window and one window before and after it is extracted to form a potential fault event segment. The dynamic standardization is as follows: the amplitude of the potential fault event segment is normalized using the z-score method. The temperature compensation coefficient is calculated based on the deviation between the real-time bearing temperature and the healthy temperature reference. The normalized signal amplitude is linearly corrected using the temperature compensation coefficient to obtain a standardized signal segment of length L.

[0018] Optionally, the phase encoding reconstruction in step 2 specifically involves: determining the reconstruction dimension M based on the standardized signal segment length L, where M is... The integer approximation of L; if L is not a perfect square, then zero padding is used to adjust the signal length to M².

[0019] The standardized signal segments are divided into M groups in chronological order, each group containing M sampling points to construct an initial M×M matrix; the analytic phase of the signal is obtained through Hilbert transform, the phase difference between adjacent sampling points is calculated and converted into the spatial gradient of matrix elements, and the initial gray value of each element in the matrix is ​​obtained by weighting the amplitude of the corresponding sampling point with the phase difference of adjacent elements to generate a phase coding matrix;

[0020] The grayscale enhancement process involves linearly mapping the numerical range of the phase encoding matrix to a grayscale range of 0 to 255 to obtain an initial grayscale image. The initial grayscale image is then processed using contrast-limited adaptive histogram equalization, with the contrast clipping limit set to 2.0, to obtain a preliminary texture image.

[0021] The texture consistency verification process is as follows: calculate the texture entropy in the row and column directions of the preliminary texture map. If the texture entropy in either direction is lower than 80% of the texture entropy of the healthy sample, adjust the reconstruction dimension M to the original dimension plus or minus 1, and then re-execute the phase encoding reconstruction and grayscale enhancement until the texture entropy meets the requirements, and finally obtain the phase-sensitive texture map.

[0022] Optionally, the dual-path convolutional neural network in step 3 is as follows: the global feature extraction path sequentially includes a 7×7 convolutional layer, a batch normalization layer, a ReLU activation function layer and a 3×3 max pooling layer. The 7×7 convolutional layer has 64 kernels, a stride of 2, and padding of 3. The stride of the 3×3 max pooling layer is 2.

[0023] The local fine feature extraction path is composed of three densely connected modules connected in series. Each densely connected module contains two 3×3 convolutional layers, a batch normalization layer and a ReLU activation function layer. The output of each convolutional layer is concatenated with the input of all subsequent convolutional layers.

[0024] The channel attention mechanism is as follows: after concatenating the feature maps of the dual-path outputs along the channel dimension, the concatenated feature maps are transformed into channel feature vectors through global average pooling. The channel feature vectors are processed by the first fully connected layer, the ReLU activation function, the second fully connected layer, and the Sigmoid activation function to obtain channel weights. The channel weights are multiplied with the concatenated feature maps channel by channel to achieve weighted fusion.

[0025] Optionally, the multi-physical information constraints in step 4 specifically include the following three parts:

[0026] The first part is the real-time frequency domain feature constraint. Based on the real-time rotation speed and bearing model, the theoretical fault characteristic frequency is dynamically updated. Wavelet packet decomposition is performed on the standardized signal segment to extract the energy value of the frequency band where the updated theoretical fault frequency is located. The energy value weight is corrected by combining the real-time temperature deviation to obtain the dynamic physical feature vector.

[0027] The second part is the real-time multi-physical quantity fusion constraint, which concatenates the dynamic physical feature vector with the feature vector after global average pooling of the network, the real-time rotation speed, and the numerical feature vector of temperature conversion, and inputs it into the fully connected layer. The cosine similarity between the concatenated feature vector and the dynamic physical feature vector is not less than 0.8 after L2 regularization constraint.

[0028] The third part is the real-time intermediate layer constraint. At the output of the second densely connected module of the local fine feature extraction path, the time-domain dynamic features of the real-time vibration signal are input, and feature constraint loss is added to maximize the correlation coefficient between the feature map output by the second densely connected module and the real-time time-domain dynamic features.

[0029] Optionally, the end-to-end fault diagnosis and feature output in step 5 specifically involves: real-time access to multi-source data from the spindle; processing the real-time vibration signal into a phase-sensitive texture map via steps 1 and 2; synchronously inputting this map into a finely tuned dual-path convolutional neural network along with real-time speed and temperature data; the dual-path convolutional neural network calculates the theoretical fault characteristic frequency under the current operating condition using real-time speed; and corrects the fault severity index using real-time temperature. The final output includes: fault type, corrected fault severity index, real-time theoretical fault characteristic frequency value, corresponding frequency band energy value, time-domain pulse amplitude and occurrence time interval, and the influence coefficients of real-time temperature and speed on the fault characteristics.

[0030] Optionally, the specific process of multi-domain feature visualization in step 5 is as follows:

[0031] Two heatmaps are generated using the gradient weighted activation mapping method, corresponding to fault type decision and fault severity assessment, respectively. The two heatmaps are superimposed on the original phase-sensitive texture map, and the real-time rotation speed, temperature value and corresponding theoretical fault frequency are labeled to identify the key texture regions of interest to the model.

[0032] The key texture regions are back-traced to the time interval corresponding to the standardized signal segment. The original vibration signal and real-time multi-source data of the time interval are extracted, and a multi-domain correlation diagram is drawn, including time-domain waveform diagram, wavelet packet frequency-domain energy diagram, and real-time operating condition parameter diagram.

[0033] The system automatically calculates fault characteristic deviations based on the multi-domain association graph to generate a diagnostic report. The report includes a comparison table of fault characteristic thresholds under real-time operating conditions, a prediction of fault development trends, and physical interpretability.

[0034] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a method for accurately extracting fault features of CNC machine tool spindles based on deep learning.

[0035] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements a method for accurately extracting fault features of CNC machine tool spindles based on deep learning.

[0036] In summary, the present invention has at least one of the following beneficial technical effects:

[0037] This invention provides a method for accurately extracting fault features of CNC machine tool spindles based on deep learning. Dynamic preprocessing of multi-source data effectively improves data quality and reduces operating condition interference.

[0038] Phase encoding reconstruction and texture consistency verification enhance the ability of two-dimensional features to represent faults and reduce interference from invalid features;

[0039] Dual-path convolutional neural networks and channel attention mechanisms enable accurate fusion of global and local features, improving the completeness of feature extraction.

[0040] Pre-training with multi-physical information constraints enhances the network's adaptability to real-time operating conditions and reduces diagnostic errors under different operating conditions;

[0041] End-to-end diagnostics and multi-domain feature visualization enable simultaneous output of fault type and severity, as well as interpretable features, providing intuitive decision-making support for operations and maintenance and improving the overall accuracy and reliability of spindle fault diagnosis. Attached Figure Description

[0042] Figure 1 This is a flowchart illustrating the method for accurately extracting fault features of CNC machine tool spindles based on deep learning, as proposed in this invention. Detailed Implementation

[0043] The present invention will be further described in detail below with reference to the accompanying drawings.

[0044] This invention discloses a method for accurately extracting fault features of CNC machine tool spindles based on deep learning.

[0045] Reference Figure 1 Example 1: A method for accurately extracting fault features of CNC machine tool spindles based on deep learning, comprising the following steps:

[0046] Step 1: Collect multi-source data from the CNC machine tool spindle, and perform adaptive segmentation and dynamic standardization processing on the vibration signals in the multi-source data to obtain standardized signal segments;

[0047] Step 2: The standardized signal segments are reconstructed into a two-dimensional matrix through phase encoding. After grayscale enhancement and texture consistency verification, a phase-sensitive texture map is generated.

[0048] Step 3: Construct a dual-path convolutional neural network, which includes a global feature extraction path and a local fine feature extraction path. The dual-path features are fused using a channel attention mechanism to achieve synchronous output of fault type and fault severity.

[0049] Step 4: Initialize the parameters of the dual-path convolutional neural network based on multi-task self-supervised pre-training, and dynamically adjust the pre-training task parameters and multi-physical information constraints in combination with real-time multi-source data to optimize the network's ability to learn fault characteristics under real-time operating conditions.

[0050] Step 5: Fine-tune the dual-path convolutional neural network using labeled fault samples with real-time operating condition labels. Perform end-to-end fault diagnosis based on the fine-tuned dual-path convolutional neural network. Combine real-time multi-source data to dynamically correct the diagnosis results and fault feature output content. Visualize the specific fault features under real-time operating conditions through multi-domain features.

[0051] Example 2: The multi-source data in step 1 includes spindle vibration signal, real-time spindle speed data, and spindle bearing temperature data;

[0052] The adaptive segmentation based on multi-feature fusion is as follows: Based on the health status data of the spindle under no-load and rated load, the peak value, variance, kurtosis and impulse exponent of the vibration signal are calculated to construct a multi-feature vector. The hierarchical clustering algorithm is used to determine the health threshold range of each feature. Then, according to the health vibration law under different speeds, the mapping relationship between speed and feature threshold is established to generate a dynamic threshold model.

[0053] A sliding window analysis is performed on the online vibration signal. The weighted sum of multiple feature vectors within each window is calculated as a comprehensive evaluation value. When the comprehensive evaluation value exceeds the threshold corresponding to the current rotational speed output by the dynamic threshold model, the signal of the corresponding window and one window before and after it is extracted to form a potential fault event segment. The dynamic standardization is as follows: the amplitude of the potential fault event segment is normalized using the z-score method. The temperature compensation coefficient is calculated based on the deviation between the real-time bearing temperature and the healthy temperature reference. The normalized signal amplitude is linearly corrected using the temperature compensation coefficient to obtain a standardized signal segment of length L.

[0054] By adopting the above technical solutions, the fault characteristics of CNC machine tool spindles are often hidden in multi-source data. Vibration signals are the core carrier of fault information, so vibration signal processing is the first step. Through adaptive segmentation with multi-feature fusion, the defects of fixed segments being out of touch with the working conditions can be avoided, and potential fault-related signals can be screened by dynamically matching the real-time operating status of the spindle. Dynamic standardization eliminates the deviation of signal amplitude caused by fluctuations in the working conditions, laying a unified data foundation for subsequent feature extraction.

[0055] One-dimensional vibration signals are difficult to intuitively present the spatial distribution pattern of fault characteristics. Phase encoding reconstruction transforms one-dimensional signals into two-dimensional matrices while retaining the fault details contained in the signal phase difference. Gray-scale enhancement improves the distinguishability of fault features from the background in the two-dimensional matrix, while texture consistency verification eliminates invalid textures caused by improper dimension selection during the reconstruction process, ensuring that the generated phase-sensitive texture map can accurately represent fault characteristics.

[0056] Spindle fault diagnosis requires simultaneous attention to both the overall operating condition background and local fine fault features. The global feature extraction path quickly captures overall operating condition-related features through large convolutional kernels and pooling operations, while the local fine feature extraction path enhances the transmission and extraction of local fault detail features with the help of dense connection modules. The channel attention mechanism can automatically identify the channel information that is more critical to fault diagnosis in the dual-path features, and highlight effective features through weighted fusion, so as to achieve simultaneous and accurate judgment of fault type and severity.

[0057] Multi-task self-supervised pre-training can use unlabeled data to initially initialize network parameters, reducing bias in subsequent training with labeled samples. By combining real-time multi-source data to dynamically adjust pre-training parameters and multi-physical information constraints, the network parameters can be adapted to real-time operating condition changes, enhancing the learning adaptability of fault characteristics under different operating conditions and avoiding feature learning bias caused by differences in operating conditions.

[0058] By fine-tuning the network using labeled fault samples, the accuracy of the network in identifying fault features under specific operating conditions can be further improved; end-to-end diagnosis directly connects data processing and fault judgment, reducing information loss in intermediate links; combining real-time multi-source data to correct diagnostic results can eliminate the interference of real-time operating condition fluctuations on diagnostic results; and multi-domain feature visualization transforms abstract fault features into intuitive visualization results, making it easier for operation and maintenance personnel to understand and make decisions.

[0059] In Example 3, the phase encoding reconstruction in step 2 is specifically as follows: the reconstruction dimension M is determined according to the standardized signal segment length L, where M is an integer approximation of L. If L is not a perfect square, the signal length is adjusted to M² by zero padding.

[0060] The standardized signal segments are divided into M groups in chronological order, each group containing M sampling points to construct an initial M×M matrix; the analytic phase of the signal is obtained through Hilbert transform, the phase difference between adjacent sampling points is calculated and converted into the spatial gradient of matrix elements, and the initial gray value of each element in the matrix is ​​obtained by weighting the amplitude of the corresponding sampling point with the phase difference of adjacent elements to generate a phase coding matrix;

[0061] The grayscale enhancement process involves linearly mapping the numerical range of the phase encoding matrix to a grayscale range of 0 to 255 to obtain an initial grayscale image. The initial grayscale image is then processed using contrast-limited adaptive histogram equalization, with the contrast clipping limit set to 2.0, to obtain a preliminary texture image.

[0062] The texture consistency verification process is as follows: calculate the texture entropy in the row and column directions of the preliminary texture map. If the texture entropy in either direction is lower than 80% of the texture entropy of the healthy sample, adjust the reconstruction dimension M to the original dimension plus or minus 1, and then re-execute the phase encoding reconstruction and grayscale enhancement until the texture entropy meets the requirements, and finally obtain the phase-sensitive texture map.

[0063] By adopting the above technical solution, the regularity of the two-dimensional matrix is ​​the basis for subsequent spatial feature extraction. The standardized signal segment length L needs to be converted into a square matrix dimension M. Choosing M as an integer approximation of L can preserve the sampling information of the original signal to the greatest extent. If L is not a perfect square, the signal length is adjusted to M² by zero padding in order to construct a complete M×M square matrix, avoid spatial feature distribution disorder caused by dimensional asymmetry, and ensure the temporal correlation and spatial distribution consistency of the signal in two-dimensional space.

[0064] Dividing the standardized signal segments into M groups, each with M sampling points, according to time sequence is to preserve the temporal characteristics of the signal.

[0065] The Hilbert transform can extract the analytical phase of a signal. Phase information can reflect the vibration phase changes of the signal, and faults can cause abnormal phase shifts in the signal. Calculating the phase difference between adjacent sampling points and converting it into the spatial gradient of matrix elements transforms the phase changes of a one-dimensional time series into gradient features in two-dimensional space, so that the phase anomalies caused by faults are presented in the form of spatial gradient differences. The initial gray values ​​of matrix elements are calculated by weighting the amplitude of sampling points and the phase difference between adjacent points. This is because the amplitude can characterize the intensity of signal vibration, and the phase difference can characterize the phase change pattern of the signal. The weighting of the two can simultaneously integrate the intensity and change features of the signal, comprehensively capturing fault-related information. The generated phase coding matrix can transform the fault features of a one-dimensional vibration signal into identifiable coding features in two-dimensional space.

[0066] There is no unified standard for the original numerical range of the phase coding matrix. It may present different numerical ranges due to differences in signal amplitude and phase difference. The linear mapping to the gray range of 0-255 is to adapt to the standard numerical range of grayscale images, provide a unified numerical benchmark for subsequent image enhancement and feature extraction, and avoid feature extraction deviations caused by chaotic numerical ranges.

[0067] In the initial grayscale image, the contrast between fault-related textures and background textures may be low, causing fault features to be masked. Adaptive histogram equalization can enhance local texture contrast by processing the image in blocks and adjusting the histogram of each block individually. The contrast clipping limit of 2.0 is set to avoid the problem of excessive noise enhancement that may occur with ordinary histogram equalization.

[0068] Example 4, the dual-path convolutional neural network in step 3 is as follows: the global feature extraction path sequentially includes a 7×7 convolutional layer, a batch normalization layer, a ReLU activation function layer and a 3×3 max pooling layer. The 7×7 convolutional layer has 64 kernels, a stride of 2 and padding of 3, and the 3×3 max pooling layer has a stride of 2.

[0069] The local fine feature extraction path is composed of three densely connected modules connected in series. Each densely connected module contains two 3×3 convolutional layers, a batch normalization layer and a ReLU activation function layer. The output of each convolutional layer is concatenated with the input of all subsequent convolutional layers.

[0070] The channel attention mechanism is as follows: after concatenating the feature maps of the dual-path outputs along the channel dimension, the concatenated feature maps are transformed into channel feature vectors through global average pooling. The channel feature vectors are processed by the first fully connected layer, the ReLU activation function, the second fully connected layer, and the Sigmoid activation function to obtain channel weights. The channel weights are multiplied with the concatenated feature maps channel by channel to achieve weighted fusion.

[0071] Example 5, the multi-physical information constraint in step 4 specifically includes the following three parts:

[0072] The first part is the real-time frequency domain feature constraint. Based on the real-time rotation speed and bearing model, the theoretical fault characteristic frequency is dynamically updated. Wavelet packet decomposition is performed on the standardized signal segment to extract the energy value of the frequency band where the updated theoretical fault frequency is located. The energy value weight is corrected by combining the real-time temperature deviation to obtain the dynamic physical feature vector.

[0073] The second part is the real-time multi-physical quantity fusion constraint, which concatenates the dynamic physical feature vector with the feature vector after global average pooling of the network, the real-time rotation speed, and the numerical feature vector of temperature conversion, and inputs it into the fully connected layer. The cosine similarity between the concatenated feature vector and the dynamic physical feature vector is not less than 0.8 after L2 regularization constraint.

[0074] The third part is the real-time intermediate layer constraint. At the output of the second densely connected module of the local fine feature extraction path, the time-domain dynamic features of the real-time vibration signal are input, and feature constraint loss is added to maximize the correlation coefficient between the feature map output by the second densely connected module and the real-time time-domain dynamic features.

[0075] By adopting the above technical solutions, the global feature extraction path is as follows: 7×7 large convolutional kernels can quickly cover the global region of the phase-sensitive texture map. Combined with stride 2 and padding 3, the feature map size is controlled while capturing global working condition features. 64 convolutional kernels enhance feature representation capability. Batch normalization stabilizes the training process and accelerates convergence. The ReLU activation function introduces nonlinearity to fit complex fault features. 3×3 max pooling with stride 2 further compresses the feature map dimension, reducing computation while retaining key global features. The local fine feature extraction path consists of three densely connected modules connected in series. The dual 3×3 convolutional kernels in each module can finely capture local fault texture details. The convolutional layer output is concatenated with subsequent inputs to fully transfer local features and avoid gradient vanishing. Batch normalization and ReLU respectively ensure training stability and feature nonlinearity, ultimately achieving accurate extraction of local fault details.

[0076] After concatenating the dual-path feature maps, global average pooling transforms spatial features into global information in the channel dimension. Through two rounds of fully connected layers and ReLU and Sigmoid activation functions, the importance weights of each channel for fault diagnosis can be adaptively learned. The weights are multiplied with the concatenated feature map channel by channel, which can highlight key fault feature channels and suppress redundant channels, achieving efficient fusion of dual-path features.

[0077] The theoretical fault frequency is updated based on real-time rotational speed and bearing model to ensure that the frequency domain focus range matches the current operating conditions. Wavelet packet decomposition accurately extracts the energy value of this frequency domain to reflect the fault frequency domain characteristics. The energy value weight is corrected by combining temperature deviation to eliminate the interference of temperature on the frequency domain characteristics. Finally, a dynamic physical feature vector that matches the real-time operating conditions is obtained to guide the network to learn real frequency domain fault information.

[0078] By concatenating dynamic physical feature vectors, global network feature vectors, and rotational speed and temperature feature vectors, multi-source physical information is integrated. After inputting into the fully connected layer, L2 regularization is used to constrain cosine similarity, forcing the features learned by the network to maintain a high degree of consistency with the fault features in the physical world, thus avoiding deviation of network features from actual fault patterns.

[0079] Real-time temporal dynamic features are input at the output of the second dense module in the local path. The correlation coefficient between the two is maximized by feature constraint loss, so that the local features extracted by the intermediate layer closely match the real temporal fault details, thereby improving the network's learning accuracy of local fault features.

[0080] In Example 6, the end-to-end fault diagnosis and feature output in step 5 are specifically as follows: real-time access to multi-source data from the spindle; processing the real-time vibration signal into a phase-sensitive texture map via steps 1 and 2; synchronously inputting the map with real-time rotational speed and temperature data into a finely tuned dual-path convolutional neural network; the dual-path convolutional neural network calculates the theoretical fault characteristic frequency under the current operating condition using real-time rotational speed; and corrects the fault severity index using real-time temperature. The final output includes: fault type, corrected fault severity index, real-time theoretical fault characteristic frequency value, corresponding frequency band energy value, time-domain pulse amplitude and occurrence time interval, and the influence coefficients of real-time temperature and rotational speed on the fault characteristics.

[0081] Example 7, the specific process of multi-domain feature visualization in step 5 is as follows:

[0082] Two heatmaps are generated using the gradient weighted activation mapping method, corresponding to fault type decision and fault severity assessment, respectively. The two heatmaps are superimposed on the original phase-sensitive texture map, and the real-time rotation speed, temperature value and corresponding theoretical fault frequency are labeled to identify the key texture regions of interest to the model.

[0083] The key texture regions are back-traced to the time interval corresponding to the standardized signal segment. The original vibration signal and real-time multi-source data of the time interval are extracted, and a multi-domain correlation diagram is drawn, including time-domain waveform diagram, wavelet packet frequency-domain energy diagram, and real-time operating condition parameter diagram.

[0084] The system automatically calculates fault characteristic deviations based on the multi-domain association graph to generate a diagnostic report. The report includes a comparison table of fault characteristic thresholds under real-time operating conditions, a prediction of fault development trends, and physical interpretability.

[0085] By adopting the above technical solution, the real-time vibration signal is transformed into a phase-sensitive texture map through step 1 (adaptive segmentation and dynamic standardization) and step 2 (phase encoding reconstruction, grayscale enhancement, etc.), and the fault characteristics of the one-dimensional vibration signal are transformed into two-dimensional features that the network can recognize. Real-time speed and temperature data are input simultaneously to supplement operating condition information and ensure that the network input covers fault-related signal characteristics and operating condition parameters.

[0086] Accurate calculation and correction of fault features: The dual-path convolutional neural network uses real-time rotation speed to calculate the theoretical fault feature frequency, adapts to the influence of rotation speed on fault frequency, and ensures that the focus is on the key frequency domain features under the current operating conditions; combined with real-time temperature correction of the fault severity index, the interference of temperature fluctuation on fault severity judgment is eliminated, and the accuracy of assessment is improved.

[0087] Multi-dimensional feature output: The final output includes multiple types of information such as fault type, corrected severity index, and theoretical fault frequency, comprehensively covering qualitative and quantitative results of faults and key operating condition impact data, providing a complete basis for fault decision-making in operation and maintenance.

[0088] Key feature region localization: Gradient weighted class activation mapping is used to generate heat maps corresponding to fault types and severity, intuitively marking the texture regions that the network focuses on when making decisions; the original phase-sensitive texture map is superimposed and labeled with speed, temperature and theoretical fault frequency to establish an intuitive relationship between fault features and operating parameters, and clarify the practical significance of key textures.

[0089] Multi-domain data association presentation: The key texture area is backtracked to the time interval of the standardized signal segment, the original vibration signal and multi-source data of the interval are extracted, and a multi-domain association diagram of time domain, frequency domain and working condition parameters is drawn, breaking the limitation of single dimension and comprehensively displaying the characteristic manifestation of fault in different domains.

[0090] Diagnostic report generation: Based on multi-domain association graphs, the deviation between fault characteristics and health thresholds is automatically calculated, and historical data is combined to predict the fault development trend; physical interpretability is provided, and abstract characteristics are transformed into decision information that operation and maintenance personnel can understand, realizing the transformation from visualized characteristics to actual operation and maintenance guidance.

[0091] Example 8: An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a method for accurately extracting fault features of CNC machine tool spindles based on deep learning.

[0092] Example 9: A computer-readable storage medium storing a computer program, which, when executed by a processor, implements a method for accurately extracting fault features of CNC machine tool spindles based on deep learning.

[0093] The following describes the implementation principle of the present invention using specific embodiments:

[0094] A method for accurately extracting fault features of CNC machine tool spindles based on deep learning, the steps of which are as follows:

[0095] Multi-source data from the spindle of a CNC machine tool are collected. The vibration signal is first subjected to adaptive segmentation by multi-feature fusion, and then dynamic standardization is performed to obtain a standardized signal segment with a fixed length.

[0096] The standardized signal segments are reconstructed into a two-dimensional matrix through phase encoding. After grayscale enhancement and texture consistency verification, a phase-sensitive texture map that can characterize the details of the fault is generated.

[0097] A dual-path convolutional neural network is constructed: the global feature extraction path quickly captures global features of the working condition, while the local fine feature extraction path enhances the detailed features of the fault. The channel attention mechanism is used to weight and fuse the output features of the two paths to achieve synchronous output of fault type (such as bearing inner ring / outer ring fault) and fault severity (such as slight / moderate / severe wear).

[0098] The network parameters are initialized based on multi-task self-supervised pre-training (pre-training tasks include signal reconstruction and frequency domain feature prediction). The loss weights and multi-physical information constraints of the pre-training tasks are dynamically adjusted in combination with real-time multi-source data to optimize the network's ability to learn fault characteristics under different operating conditions such as rotational speed (e.g., 800-3000 r / min) and temperature (e.g., 25-60℃).

[0099] The network is fine-tuned using labeled fault samples with real-time operating condition labels (100 samples for each fault type and severity). End-to-end fault diagnosis is performed based on the fine-tuned network. The diagnosis results are corrected every 10 seconds by combining real-time multi-source data. Specific fault characteristics are output through multi-domain feature visualization (heat map, time domain / frequency domain map).

[0100] Composition of multi-source data: spindle vibration signal, real-time spindle speed data, spindle bearing temperature data; adaptive segmentation based on multi-feature fusion.

[0101] First, collect 10 sets of health status data under no-load (0 r / min) and rated load (2000 r / min) conditions of the spindle, with each set lasting 10 seconds. Calculate the peak value (in g), variance (g²), kurtosis (dimensionless), and impulse exponent (dimensionless) of each set of vibration signals to construct a 4-dimensional multi-feature vector.

[0102] Hierarchical clustering algorithm (Euclidean distance metric) is used to cluster multiple feature vectors and determine the health threshold range of each feature (e.g., peak value 0.1-0.3g, kurtosis 2-3).

[0103] Establish a mapping relationship between rotational speed and feature threshold (e.g., for every 500 r / min increase in rotational speed, the peak threshold increases by 0.05 g), and generate a dynamic threshold model;

[0104] Sliding window analysis was performed on the online vibration signal (window length 2048 sampling points, sliding step size 1024 sampling points). The weighted sum of multiple feature vectors in each window (peak weight 0.4, variance 0.2, kurtosis 0.3, impulse exponent 0.1) was calculated as a comprehensive evaluation value. When the comprehensive evaluation value exceeded the threshold corresponding to the current rotational speed output by the dynamic threshold model, the signal of that window and one window before and after it was extracted to form a potential fault event segment with a total length of 6144 sampling points.

[0105] Dynamic standardization:

[0106] The z-score method is used to standardize potential fault event segments (the mean μ and standard deviation σ of the event segment are calculated, and the standardization formula is (x-μ) / σ).

[0107] Calculate the temperature compensation coefficient: If the healthy temperature benchmark is 35℃, then the compensation coefficient = 1 + 0.01 × (real-time temperature - 35);

[0108] The amplitude of the standardized signal is linearly corrected using a compensation coefficient, resulting in a standardized signal segment of length L=2048 (2048 sampling points in the middle of the corrected signal are extracted).

[0109] Phase encoding reconstruction:

[0110] The reconstruction dimension M is determined based on the standardized signal segment length L: If L=2048, take M=45 (45²=2025, close to 2048), and add 17 zeros to the end of the signal to adjust the signal length to 2025.

[0111] The adjusted signal is divided into 45 groups in chronological order, with 45 sampling points in each group, to construct a 45×45 initial matrix;

[0112] The analytic phase of the signal is obtained by Hilbert transform (MATLAB hilbert function), the phase difference between adjacent sampling points (Δφ=φ(i+1)-φ(i)) is calculated, and it is converted into the spatial gradient of matrix elements (lateral gradient Δφ_x, vertical gradient Δφ_y).

[0113] Initial grayscale value of matrix elements = 0.6 × sampling point amplitude + 0.4 × Generate a 45×45 phase encoding matrix;

[0114] Grayscale enhancement:

[0115] The numerical range of the phase encoding matrix (e.g., -5 to 5) is linearly mapped to the grayscale range of 0-255 to obtain the initial grayscale image;

[0116] A contrast-limited adaptive histogram equalization process was used, with the contrast clipping limit set to 2.0, to obtain a preliminary texture map;

[0117] Texture consistency check:

[0118] Calculate the texture entropy in the row and column directions of the preliminary texture map (Shannon entropy formula: H=-Σp(i)log2p(i), where p(i) is the probability of gray level i);

[0119] If the texture entropy in any direction is lower than 80% of the texture entropy of a healthy sample (approximately 3.5), then M is adjusted to 44 or 46, and phase encoding reconstruction and grayscale enhancement are re-executed until the texture entropy is ≥2.8, thus obtaining a phase-sensitive texture map.

[0120] Dual-path convolutional neural network:

[0121] Global feature extraction path: 7×7 convolutional layer (64 convolutional kernels, stride 2, padding 3, output 112×112×64 feature map when inputting 224×224 texture map) - batch normalization layer (momentum 0.9, epsilon=1e-5) - ReLU activation function layer - 3×3 max pooling layer (stride 2, output 56×56×64 feature map);

[0122] Local fine feature extraction path: 3 densely connected modules are connected in series. Each module contains 2 3×3 convolutional layers (each with 64 convolutional kernels, padded with 1, and the output feature map size is the same as the input), a batch normalization layer-ReLU activation function layer. The output of each convolutional layer is concatenated with the input of all subsequent convolutional layers (e.g., the output of the first convolutional layer has 64 channels, which are concatenated with the input channels and used as the input of the second convolutional layer).

[0123] Channel attention mechanism:

[0124] The 56×56×64 feature map output by the global path and the 56×56×128 feature map output by the local path are concatenated along the channel dimension to obtain a 56×56×192 feature map.

[0125] The stitched feature map is transformed into a 192-dimensional channel feature vector by global average pooling (calculating the mean for each channel);

[0126] The channel feature vector is passed through the first fully connected layer (64 neurons, ReLU activation) and the second fully connected layer (32 neurons, Sigmoid activation) to obtain a 32-dimensional weight vector, which is then broadcast-matched to obtain a 192-dimensional weight (repeated 6 times).

[0127] The weights are multiplied channel by channel of the spliced ​​feature map to achieve weighted fusion.

[0128] Multi-physical information constraints specifically include:

[0129] Real-time frequency domain feature constraints:

[0130] Based on the real-time rotational speed (e.g., 2000 r / min) and bearing model (e.g., 6205 deep groove ball bearing, inner diameter 25 mm), the theoretical fault frequency (e.g., inner ring fault frequency is approximately 150 Hz) is dynamically updated according to the formula (fault characteristic frequency = rotational speed × bearing parameter / 60).

[0131] Perform 3-level wavelet packet decomposition (wavelet basis db4) on the standardized signal segment to extract the energy value of the frequency band containing 150Hz (e.g., 125-175Hz);

[0132] The energy value weight is corrected by combining the real-time temperature deviation (e.g., real-time temperature 40℃, deviation 5℃) (weight = 1 + 0.02 × deviation) to obtain the dynamic physical feature vector;

[0133] Real-time multi-physics fusion constraints:

[0134] The dynamic physical feature vector (8-dimensional) is concatenated with the feature vector transformed by the network's global average pooling (192-dimensional), the real-time rotation speed (1-dimensional), and the temperature (1-dimensional) to obtain a 202-dimensional vector. This vector is then input into a fully connected layer (128 neurons), and L2 regularization (regularization coefficient 0.001) is used to constrain the cosine similarity between the concatenated vector and the dynamic physical feature vector to be ≥0.8.

[0135] Real-time intermediate layer constraints:

[0136] At the output of the second densely connected module of the local path (feature map size 56×56×128), the time-domain dynamic features (peak value, variance and other 4-dimensional features) of the real-time vibration signal are input.

[0137] Add a mean squared error loss function to maximize the correlation coefficient between the vector of the module's output feature map after global average pooling and the dynamic feature vector in the time domain (target correlation coefficient ≥ 0.9).

[0138] End-to-end fault diagnosis and feature output:

[0139] Real-time access to multi-source spindle data (vibration signal, rotation speed, and temperature are collected every 2 seconds), and the vibration signal is processed into a 45×45 phase-sensitive texture map according to step 1 of Example 1 (sliding window 2048 sampling points, z-score normalization + temperature compensation) and step 2 (M=45 phase encoding, contrast clipping limit 2.0 enhancement).

[0140] The texture map is synchronously input into the fine-tuned dual-path convolutional neural network along with real-time rotation speed (e.g., 2200 r / min) and temperature (e.g., 38℃);

[0141] The network calculates the current theoretical fault characteristic frequency (e.g., the outer ring fault frequency is about 120Hz) by real-time rotation speed, and corrects the fault severity index by temperature (e.g., the index is 5 when there is no temperature deviation, and is corrected to 5.3 when the temperature is 3℃ higher).

[0142] Final output content: Fault type (moderate wear on bearing outer ring), corrected fault severity index (5.3), real-time theoretical fault characteristic frequency value (120Hz), corresponding frequency band (100-140Hz) energy value (0.8g²), time domain pulse amplitude (0.6g) and occurrence time interval (3-5 seconds), real-time temperature (38℃), and the influence coefficient of rotational speed on fault characteristics (0.03 / 100r / min).

[0143] The specific process of multi-domain feature visualization:

[0144] Two heatmaps were generated using Grad-weighted class activation mapping (Grad-CAM): one for fault type decision (focusing on the outer fault texture region, with red indicating high-interest areas), and the other for fault severity assessment (focusing on wear-related textures, with orange indicating moderate-interest areas).

[0145] The two heatmaps are overlaid on the original 45×45 phase-sensitive texture map, and the real-time rotation speed (2200 r / min), temperature (38℃) and theoretical fault frequency (120 Hz) are labeled. The key texture areas of interest to the model are marked with boxes (such as rows 10-20 and columns 5-15).

[0146] By extrapolating the key texture regions back to the time interval of the normalized signal segment (3-5 seconds), the original vibration signal (X-axis), real-time rotation speed, and temperature data of this interval are extracted, and a multi-domain correlation diagram is plotted.

[0147] Time-domain waveform: The horizontal axis represents time (3-5 seconds, with an interval of 0.00005 seconds), and the vertical axis represents vibration amplitude (-1 to 1g).

[0148] Wavelet packet frequency domain energy plot: the horizontal axis is frequency (0-10kHz), the vertical axis is energy (0-1g²), and the 120Hz frequency band is marked;

[0149] Real-time operating parameters graph: The horizontal axis represents time (3-5 seconds), and the vertical axis represents speed (2180-2220 r / min) and temperature (37.8-38.2℃).

[0150] Based on the multi-domain correlation diagram, the fault characteristic deviation is calculated (e.g., peak value of 0.6g, exceeding the health threshold of 0.3g by 100%), and a diagnostic report is generated: including a real-time operating condition fault characteristic threshold comparison table (health value / measured value / deviation rate of 6 indicators such as peak value and kurtosis), fault development trend prediction (based on the deviation growth rate in the past hour, the severity index will reach 7 after 12 hours), and physical interpretability basis (the energy increase in the 120Hz frequency band matches the vibration mechanism of the outer ring fault).

[0151] An electronic device, comprising:

[0152] Storage: 16GB DDR4 memory, 1TB SSD solid-state drive (for storing multi-source data, pre-trained models, and diagnostic reports).

[0153] Processor: Intel Core i7-12700H (2.3GHz, supports multi-threaded processing of real-time data); Interfaces: USB 3.0 interface (for connecting sensor data acquisition modules), Ethernet interface (for transmitting diagnostic results to the machine tool control system);

[0154] Operating environment: Windows 10 system, Python 3.8 (with PyTorch 1.12 deep learning framework);

[0155] Functionality: When the processor executes the computer program in the memory, it performs accurate extraction and diagnosis of CNC machine tool spindle fault features according to the steps in Examples 1-7.

[0156] A computer-readable storage medium, specifically:

[0157] Media type: 256GB SSD with USB 3.0 interface (FAT32 format), or network cloud storage (such as Alibaba Cloud OSS, storage capacity 500GB).

[0158] Storage contents: computer programs (including code for data acquisition module, signal processing module, dual-path network training module, diagnosis and visualization module), pre-trained model weight files (.pth format), and a health sample database;

[0159] Execution effect: When the computer program is executed by the processor (such as Intel Core i5-1135G7), it implements a method for accurately extracting fault features, and supports real-time diagnosis and feature output every 5 seconds.

[0160] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for accurately extracting fault features of CNC machine tool spindles based on deep learning, characterized in that, Includes the following steps: Step 1: Collect multi-source data from the CNC machine tool spindle, and perform adaptive segmentation and dynamic standardization processing on the vibration signals in the multi-source data to obtain standardized signal segments; Step 2: The standardized signal segments are reconstructed into a two-dimensional matrix through phase encoding. After grayscale enhancement and texture consistency verification, a phase-sensitive texture map is generated. Step 3: Construct a dual-path convolutional neural network, which includes a global feature extraction path and a local fine feature extraction path. The dual-path features are fused using a channel attention mechanism to achieve synchronous output of fault type and fault severity. Step 4: Initialize the parameters of the dual-path convolutional neural network based on multi-task self-supervised pre-training, and dynamically adjust the pre-training task parameters and multi-physical information constraints in combination with real-time multi-source data to optimize the network's ability to learn fault characteristics under real-time operating conditions. Step 5: Fine-tune the dual-path convolutional neural network using labeled fault samples with real-time operating condition labels. Perform end-to-end fault diagnosis based on the fine-tuned dual-path convolutional neural network. Combine real-time multi-source data to dynamically correct the diagnosis results and fault feature output content. Visualize the specific fault features under real-time operating conditions through multi-domain features.

2. The method for accurate extraction of fault features of CNC machine tool spindle based on deep learning according to claim 1, characterized in that, The multi-source data in step 1 includes spindle vibration signal, real-time spindle speed data, and spindle bearing temperature data; The adaptive segmentation based on multi-feature fusion is as follows: Based on the health status data of the spindle under no-load and rated load, the peak value, variance, kurtosis and impulse exponent of the vibration signal are calculated to construct a multi-feature vector. The hierarchical clustering algorithm is used to determine the health threshold range of each feature. Then, according to the health vibration law under different speeds, the mapping relationship between speed and feature threshold is established to generate a dynamic threshold model. A sliding window analysis is performed on the online vibration signal. The weighted sum of multiple feature vectors within each window is calculated as a comprehensive evaluation value. When the comprehensive evaluation value exceeds the threshold corresponding to the current rotational speed output by the dynamic threshold model, the signal of the corresponding window and one window before and after it is extracted to form a potential fault event segment. The dynamic standardization is as follows: the amplitude of the potential fault event segment is normalized using the z-score method. The temperature compensation coefficient is calculated based on the deviation between the real-time bearing temperature and the healthy temperature reference. The normalized signal amplitude is linearly corrected using the temperature compensation coefficient to obtain a standardized signal segment of length L.

3. The method for accurate extraction of fault features of CNC machine tool spindle based on deep learning according to claim 2, characterized in that, Step 2, phase encoding and reconstruction, specifically involves determining the reconstruction dimension M based on the standardized signal segment length L, where M is... The integer approximation of L; if L is not a perfect square, then zero padding is used to adjust the signal length to M². The standardized signal segments are divided into M groups in chronological order, each group containing M sampling points to construct an initial M×M matrix; the analytic phase of the signal is obtained through Hilbert transform, the phase difference between adjacent sampling points is calculated and converted into the spatial gradient of matrix elements, and the initial gray value of each element in the matrix is ​​obtained by weighting the amplitude of the corresponding sampling point with the phase difference of adjacent elements to generate a phase coding matrix; The grayscale enhancement process involves linearly mapping the numerical range of the phase encoding matrix to a grayscale range of 0 to 255 to obtain an initial grayscale image. The initial grayscale image is then processed using contrast-limited adaptive histogram equalization, with the contrast clipping limit set to 2.0, to obtain a preliminary texture image. The texture consistency verification process is as follows: calculate the texture entropy in the row and column directions of the preliminary texture map. If the texture entropy in either direction is lower than 80% of the texture entropy of the healthy sample, adjust the reconstruction dimension M to the original dimension plus or minus 1, and then re-execute the phase encoding reconstruction and grayscale enhancement until the texture entropy meets the requirements, and finally obtain the phase-sensitive texture map.

4. The method for accurate extraction of fault features of CNC machine tool spindle based on deep learning according to claim 3, characterized in that, The dual-path convolutional neural network in step 3 is as follows: the global feature extraction path sequentially includes a 7×7 convolutional layer, a batch normalization layer, a ReLU activation function layer and a 3×3 max pooling layer. The 7×7 convolutional layer has 64 kernels, a stride of 2 and padding of 3, and the 3×3 max pooling layer has a stride of 2. The local fine feature extraction path is composed of three densely connected modules connected in series. Each densely connected module contains two 3×3 convolutional layers, a batch normalization layer and a ReLU activation function layer. The output of each convolutional layer is concatenated with the input of all subsequent convolutional layers. The channel attention mechanism is as follows: after concatenating the feature maps of the dual-path outputs along the channel dimension, the concatenated feature maps are transformed into channel feature vectors through global average pooling. The channel feature vectors are processed by the first fully connected layer, the ReLU activation function, the second fully connected layer, and the Sigmoid activation function to obtain channel weights. The channel weights are multiplied with the concatenated feature maps channel by channel to achieve weighted fusion.

5. The method for accurate extraction of fault features of CNC machine tool spindle based on deep learning according to claim 4, characterized in that, The multi-physical information constraints in step 4 specifically include the following three parts: The first part is the real-time frequency domain feature constraint. Based on the real-time rotation speed and bearing model, the theoretical fault characteristic frequency is dynamically updated. Wavelet packet decomposition is performed on the standardized signal segment to extract the energy value of the frequency band where the updated theoretical fault frequency is located. The energy value weight is corrected by combining the real-time temperature deviation to obtain the dynamic physical feature vector. The second part is the real-time multi-physical quantity fusion constraint, which concatenates the dynamic physical feature vector with the feature vector after global average pooling of the network, the real-time rotation speed, and the numerical feature vector of temperature conversion, and inputs it into the fully connected layer. The cosine similarity between the concatenated feature vector and the dynamic physical feature vector is not less than 0.8 after L2 regularization constraint. The third part is the real-time intermediate layer constraint. At the output of the second densely connected module of the local fine feature extraction path, the time-domain dynamic features of the real-time vibration signal are input, and feature constraint loss is added to maximize the correlation coefficient between the feature map output by the second densely connected module and the real-time time-domain dynamic features.

6. The method for accurate extraction of fault features of CNC machine tool spindle based on deep learning according to claim 5, characterized in that, In step 5, the end-to-end fault diagnosis and feature output are specifically as follows: real-time access to multi-source data of the main shaft, processing the real-time vibration signal into a phase-sensitive texture map through steps 1 and 2, and synchronously inputting it into the finely tuned dual-path convolutional neural network along with real-time speed and temperature data; The dual-path convolutional neural network calculates the theoretical fault characteristic frequency under the current operating condition by real-time rotation speed and corrects the fault severity index by real-time temperature. The final output includes: fault type, corrected fault severity index, real-time theoretical fault characteristic frequency value, corresponding frequency band energy value, time domain pulse amplitude and occurrence time interval, real-time temperature, and the influence coefficient of rotation speed on fault characteristics.

7. The method for accurate extraction of fault features of CNC machine tool spindle based on deep learning according to claim 6, characterized in that, The specific process of multi-domain feature visualization in step 5 is as follows: Two heatmaps are generated using the gradient weighted activation mapping method, corresponding to fault type decision and fault severity assessment, respectively. The two heatmaps are superimposed on the original phase-sensitive texture map, and the real-time rotation speed, temperature value and corresponding theoretical fault frequency are labeled to identify the key texture regions of interest to the model. The key texture regions are back-traced to the time interval corresponding to the standardized signal segment. The original vibration signal and real-time multi-source data of the time interval are extracted, and a multi-domain correlation diagram is drawn, including time-domain waveform diagram, wavelet packet frequency-domain energy diagram, and real-time operating condition parameter diagram. The system automatically calculates fault characteristic deviations based on the multi-domain association graph to generate a diagnostic report. The report includes a comparison table of fault characteristic thresholds under real-time operating conditions, a prediction of fault development trends, and physical interpretability.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for accurately extracting fault features of CNC machine tool spindles based on deep learning as described in claim 7.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for accurately extracting fault features of CNC machine tool spindles based on deep learning as described in claim 7.