Cutter wear state recognition method and device based on multi-scale feature fusion and storage medium

The tool wear state recognition method based on multi-scale feature fusion and spatial attention mechanism solves the problem of insufficient feature interaction fusion in the existing technology, and achieves higher accuracy and classification performance in tool wear state recognition, thus ensuring machining quality.

CN120995382APending Publication Date: 2025-11-21SHENYANG AIRCRAFT CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511071495.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing methods for identifying tool wear conditions neglect the interaction and fusion process of shallow, medium and deep features, and lack reliable constraints on the features of tool wear conditions of different degrees, resulting in unsatisfactory model classification performance. Furthermore, direct measurement methods are easily affected by the environment, while indirect measurement methods are not suitable for use in real-world environments.

Method used

A tool wear state recognition method using multi-scale feature fusion is proposed. Combining spatial attention mechanism and metric learning, feature information is extracted through shallow, medium and deep feature fusion. A residual network is introduced to enhance the feature representation capability of the model, and a triplet loss function is introduced into the embedding space to enhance the sample discrimination capability.

Benefits of technology

It improves the accuracy and classification performance of tool wear condition identification, enabling timely detection of tool wear, avoiding machining errors, and improving machining accuracy and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995382A_ABST
    Figure CN120995382A_ABST
Patent Text Reader

Abstract

The invention provides a tool wear state recognition method and device based on multi-scale feature fusion and a storage medium, and the method comprises the steps: firstly obtaining the historical cutting data of a tool, extracting the time domain, frequency domain and time-frequency domain features, and setting a state label, and then constructing a tool wear state recognition model based on multi-scale feature fusion, richer feature information is extracted through shallow, medium and deep three-level feature fusion, meanwhile, a space attention mechanism is combined to enable the model to pay attention to an important area, a prediction state label is output, then a loss function including triple loss is constructed, the model learns features with higher discrimination performance, the identification capacity of the model for different tool wear states is improved, and the tool wear state prediction efficiency is improved. Cutter abrasion can be found in time, machining errors are avoided, machining precision and quality are improved, and aviation digital machining development is promoted.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of aviation manufacturing digitized processing, and particularly relates to a tool wear state recognition method, device and storage medium based on multi-scale feature fusion. BACKGROUND

[0002] The automatic processing of aviation parts is constantly pursuing high quality, high efficiency and safe limit manufacturing capability, and the tool performance is an important factor to guarantee the processing efficiency and quality. The tool replacement based on subjective experience of workers will inevitably lead to misjudgment. Early tool replacement will reduce the utilization rate of the tool and increase the processing cost. On the contrary, it will reduce the workpiece surface processing quality and lead to unqualified products. With the continuous application of difficult-to-machine materials such as high-temperature alloy, titanium alloy and composite materials in future models, it is urgent to conduct in-depth research on the recognition of tool wear state.

[0003] The existing tool wear state recognition methods can be divided into direct measurement method and indirect measurement method. The direct measurement method can be divided into optical-based, vision-based and radiation-based methods. The first two methods are easily affected by the processing environment, resulting in inaccurate measurement results, such as light intensity, flying chips in the processing process, etc. Radiation is harmful to the human body and is not suitable for use in actual environment. The indirect measurement method is to monitor the signals obtained by different machine tool sensors in the tool processing state, such as vibration signals, current signals and acoustic emission signals, to evaluate the tool state. Under different tool wear states, these signals will also be different. This kind of method gradually occupies a dominant position because it can be monitored in real time and does not affect the processing process.

[0004] In recent years, with the continuous development of artificial intelligence technology, tool wear models based on deep learning have attracted more and more attention. This kind of method usually uses convolutional neural network or long short-term memory network to directly extract deep features from different signals to evaluate the tool wear state. However, this kind of method ignores the interactive fusion process of shallow features, middle features and deep features in the model, and lacks reliable constraints on the features of different degrees of tool wear state, resulting in unsatisfactory model classification effect. SUMMARY

[0005] In order to solve the problems existing in the prior art, the application provides a tool wear state recognition method, device and storage medium based on multi-scale feature fusion, which extracts more rich feature information through shallow, middle and deep three-level feature fusion, combines with a spatial attention mechanism to make the model focus on important areas, and finally introduces metric learning to make the model learn more discriminative features, improve the recognition ability of the model to different tool wear states, discover tool wear in time, avoid processing errors, improve processing precision and quality, and promote the development of aviation digitized processing.

[0006] To achieve the above object of the application, the application adopts the following technical solutions:

[0007] The first aspect of the application provides a tool wear state recognition method based on multi-scale feature fusion, comprising the following steps:

[0008] Step 1: Construct a training sample set.

[0009] Step 1.1, obtain the historical signal data during cutting of a batch of tools of the same specification, including cutting force signal X Force , vibration signal X Vib and acoustic emission signal X AE , window all signals to obtain three types of signals of M samples, and parallelly splice each signal of each sample to obtain a total feature signal.

[0010] Step 1.2, pre-process and extract features from the total feature signal, the extracted features including time domain features, frequency domain features and time-frequency domain features.

[0011] Step 1.3, divide the tool wear state in different periods according to the tool wear amount, set state labels for each wear state, and obtain a training sample set x i represents the i-th sample, y i represents the state label of the i-th sample.

[0012] Step 2: Model construction.

[0013] Step 2.1, construct a tool wear state recognition model based on multi-scale feature fusion, including an ascending dimension module, a multi-scale feature extraction module and a descending dimension module.

[0014] The ascending dimension module sequentially comprises a batch normalization layer, a convolution layer with a kernel size of 1, a batch normalization layer and a ReLU activation layer, for realizing feature enhancement.

[0015] The multi-scale feature extraction module comprises two residual modules, three branches and a feature fusion module. The three branches are each composed of a convolution module and a spatial attention module, wherein the convolution module of the three branches each comprises, in sequence, a batch normalization layer, a convolution layer with a kernel size of 1, a batch normalization layer, a convolution layer with a kernel size of 3, a batch normalization layer, a convolution layer with a kernel size of 1, a batch normalization layer, a ReLU activation layer, and the spatial attention module of the three branches each comprises a maximum pooling layer, an average pooling layer, a convolution layer and a Sigmoid activation layer, wherein the convolution kernel sizes of the convolution layers in the three spatial attention modules are different to extract features of different scales. Specifically, the first branch is used to extract shallow layer features, the second branch is used to extract middle layer features, and the third branch is used to extract deep layer features. The convolution kernel of the spatial attention module in the first branch is the largest because the shallow layer features are distributed more dispersedly and need to cover a wider area using a large-scale convolution kernel. The convolution kernel of the spatial attention module in the third branch is the smallest because the deep layer features contain more information and need to be more accurately gathered in a local area. The residual modules are used to avoid gradient disappearance and model training degradation. The input and output of the first branch are added after passing through the first residual module to serve as the input of the second branch. The input and output of the second branch are added after passing through the second residual module to serve as the input of the third branch. The feature fusion module comprises a convolution layer with a kernel size of 1, a batch normalization layer, a ReLU activation layer and a Dropout layer, which are used to fuse the different scale features output by the three branches.

[0016] The dimension reduction module comprises an unfolding layer and three fully connected layers, which are used to unfold and reduce the dimension of the fused features. The second fully connected layer outputs the final features, and the third fully connected layer maps the final features to an embedding space to realize state classification and outputs a predicted state label, thereby realizing state prediction of the tool.

[0017] Step 2.2, input the training sample set into the tool wear state recognition model in batches, the total number of samples in each batch is M', and the dimension increasing module processes the training sample set of any one batch to obtain the output features

[0018] Step 2.3, input the features output by the dimension increasing module into the first branch of the multi-scale feature extraction module, and obtain output hidden layer features after processing by the convolution module

[0019]

[0020] In the formula,​​​ and These are the operations for the max pooling layer and the average pooling layer, respectively. This represents a convolutional layer with a kernel size of k, where σ represents a sigmoid activation layer. ⊙ represents the weight assigned to the feature, and ⊙ represents the Hadamard product.

[0021] Step 2.4: Input the first branch Output of the first branch After being summed by the first residual module, the result is used as the input to the second branch. Following the same processing procedure as in step 2.3, the output characteristics of the second branch are obtained.

[0022] Step 2.5: Connect the input of the second branch with the output of the second branch. After being summed by the second residual module, the result is used as the input to the third branch. Following the same processing procedure as in step 2.3, the output characteristics of the third branch are obtained.

[0023] Step 2.6: Output the features at different scales from the three branches. Parallel concatenation is performed to obtain multi-scale features f′2(x) i′ )=[f′ 21 (x i′ );f′ 22 (x i′ );f′ 23 (x i′ The input feature fusion module obtains the fused features.

[0024] Step 2.7: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require The input dimensionality reduction module processes the data through an unfolding layer and three fully connected layers. The second fully connected layer outputs the features. The third fully connected layer will Output the prediction vector of tool wear condition category Where, p i′ x represents i′ The predicted probability of the corresponding wear state category; and from p i′ Choose the state category with the highest probability as x i′ Predicted labels

[0025] Step 3: Construct the loss function.

[0026] First, the triplet loss is constructed using equations (2) and (3).

[0027]

[0028] s.t.y i′ =y j ≠y k (3)

[0029] In the formula, ‖·‖ F represents the Frobenius norm, [·] + = max(·, 0), and α represents the marginal distance between positive pairs and negative pairs in the embedding space, wherein the positive pair represents a sample of the same category as x i′ in the same batch, and the negative pair represents a sample of a different category as x i′ in the same batch, x j represents the jth sample of the same category as x i′ in the same batch, x k represents the kth sample of a different category as x i′ in the same batch, y j represents the true label of the jth sample, y k represents the true label of the kth sample.

[0030] Secondly, the classification loss is constructed using formula (4)

[0031]

[0032] Finally, the total loss is constructed using formula (5)

[0033]

[0034] Step 4: model training.

[0035] Based on the training sample set The tool wear state recognition model is trained in batches using an Adam optimizer, and the total loss is calculated Then the model parameters are updated using the back propagation algorithm until the total loss converges, and the trained tool wear state recognition model is obtained.

[0036] Step 5, identify the tool state.

[0037] The trained tool wear state recognition model is used to identify the tool cutting signal at any time, and the tool state is determined according to the output prediction state label.

[0038] The second aspect of the present application provides an electronic device comprising a memory for storing the program of the tool wear state recognition method of the first aspect and a processor for calling and executing the program stored in the memory.

[0039] The third aspect of the present application provides a computer readable storage medium, and computer instructions are stored on the computer readable storage medium, and the computer instructions are used to make a computer execute the tool wear state recognition method in the first aspect.

[0040] Compared with the prior art, the beneficial effects of the present application are embodied in:

[0041] 1. The present application introduces a tool wear state recognition model, adopts multi-scale feature fusion and metric learning method to mine more discriminative features, better utilizes the interaction information between multi-scale levels, and effectively improves the accuracy of tool wear state recognition.

[0042] 2. The present application introduces a spatial attention module, adopts spatial convolution kernels of different sizes to extract hierarchical features of different scales, gives different weights to different positions, encourages the model to focus on the information of key positions, combines the residual network to enhance the feature fusion representation ability of the model, and improves the classification performance of the tool wear state recognition model.

[0043] 3. The present application introduces a triplet loss in the embedding space, which can enhance the mutual aggregation of samples of the same class and the mutual repulsion of samples of different classes, enhance the distinguishing ability of the model to different degrees of tool wear state features, and achieve better classification performance. BRIEF DESCRIPTION OF DRAWINGS

[0044] Figure 1 The structure diagram of the tool wear state recognition model of the present application is shown in the figure;

[0045] Figure 2 The structure diagram of the spatial attention module of the present application is shown in the figure. DETAILED DESCRIPTION

[0046] Embodiment 1

[0047] In this embodiment, 6mm ball nose carbide milling cutter is taken as an example to further illustrate the method of the present application, which includes the following steps:

[0048] Step 1: Constructing a training sample set.

[0049] Step 1.1, obtaining the running condition of 6mm ball nose carbide milling cutter of high-speed numerical control machine tool under dry milling condition from public data set PHM2010, the workpiece material is stainless steel (HRC52), including cutting force signal X Force , vibration signal X Vib and acoustic emission signal X AE , wherein the three-dimensional cutting force signal X Force is measured by Kistler three-component dynamometer placed on the workbench, and the three-dimensional vibration signal X VibHarmonic emission signal X AE The signal is measured by three Kistler piezoelectric accelerometers and one Kistler acoustic emission sensor installed on the side wall of the workpiece, amplified by a signal amplifier, and collected in time domain by DAQ NIPCI1200 with a sampling frequency of 50KHz, and finally spliced into a 7-dimensional signal X All ={X Force ;X Vib ;X AE}. The data of three tools of the same specification for tool wear test are collected, and are respectively recorded as C1, C4 and C6. 315 machining processes are collected for each tool, and the wear value after each pass is measured by using IECIA MZ12 microscope. Each pass is windowed into 100 parts in order and spliced in parallel, so that 31500 original signal samples are obtained for each tool, and the total characteristic signal is obtained.

[0050] Step 1.2, time domain features, frequency domain features and time-frequency domain features are extracted for each sample respectively, the time domain features include 12 features of mean value, peak value, root mean square value, square root amplitude value, skewness value, kurtosis value, waveform factor, pulse factor, skewness factor, peak factor, margin factor and kurtosis factor, the frequency domain features include 4 features of barycenter frequency, mean square frequency, root mean square frequency and frequency variance, and 8 features of energy values of 8 frequency bands after 3-layer decomposition of the signal with db3 as the wavelet base function, so that the size of each sample is 7*24.

[0051] Step 1.3, the full life cycle wear curves of the three tools are compared, and the wear trends of the three tools are roughly the same. According to the k-means mean clustering analysis, the tool wear state can be divided into 5 wear states and state labels are set, which are sharp (1-30th pass), normal wear (31-131th pass), slight crack (131-200th pass), severe wear (201-260th pass) and damage (261-315th pass), and the features and state labels of the samples are corresponded to obtain the training sample set

[0052] Step 2: model construction.

[0053] Step 2.1, a tool wear state recognition model of multi-scale feature fusion is constructed, as shown in Figure 1 , which includes an ascending dimension module, a multi-scale feature extraction module and a descending dimension module.

[0054] The ascending dimension module sequentially includes a batch normalization layer, a convolution layer with a kernel size of 1, a batch normalization layer and a ReLU activation layer, and is used for realizing feature enhancement.

[0055] The multi-scale feature extraction module comprises two residual modules, three branches and a feature fusion module. The three branches are each composed of a convolution module and a spatial attention module, wherein the convolution module of the three branches each comprises, in sequence, a batch normalization layer, a convolution layer with a kernel size of 1, a batch normalization layer, a convolution layer with a kernel size of 3, a batch normalization layer, a convolution layer with a kernel size of 1, a batch normalization layer, a ReLU activation layer, and the spatial attention module of the three branches each comprises a maximum pooling layer, an average pooling layer, a convolution layer and a Sigmoid activation layer, as shown in Figure 2 wherein the convolution kernel sizes of the convolution layers in the three spatial attention modules are different to extract features of different scales. Specifically, the first branch is used to extract shallow layer features, the second branch is used to extract middle layer features, and the third branch is used to extract deep layer features. In this embodiment, the convolution kernel sizes of the convolution layers in the spatial attention modules of the three branches are 7x7, 5x5 and 3x3 respectively. The shallow layer features use a large-scale convolution kernel, and the deep layer features use a small-scale convolution kernel. Because the shallow layer features are distributed relatively dispersedly, a large-scale convolution kernel is needed to cover a more extensive area, while the deep layer features contain more information and need to be more accurately gathered in a local area. The residual module is used to avoid gradient disappearance and model training degradation. The input and output of the first branch are added after passing through the first residual module to serve as the input of the second branch. The input and output of the second branch are added after passing through the second residual module to serve as the input of the third branch. The feature fusion module comprises a convolution layer with a kernel size of 1, a batch normalization layer, a ReLU activation layer and a Dropout layer, which are used to fuse the different scale features output by the three branches.

[0056] The dimension reduction module comprises an unfolding layer and three fully connected layers, which are used to unfold and reduce the dimension of the fused features. The second fully connected layer outputs the final features, and the third fully connected layer maps the final features to an embedding space to realize state classification and outputs a predicted state label, thereby realizing the state prediction of the tool.

[0057] Step 2.2, input the training sample set into the tool wear state recognition model in batches, the total number of samples in each batch is M', and the dimension increasing module processes the training sample set of any one batch to obtain output features

[0058] Step 2.3, input the features output by the dimension increasing module into the first branch of the multi-scale feature extraction module, and obtain output hidden layer features after processing by the convolution module. Input the into the first spatial attention module to obtain the output features of the first branch by formula (1)

[0059]

[0060] In the formula, and These are the operations for the max pooling layer and the average pooling layer, respectively. This represents a convolutional layer with a kernel size of k, where σ represents a sigmoid activation layer. ⊙ represents the weight assigned to the feature, and ⊙ represents the Hadamard product.

[0061] Step 2.4: Input the first branch Output of the first branch After being summed by the first residual module, the result is used as the input to the second branch. Following the same processing procedure as in step 2.3, the output characteristics of the second branch are obtained.

[0062] Step 2.5: Connect the input of the second branch with the output of the second branch. After being summed by the second residual module, the result is used as the input to the third branch. Following the same processing procedure as in step 2.3, the output characteristics of the third branch are obtained.

[0063] Step 2.6: Output the features at different scales from the three branches. Parallel splicing is performed to obtain multi-scale features. The input feature fusion module obtains the fused features.

[0064] Step 2.7: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] The input dimensionality reduction module processes the data through an expansion layer and three fully connected layers. The second fully connected layer outputs the features. The third fully connected layer will Output the prediction vector of tool wear condition category Where, p i′ x represents i′ The predicted probability of the corresponding wear state category; and from p i′ Choose the state category with the highest probability as x i′ Predicted labels

[0065] Step 3: Construct the loss function.

[0066] First, the triplet loss is constructed using equations (2) and (3).

[0067]

[0068] sty i′ =y j ≠y k(3)

[0069] in formula (2), ‖·‖ F represents the Frobenius norm, [·] + = max(·, 0), and α represents the marginal distance between positive pairs and negative pairs in the embedding space, where a positive pair represents a sample of the same class as x i′ in the same batch as x i′ a negative pair represents a sample of a different class as x j in the same batch as x i′ in the same batch as x k in the same batch as x i′ in the same batch as x j represents the true label of the jth sample, y k represents the true label of the kth sample.

[0070] Secondly, the classification loss is constructed using formula (4)

[0071]

[0072] Finally, the total loss is constructed using formula (5)

[0073]

[0074] Step 4: Model training.

[0075] Based on the training sample set The tool wear state recognition model is trained in batches using the Adam optimizer, and the total loss is calculated Then the model parameters are updated using the backpropagation algorithm until the total loss converges, obtaining the trained tool wear state recognition model.

[0076] Step 5, identify the tool state.

[0077] The trained tool wear state recognition model is used to identify the tool cutting signal at any time, and the tool state is determined according to the output prediction label.

[0078] Effect verification:

[0079] Based on the same training sample set as this embodiment, the recognition effects of this embodiment and the commonly used linear discriminant analysis (LDA) and Le-net methods at the present stage are compared, wherein the ratio of the training set and the test set is set to 8:2. The recognition accuracy results of three tools by three methods are shown in Table 1:

[0080] Table 1. Classification performance of different methods

[0081]

[0082] From the results of Table 1, it can be seen that the method of the embodiment achieves the best classification performance compared with the other two commonly used methods.

[0083] Embodiment 2

[0084] The embodiment provides an electronic device, comprising a memory for storing a program of the tool wear state recognition method described in Embodiment 1, and a processor for calling and executing the program stored in the memory.

[0085] Embodiment 3

[0086] The embodiment provides a computer readable storage medium, and the computer readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the tool wear state recognition method described in Embodiment 1.

Claims

1. A method for identifying tool wear state based on multi-scale feature fusion, characterized in that, Includes the following steps: Step 1: Construct the training sample set; Step 2: Construct a multi-scale feature fusion model for tool wear state recognition; Step 3: Construct the loss function; Step 4: Model training; Step 5: Identify the tool status.

2. The tool wear state recognition method based on multi-scale feature fusion according to claim 1, characterized in that, Step 1 specifically involves: Step 1.1: Obtain historical signal data of a batch of cutting tools of the same specification, window and concatenate all signals to obtain the total characterization signal; Step 1.2: Preprocess and extract features from the total representation signal; Step 1.3: Divide the tool wear state into different periods according to the tool wear amount, set a state label for each wear state, and combine the sample with its state label to obtain the training sample set.

3. The tool wear state recognition method based on multi-scale feature fusion according to claim 2, characterized in that, The historical signal data includes cutting force signals, vibration signals, and acoustic emission signals.

4. The tool wear state recognition method based on multi-scale feature fusion according to claim 2, characterized in that, The extracted features include time-domain features, frequency-domain features, and time-frequency-domain features.

5. The tool wear state recognition method based on multi-scale feature fusion according to claim 1, characterized in that, Step 2 specifically involves: Step 2.1: Construct a multi-scale feature fusion tool wear state recognition model, including a dimensionality-upgrading module, a multi-scale feature extraction module, and a dimensionality-reduction module; The aforementioned dimensionality enhancement module sequentially comprises a batch normalization layer, a convolutional layer with a kernel size of 1, a batch normalization layer, and a ReLU activation layer, used to achieve feature enhancement; The multi-scale feature extraction module comprises two residual modules, three branches, and a feature fusion module. Each of the three branches consists of a convolutional module and a spatial attention module, used to extract features at different scales. The convolutional modules of the three branches sequentially include a batch normalization layer, a convolutional layer with a kernel size of 1, a batch normalization layer, a convolutional layer with a kernel size of 3, a batch normalization layer, a convolutional layer with a kernel size of 1, a batch normalization layer, and a ReLU activation layer. The spatial attention modules of the three branches each consist of a max pooling layer, an average pooling layer, a convolutional layer, and a sigmoid activation layer. The residual modules are used to avoid gradient vanishing and model training degradation. The input and output of the first branch are summed by the first residual module and used as the input of the second branch. The input and output of the second branch are summed by the second residual module and used as the input of the third branch. The feature fusion module includes a convolutional layer with a kernel size of 1, a batch normalization layer, a ReLU activation layer, and a Dropout layer, which are used to fuse features of different scales output from the three branches. The dimensionality reduction module contains one unfolding layer and three fully connected layers to unfold and reduce the dimensionality of the fused features. The second fully connected layer outputs the final features, and the third fully connected layer maps the final features to the embedding space to achieve state classification and outputs the predicted state label. Step 2.2: Input the training sample set into the tool wear state recognition model in batches, with the total number of samples in each batch being M′. The dimensionality enhancement module processes any batch of training sample set to obtain the output features. Where, x i′ This represents the i-th sample in a certain batch of training samples; Step 2.3: Input the features output by the dimensionality upscaling module into the first branch of the multi-scale feature extraction module, and obtain the output hidden layer features after processing by the convolution module. Will Input the first spatial attention module and obtain the output features of the first branch through equation (1). In the formula, and These are the operations for the max pooling layer and the average pooling layer, respectively. This represents a convolutional layer with a kernel size of k, where σ represents a sigmoid activation layer. This represents the weight assigned to the feature, and ⊙ represents the Hadamard product; Step 2.4: Input the first branch Output of the first branch After being summed by the first residual module, the result is used as the input to the second branch. Following the same processing procedure as in step 2.3, the output characteristics of the second branch are obtained. Step 2.5: Connect the input of the second branch with the output of the second branch. After being summed by the second residual module, the result is used as the input to the third branch. Following the same processing procedure as in step 2.3, the output characteristics of the third branch are obtained. Step 2.6: Output the features at different scales from the three branches. Parallel concatenation is performed to obtain multi-scale features f′2(x) i′ )=[f′ 21 (x i′ );f′ 22 (x i′ );f′ 23 (x i′ The input feature fusion module obtains the fused features. Step 2.7: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] The input dimensionality reduction module processes the data through an unfolding layer and three fully connected layers. The second fully connected layer outputs the features. The third fully connected layer will Output the prediction vector of tool wear condition category Where, p i′ x represents i′ The predicted probability of the corresponding wear state category; and from p i′ Choose the state category with the highest probability as x i′ Predicted labels 6. The tool wear state recognition method based on multi-scale feature fusion according to claim 5, characterized in that, The kernel sizes of the convolutional layers in the three spatial attention modules are different.

7. The tool wear state recognition method based on multi-scale feature fusion according to claim 6, characterized in that, The first branch is used to extract shallow features, the second branch is used to extract mid-level features, and the third branch is used to extract deep features. Among them, the convolutional kernel of the spatial attention module convolutional layer in the first branch is the largest, and the convolutional kernel of the spatial attention module convolutional layer in the third branch is the smallest.

8. The tool wear state recognition method based on multi-scale feature fusion according to claim 5, characterized in that, Step 3 specifically includes: First, the triplet loss is constructed using equations (2) and (3). sty i′ / and j ≠y k (3) In the formula, ‖·‖ F Representing the Frobenius norm, [·] + =max(·,0), where α represents the marginal distance between positive and negative pairs in the embedding space, where a positive pair represents a pair within the same batch that is adjacent to x. i′ For samples of the same category, a negative pair indicates that the sample is within the same batch as x. i′ Samples of different categories, x j Indicates that within the same batch, x i′ The j-th sample of the same category, x k Indicates that within the same batch, x i′ The k-th sample of different categories, y j Let y represent the true label of the j-th sample. k This represents the true label of the k-th sample; Secondly, the classification loss is constructed using equation (4). Finally, the total loss is constructed using equation (5).

9. The tool wear state recognition method based on multi-scale feature fusion according to claim 1, characterized in that, Step 4 specifically involves: training the tool wear state recognition model in batches based on the training sample set, calculating the total loss, and then using the backpropagation algorithm to update the model parameters until the total loss converges, thereby obtaining the trained tool wear state recognition model.

10. The tool wear state recognition method based on multi-scale feature fusion according to claim 1, characterized in that, Step 5 specifically involves: using the trained tool wear state recognition model to identify the tool cutting signal at any time, and determining the tool state based on the output predicted state label.