Variable-process milling roughness prediction method and system

The roughness prediction model constructed by DRSN and MRAN solves the problems of low roughness prediction accuracy and poor generalization in variable process milling processing, and achieves high-precision prediction under complex and variable process conditions.

CN120493705APending Publication Date: 2025-08-15TIANJIN UNIV OF COMMERCE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510553351.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The prior art has problems of low roughness prediction accuracy and poor generalization in variable process milling processing, especially when the process conditions are complex and variable and the data volume is small, it is difficult to meet engineering needs.

Method used

The roughness prediction model is constructed using deep residual shrinking network (DRSN) and multi-representation domain adaptation network (MRAN). Through transfer learning and feature reorganization, the difficulty of network learning is reduced, degradation is prevented, and the reorganization of high-dimensional training features is integrated to achieve data distribution alignment.

Benefits of technology

The accuracy and generalization ability of roughness prediction in variable process milling processing is improved, and the problems of insufficient prediction accuracy and data distribution differences under small sample data conditions are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493705A_ABST
    Figure CN120493705A_ABST
Patent Text Reader

Abstract

The invention provides a variable-process milling roughness prediction method, which comprises the following steps of: acquiring signals in variable-process milling, and constructing a data sample; inputting the data sample into a neural network model for iterative training, and constructing a roughness prediction model; wherein the neural network model comprises a deep residual shrinkage network and a multi-representation domain adaptation network; and inputting to-be-measured data of variable-process milling into the roughness prediction model to generate a predicted value. According to the variable process milling roughness prediction method disclosed by the invention, iterative training is carried out by utilizing limited sample data in the variable process milling process, so that feature recombination and data distribution alignment of small sample data are realized, the limitation of feature extraction is avoided, and the roughness prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to the field of roughness prediction, and more specifically to a method and system for predicting roughness in variable process milling. Background Art

[0002] Surface roughness is a key parameter for measuring surface quality and crucially impacts the performance and service life of products in the automotive, aviation, and aerospace industries. The cutting of these products requires variable milling processes, presenting complex and variable process conditions and requiring minimal processing data. This poses significant challenges to roughness prediction and has become a key challenge in improving product surface roughness.

[0003] Existing roughness prediction methods based on physical models are mainly based on the kinematic principles of the machining process and the mechanism theory of chip formation. Through theoretical deduction and a series of assumptions, physical models are established to predict surface roughness. However, roughness prediction methods based on physical models involve multivariable mathematical models, such as establishing physical models through finite element analysis, boundary element analysis, etc. This process is computationally intensive and has many influencing factors. It is usually applicable to specific machining methods and materials. However, in the engineering practice of variable process machining, a large amount of adaptive adjustments and modifications to the physical model are required for different machining conditions and materials. Therefore, the roughness prediction methods based on physical models in related technologies have the disadvantage of insufficient versatility and are difficult to apply in engineering practice.

[0004] The application of related artificial intelligence technologies to roughness prediction also faces significant difficulties: First, the process conditions in variable-process cutting are complex and changeable, resulting in significant differences in data distribution. Second, machine learning-based prediction models typically require that the distribution of training and test data be consistent; otherwise, the generalization of the prediction model will be difficult to meet requirements. Furthermore, the limited amount of data in actual machining processes is a typical small sample size characteristic. Insufficient sample size can easily lead to overfitting of the prediction model, thereby reducing prediction accuracy.

[0005] The information disclosed in this background section of the present disclosure is only for enhancement of understanding of the general background of the disclosure and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to those skilled in the art. Summary of the Invention

[0006] In view of the above problems, the present disclosure provides a method and system for predicting roughness in variable process milling to improve the roughness prediction accuracy.

[0007] According to a first aspect of the present disclosure, a method for predicting roughness in variable process milling is provided, comprising:

[0008] Signals from variable process milling are collected to construct data samples; the data samples are input into a neural network model for iterative training to construct a roughness prediction model; wherein the neural network model includes a deep residual shrinkage network and a multi-representation domain adaptation network; the data to be measured from the variable process milling is input into the roughness prediction model to generate a predicted value;

[0009] The step of inputting the data samples into a neural network model for iterative training to construct a roughness prediction model includes:

[0010] Converting the data sample into a first feature according to the residual block and attention mechanism of the deep residual shrinkage network;

[0011] Performing noise reduction and compression processing on the first feature according to a soft threshold function to generate a training feature;

[0012] Dividing the data set consisting of the training features into a source domain data set and a target domain data set, and extracting common underlying features of the source domain data set and the target domain data set;

[0013] Mapping the common underlying features to m feature spaces according to the multi-representation domain adaptation network to generate migration features;

[0014] Integrating and reorganizing the migration features, constructing the neural network model and generating a process prediction value of roughness;

[0015] The total training loss value is iteratively calculated according to the process prediction value and the neural network model is updated in reverse until the total training loss value converges. After confirming the convergence, the updated neural network model is the roughness prediction model.

[0016] According to an embodiment of the present disclosure, converting the data sample into a first feature according to the residual block and attention mechanism of the deep residual shrinkage network includes:

[0017] Input the data sample into the residual block to generate output features; wherein the output features are calculated by the following formula: H(x)=F(x)+x;

[0018] Wherein, x represents the input data sample, F(x) represents the residual block function, and H(x) represents the output feature;

[0019] Converting the output features into dimensionality-reduced features according to a global average pooling operation of the attention mechanism;

[0020] Attention weights are generated by back propagation according to the fully connected layer and activation function of the attention mechanism, and the attention weights are assigned to the dimensionality reduction features to obtain the first features.

[0021] According to an embodiment of the present disclosure, the soft threshold function includes: a first function and a second function;

[0022] The performing noise reduction and compression processing on the first feature according to the soft threshold function to generate a training feature includes:

[0023] Extracting and processing the first feature through the convolutional layer of the deep residual shrinkage network to generate a second feature;

[0024] The second feature is subjected to noise reduction processing according to the first function to generate a third feature; wherein the first function is represented by the following formula:

[0025]

[0026] Wherein, U2 represents the second feature; τ represents the threshold; U3 represents the third feature;

[0027] The third feature is compressed according to the second function to generate the training feature; wherein the compression processing includes: when the absolute value of the second feature is less than a threshold, deleting the second feature; when the absolute value of the second feature is greater than the threshold, shrinking the second feature relative to zero; the second function is represented by the following formula:

[0028]

[0029] According to an embodiment of the present disclosure, mapping the common underlying features to m feature spaces according to a multi-representation domain adaptation network to generate migration features includes:

[0030] Mapping the corresponding common underlying features in the source domain dataset and the target domain dataset to m feature spaces according to the multi-representation domain adaptation network, and extracting multi-scale features in the m feature spaces; wherein m is a positive integer greater than or equal to 1;

[0031] Calculate the distribution distance between the corresponding multi-scale features in the source domain dataset and the target domain dataset in each feature space; the calculation formula of the distribution distance is represented by the following formula:

[0032]

[0033] Among them, d Hm (x s ,x t ) is characterized as the distribution distance in the m-th space, x s Represented as the source domain dataset, x t It is represented as the target domain dataset; C is represented as the number of categories of data in the source domain dataset and the target domain dataset; Characterized as the c-th data subset in the source domain dataset; Characterized as the c-th data subset in the target domain dataset; Characterized by the number of samples of category c in the source domain dataset; Characterized by the number of samples of category c in the target domain dataset; Represented as the i-th sample feature vector of the c-th data subset in the source domain dataset; It is represented as the j-th sample feature vector of the c-th data subset in the target domain dataset; φ is represented as a mapping function;

[0034] The multi-scale features in the source domain dataset and the multi-scale features in the target domain dataset are aligned by optimizing the distribution distance to generate migration features.

[0035] According to an embodiment of the present disclosure, the total training loss value includes: a roughness prediction loss value and a feature alignment loss value;

[0036] The iterative calculation of the total training loss value according to the process prediction value and reverse updating the neural network model until the total training loss value converges includes:

[0037] The roughness prediction loss value is calculated according to the process prediction value; wherein the roughness prediction loss value is represented by the following formula:

[0038] Among them, L c Characterized by the roughness predicted loss value; y k Characterized as the roughness value actually measured in the kth experimental case; y i is represented by the predicted value of the process in the kth experimental case; n is represented by the total number of experimental cases;

[0039] The feature alignment loss value is calculated according to the distribution distance; wherein the feature alignment loss value is represented by the sum of the distribution distances in the m feature spaces; the feature alignment loss value is represented by the following formula:

[0040]

[0041] Among them, L CMMD Characterized by the feature alignment loss value;

[0042] Iteratively calculate the sum of the roughness prediction loss value and the feature alignment loss value to determine the total training loss value; wherein the total training loss value is represented by the following formula: L = L c +λL CMMD ;

[0043] Among them, L represents the total loss value of the training; λ represents the loss value L of the feature to it CMMD The weight is continuously updated with the iteration rounds, and λ is represented by the following formula:

[0044]

[0045] Among them, p represents the ratio of the current iteration round to the total iteration rounds;

[0046] Confirming that the total training loss value does not converge, and reversely updating the neural network model according to the iteration progress parameter;

[0047] The total training loss value is recalculated according to the new process prediction value generated by the updated neural network model until the total training loss value converges.

[0048] According to an embodiment of the present disclosure, the signals include: a vibration signal, a force signal, a spindle speed, a feed rate, and a cutting depth.

[0049] A second aspect of the present disclosure provides a system for predicting roughness in variable process milling, comprising: a signal acquisition module for acquiring signals in variable process milling and constructing data samples;

[0050] A training module is used to input the data samples into a neural network model for iterative training to build a roughness prediction model; wherein the neural network model includes: a deep residual shrinkage network and a multi-representation domain adaptation network;

[0051] A prediction module, configured to input the data to be measured during variable process milling into the roughness prediction model to generate a prediction value;

[0052] Wherein, the training module includes:

[0053] A data conversion module, configured to convert the data sample into a first feature according to the residual block and attention mechanism of the deep residual shrinkage network;

[0054] a denoising module, configured to perform denoising and compression processing on the first feature according to a soft threshold function to generate a training feature;

[0055] a feature extraction module, configured to divide the dataset consisting of the training features into a source domain dataset and a target domain dataset, and extract common underlying features of the source domain dataset and the target domain dataset;

[0056] A mapping module, configured to map the common underlying features to m feature spaces according to the multi-representation domain adaptation network to generate migration features;

[0057] A process prediction module, configured to integrate and reorganize the migration features, construct the neural network model and generate a process prediction value of roughness;

[0058] The roughness prediction module is used to iteratively calculate the total training loss value according to the process prediction value and reversely update the neural network model until the total training loss value converges. After confirming the convergence, the updated neural network model is the roughness prediction model.

[0059] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned variable process milling roughness prediction method.

[0060] A fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned variable process milling roughness prediction method.

[0061] The fifth aspect of the present disclosure further provides a computer program product, comprising a computer program, which implements the above-mentioned variable process milling roughness prediction method when executed by a processor.

[0062] The variable process milling roughness prediction method and system provided by the embodiments of the present disclosure are used to predict surface roughness under variable process milling conditions, and have at least the following beneficial effects:

[0063] The embodiments of the present disclosure address the problems of low prediction accuracy and difficulty in meeting engineering requirements in related technologies due to the complex and changeable process conditions and small amount of processing data in variable process milling. Through the variable process milling roughness prediction method disclosed by the present disclosure, iterative training is carried out using limited sample data in the variable process milling process, which realizes feature reorganization and data distribution alignment of small sample data, avoids the limitations of feature extraction, and improves the roughness prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0065] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0066] Figure 1 Schematically illustrates an exemplary system architecture to which a method and system for predicting roughness in milling machining using a variable process according to an embodiment of the present disclosure can be applied;

[0067] Figure 2 The flowchart of the method for predicting roughness of milling by a variable process according to an embodiment of the present disclosure is schematically shown;

[0068] Figure 3 A flowchart schematically illustrates inputting data samples into a neural network model for iterative training to construct a roughness prediction model according to an embodiment of the present disclosure;

[0069] Figure 4 Schematically illustrates a flow chart of converting a data sample into a first feature based on a residual block and an attention mechanism of a deep residual shrinkage network according to an embodiment of the present disclosure;

[0070] Figure 5 Schematically shows a structural diagram of an attention mechanism according to an embodiment of the present disclosure;

[0071] Figure 6 A flowchart of performing noise reduction and compression processing on the first feature according to a soft threshold function to generate a training feature according to an embodiment of the present disclosure is schematically shown;

[0072] Figure 7 Schematically shows a structure diagram of a deep residual shrinkage network according to an embodiment of the present disclosure;

[0073] Figure 8 Schematically shows a structural diagram of the Inception domain adaptation module according to an embodiment of the present disclosure;

[0074] Figure 9 A schematic diagram of an experimental device according to an embodiment of the present disclosure is schematically shown. Figure 9 (a) shows the schematic diagram of the CNC milling machine of the experimental setup, Figure 9 (b) shows a schematic diagram of the tool and sensor device, Figure 9 (c) shows a cutting force acquisition device, Figure 9 (d) shows a vibration collection device;

[0075] Figure 10 The figure schematically shows the setting diagram of the measuring line during the roughness measurement process according to an embodiment of the present disclosure. Figure 10 (a) shows the setup diagram of the survey line 1, Figure 10 (b) shows the setup diagram of measurement line 2, Figure 10 (c) shows a schematic diagram of the setting of the measuring line 3;

[0076] Figure 11Schematically shows a schematic diagram of milling process planning according to an embodiment of the present disclosure;

[0077] Figure 12 The following schematically shows a structural block diagram of a variable process milling roughness prediction system according to an embodiment of the present disclosure;

[0078] Figure 13 Schematically shows a structural block diagram of a training module according to an embodiment of the present disclosure;

[0079] Figure 14 The block diagram of an electronic device suitable for implementing the method for predicting roughness in variable process milling according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0080] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0081] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0082] To facilitate understanding of the technical solutions disclosed herein, the following terms are explained:

[0083] Variable process milling refers to the real-time change of milling conditions according to different process requirements during the milling process, such as adjusting cutting parameters, tool selection, machine tool settings, etc.

[0084] Adjusting process parameters includes, but is not limited to, selecting the appropriate cutting speed and feed rate based on material hardness and tool type. For example, when milling hard materials, low cutting speed, low feed rate, and low cutting depth are required in real time; when milling soft materials, high cutting speed, high feed rate, and high cutting depth are required in real time. The settings of these parameters will directly affect the quality of the machining roughness, machining efficiency, and tool life.

[0085] Denoising means reducing noise. Data in the field of neural network technology usually contains noise, and usually requires noise reduction processing of the data. The "noise" disclosed in this disclosure can be understood more broadly. "Noise" can not only refer to the noise mixed in the data acquisition process (such as Gaussian noise), but also refer to redundant information that is irrelevant to the current task. For example: when training the roughness prediction model of variable process milling, if there is processing parameter data that is irrelevant to roughness in the data, then the processing parameter data that is irrelevant to roughness can be understood as a kind of noise.

[0086] Mean Absolute Percentage Error (MAPE): Mean Absolute Percentage Error (MAPE) is a commonly used metric to evaluate the error between predicted and actual values and is an important indicator of forecast accuracy. MAPE, expressed as a percentage, represents the average percentage error between the predicted and actual values. MAPE values range from [0 to +∞), with smaller values indicating more accurate forecast models. Generally speaking, a MAPE less than 10% is considered a good forecast model, while a MAPE between 10% and 20% indicates acceptable forecast accuracy. However, if the MAPE exceeds 20%, the forecast performance is less than ideal and further improvement of the forecast model's accuracy is needed.

[0087] Root Mean Square Error (RMSE): Root Mean Square Error (RMSE) is a commonly used metric for evaluating the accuracy of predictive models. It measures the deviation between the predicted value and the true value, calculating the square root of the sum of the squares of the differences between the predicted and true values. RMSE values range from 0 to positive infinity, with smaller values indicating smaller prediction errors and stronger predictive capabilities. In practical applications, RMSE is often used to evaluate the predictive accuracy of regression models.

[0088] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0089] Although the current surface roughness prediction technology based on deep learning has certain prediction performance, the effectiveness of the application of related roughness prediction technology is based on sufficient training data and test data with consistent distribution. In actual processing, especially in variable process milling, due to the variety of processing technologies, the number of samples for each process is limited, and there are significant differences in data distribution. This inconsistency in data distribution leads to poor generalization ability of deep learning models. In addition, deep learning models often require a large number of parameters, and insufficient number of samples can easily lead to overfitting problems in the model, thereby reducing the accuracy of the prediction. Therefore, how to improve the performance of deep learning models in surface roughness prediction in variable process milling when the data distribution is inconsistent and the number of samples is insufficient is a technical problem that needs to be solved at this stage.

[0090] After conducting extensive experimental research on the above technical issues in engineering practice, the applicant discovered that transfer learning has the ability to transfer knowledge and patterns accumulated in one field or task to different but related fields or problems. This characteristic of the model makes its performance particularly outstanding when dealing with small sample prediction problems in variable process milling, enabling effective reuse and rapid adaptation of roughness prediction knowledge. This transfer learning model only requires a small number of training samples to quickly adapt to new roughness prediction tasks, thereby relatively alleviating the problem of model overfitting caused by insufficient sample size in variable process milling.

[0091] In response to the above problems, the embodiments of the present disclosure propose a method for predicting roughness of variable process milling based on DRSN-MRAN domain adaptation. The method for predicting roughness of variable process milling disclosed in the present disclosure, in order to solve the problem that noise reduction is cumbersome and feature extraction capability is insufficient during variable process milling, resulting in low prediction accuracy, uses a deep residual shrinkage network (DRSN) to reduce the difficulty of network learning, prevent network degradation, and avoid the limitations of feature extraction; based on the multi-representation domain adaptation network (MRAN), high-dimensional training features are extracted, integrated and reorganized, and different spatial features are aligned separately to reduce the risk of negative migration, breaking the technical barrier that network models in related technologies usually require sufficient training data and test data with consistent distribution, and realizing accurate prediction of roughness under small sample conditions of variable process milling. The method and system for predicting roughness of variable process milling according to the embodiments of the present disclosure solve the problem of low prediction accuracy caused by insufficient sample data and differences in data distribution in variable process milling.

[0092] Figure 1An exemplary system architecture to which the variable process milling roughness prediction method and system can be applied according to an embodiment of the present disclosure is schematically shown.

[0093] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0094] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0095] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0096] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process received data such as user requests, and feed back processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0097] For example, the variable process milling roughness prediction request may be originally stored in any one of the terminal devices 101, 102, or 103 (for example, the terminal device 101, but not limited thereto), or stored in an external storage device and imported into the terminal device 101. The terminal device 101 may then send the request to another terminal device, server, or server cluster, and the other server or server cluster that receives the request may execute the variable process milling roughness prediction method provided by the embodiment of the present disclosure.

[0098] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0099] Figure 2The flowchart of the method for predicting roughness in variable process milling according to an embodiment of the present disclosure is schematically shown.

[0100] like Figure 2 As shown, the variable process milling roughness prediction method of this embodiment includes operations S200 to S400.

[0101] In operation S200 , signals in variable process milling are collected to construct data samples.

[0102] According to an embodiment of the present disclosure, the above-mentioned signals include: a vibration signal, a force signal, a spindle speed, a feed speed and a cutting depth.

[0103] According to the embodiments of the present disclosure, detection equipment such as accelerometers, vibration sensors, and force sensors can be pre-installed on the spindle of a CNC milling machine to measure vibration signals, force signals, spindle speed, feed rate, and depth of cut during the milling process. Data samples are generated by collecting various signals during the variable process milling process.

[0104] According to an embodiment of the present disclosure, the above-mentioned signals include but are not limited to: vibration signals, force signals, spindle speed, feed speed and cutting depth.

[0105] In operation S300 , data samples are input into a neural network model for iterative training to construct a roughness prediction model.

[0106] According to the embodiments of the present disclosure, a neural network model including a Deep Residual Shrinkage Network (DRSN) and a Multi-Representation Adaptation Network (MRAN) can be pre-built. Data samples are input into the constructed neural network model for iterative training. During the training process, the model gradient is calculated through iterative backpropagation, and the parameters of each layer in the neural network model are continuously updated until the neural network model converges, thereby establishing a stable roughness prediction model.

[0107] In operation S400 , the data to be measured in the variable process milling process is input into a roughness prediction model to generate a prediction value.

[0108] According to an embodiment of the present disclosure, data to be measured for variable process milling can be measured and collected in advance through online measurement. For example, the data to be measured can include parameters such as spindle speed, feed rate, and cutting depth. The data to be measured is input into the roughness prediction model established in operation S220 to generate a predicted value.

[0109] According to the embodiments of the present disclosure, in order to address the problems of low prediction accuracy and difficulty in meeting engineering requirements in related technologies due to the complex and changeable process conditions and small amount of processing data in variable process milling, a variable process milling roughness prediction method based on DRSN-MRAN is proposed. By using limited sample data in the variable process milling process for iterative training, feature reorganization and data distribution alignment of small sample data are achieved, which avoids the limitations of feature extraction and improves the roughness prediction accuracy.

[0110] The following references Figure 3 right Figure 2 The method shown is further explained.

[0111] Figure 3 The flowchart of inputting data samples into a neural network model for iterative training to construct a roughness prediction model according to an embodiment of the present disclosure is schematically shown.

[0112] like Figure 3 As shown, in operation S300 , data samples are input into a neural network model for iterative training to construct a roughness prediction model, which may include the following operations S310 to S360 .

[0113] In operation S310 , a data sample is converted into a first feature according to a residual block and an attention mechanism of a deep residual shrinkage network.

[0114] According to an embodiment of the present disclosure, the deep residual shrinkage network introduces residual blocks on the basis of ordinary convolutional networks. The network learns the residual block function rather than direct mapping. The output of the basic residual block can be expressed as the sum of the residual block function and the direct jump connection of the input.

[0115] When a middle layer of a deep residual shrinkage network fails to learn valid information, the residual block passes the input directly to the subsequent layers through skip connections to prevent network degradation. This deep residual network reduces the difficulty of network learning and enables the network to directly learn deeper features.

[0116] In operation S320 , noise reduction and compression are performed on the first feature according to a soft threshold function to generate a training feature.

[0117] According to an embodiment of the present disclosure, the above-mentioned soft threshold function can be a nonlinear function that can compress the noise in the first feature as input to effectively remove the noise. The purpose of introducing the above-mentioned soft threshold function as a nonlinear activation function is to improve the nonlinear fitting ability of the neural network and enhance the expression ability of the model. In the iterative process, after rigorous mathematical deduction, it is found that if the soft threshold function of the present disclosure is not used in the network, the input of the nodes of each layer is a linear function of the output of the upper layer. No matter how many hidden layers there are in the neural network model, the final output result is a linear fit of the network input, that is, the hidden layer does not play its role. Accordingly, the soft threshold function introduced in the embodiment of the present disclosure as an activation function can improve the expression ability of the model.

[0118] In operation S330 , the dataset consisting of training features is divided into a source domain dataset and a target domain dataset, and common underlying features of the source domain dataset and the target domain dataset are extracted.

[0119] According to the embodiments of the present disclosure, feature alignment based on features extracted from a single structure in related technologies can only focus on partial information. To address the above issues, the present disclosure proposes a multi-depth residual shrinkage network that divides the training features into a source domain dataset and a target domain dataset. A shared feature extractor can be used to extract multiple common underlying features from the source and target domain datasets, and these common underlying features can be used to more comprehensively represent the common data in the source and target domain datasets.

[0120] According to an embodiment of the present disclosure, the training set and the test set can be divided as follows: according to the number p of types of processing techniques in the variable process milling process, the data set composed of training features is divided into p parts, of which p-1 parts constitute the source domain data set of labeled roughness data, and the remaining part serves as the target domain data set of unlabeled roughness data.

[0121] According to embodiments of the present disclosure, the training and test sets can also be divided into a training set of labeled roughness data and a test set of unlabeled roughness data according to a preset ratio. The preset ratio of the training set to the test set can be 7:3, 4:1, or other ratios, and the specific ratio can be adjusted based on actual conditions. For example, the training set can be divided into 80% training set and 20% test set.

[0122] In operation S340 , the common underlying features are mapped to m feature spaces according to the multi-representation domain adaptation network to generate transfer features.

[0123] According to an embodiment of the present disclosure, the training features generated in operation S320 are generally high-dimensional features. By mapping the common underlying features to m feature spaces, such as 1- to 3-dimensional subspaces, the high-dimensional data can be projected onto the low-dimensional subspace to generate migration features. By analyzing the projected data, the purpose of fully understanding the original data in the variable process milling process can be achieved.

[0124] In operation S350 , the migration features are integrated and reorganized to construct a neural network model and generate a process prediction value of roughness;

[0125] According to an embodiment of the present disclosure, the fully connected layer of the constructed neural network model can be used to map the integrated and reorganized migration features to the output layer through linear transformation, and output the process prediction value of the roughness.

[0126] In operation S360, the total training loss value is iteratively calculated according to the process prediction value and the neural network model is updated in reverse until the total training loss value loss function converges and the updated neural network model is used as the roughness prediction model.

[0127] According to an embodiment of the present disclosure, during training, a total training loss value is calculated based on the process prediction value, and a gradient is calculated by backpropagating the total training loss value. The parameters of each layer of the neural network model are continuously updated based on the gradient until the total training loss value converges. For example, when the fluctuations of several calculated total training loss values within a preset range tend to be stable, the total training loss value is determined to have converged. The neural network model updated after the total training loss value converges is the roughness prediction model.

[0128] The variable process milling roughness prediction method and system of the disclosed embodiment solves the problems of insufficient sample data and differences in data distribution in variable process milling, resulting in low prediction accuracy and difficulty in generalization to meet engineering needs. The variable process milling roughness prediction method disclosed in the present invention addresses the problems of cumbersome noise reduction and insufficient feature extraction capabilities in the variable process milling process, resulting in low prediction accuracy. It uses a deep residual shrinkage network (DRSN) to reduce the difficulty of network learning, prevent network degradation, and avoid the limitations of feature extraction; based on the multi-representation domain adaptation network (MRAN), it reduces the dimensionality of high-dimensional training features, integrates and reorganizes them, and aligns different spatial features separately to reduce the risk of negative transfer, breaking the technical barrier that network models in related technologies usually require sufficient training data and test data with consistent distribution, and realizes accurate prediction of roughness under small sample conditions of variable process milling.

[0129] The following is combined with specific embodiments and reference Figures 4 to 6 right Figures 2 and 3 The method shown is further explained.

[0130] Figure 4 The figure schematically shows a flowchart of converting a data sample into a first feature based on the residual block and attention mechanism of the deep residual shrinkage network according to an embodiment of the present disclosure.

[0131] like Figure 4 As shown, in operation S310, the data sample is converted into the first feature according to the residual block and attention mechanism of the deep residual shrinkage network, which can include operations S311 to S313.

[0132] In operation S311, data samples are input into a residual block to generate output features.

[0133] According to an embodiment of the present disclosure, the output feature is calculated by the formula H(x)=F(x)+x, where x represents the input data sample, F(x) represents the residual block function, and H(x) represents the output feature.

[0134] According to an embodiment of the present disclosure, a deep residual shrinkage network introduces a residual block based on an ordinary convolutional network, so that the network learns the residual block function rather than direct mapping. When a certain middle layer of the network cannot learn valid information, the residual block passes the input directly to the subsequent layer through a jump connection to prevent network degradation. For example: when the Mth convolutional layer in the deep residual shrinkage network cannot learn valid information, the input is passed directly to the M+1th convolutional layer through a jump connection according to the residual block function to prevent network degradation. The residual network reduces the difficulty of network learning, allowing the network to directly learn deeper features.

[0135] Introducing the deep residual network into the residual block function can avoid the direct mapping of data samples in the variable process milling process, which causes the deep residual shrinkage network to produce network degradation problems, thereby increasing the network learning depth and improving the accuracy of roughness prediction under the conditions of small sample data in variable process milling.

[0136] In operation S312, the output features are converted into dimensionality reduction features according to a global average pooling operation of the attention mechanism.

[0137] In operation S313, an attention weight is generated by back propagation according to the fully connected layer and activation function of the attention mechanism, and the attention weight is assigned to the dimensionality reduction feature to obtain a first feature.

[0138] Figure 5 The structure diagram of the attention mechanism according to an embodiment of the present disclosure is schematically shown.

[0139] According to the embodiments of the present disclosure, Figure 5As shown, the output features generated by the residual block are input as data samples Figure 5 In the attention mechanism shown in the figure, the data processing process of the attention mechanism is as follows: first, the data sample is reduced in dimension by the global average pooling operation of the attention mechanism, and the attention weight is generated using the fully connected layer and activation function. Then, each attention weight is assigned to the data after pooling dimensionality reduction processing. The weighted data obtained after dimensionality reduction processing is the dimensionality reduction data. At the same time, the attention weight value is updated through back propagation.

[0140] The attention mechanism is introduced into the deep residual shrinkage network in the roughness prediction model, thereby simulating the human selective attention mechanism. By dynamically allocating and updating the attention weights to calculate the key parameter data in the variable process milling process, the problem of information data overload is solved, and the limitations of invalid information interfering with the model performance and feature extraction are avoided, thereby improving the roughness prediction performance and prediction accuracy of the roughness prediction model.

[0141] Figure 6 The flowchart of generating training features by performing denoising and compression processing on the first feature according to the soft threshold function according to an embodiment of the present disclosure is schematically shown.

[0142] like Figure 6 As shown, according to an embodiment of the present disclosure, the soft threshold function in operation S320 includes: a first function and a second function. In operation S320, denoising and compressing the first feature according to the soft threshold function to generate a training feature includes the following operations S321 to S323:

[0143] In operation S321 , the first feature is extracted through a convolutional layer of a deep residual shrinkage network to generate a second feature.

[0144] In operation S322, the second feature is subjected to noise reduction processing according to the first function to generate a third feature; wherein the first function is represented by the following formula:

[0145]

[0146] In the above formula: U2 represents the second feature, τ represents the threshold, and U3 represents the third feature.

[0147] According to the embodiments of the present disclosure, a detailed explanation of noise can be found in the Glossary section of this disclosure, and the definition of "noise" will not be repeated here. For example, when training a roughness prediction model for variable process milling, if the data contains specific process parameter data, then this specific process parameter data can be understood as a type of noise. Therefore, to improve the model's prediction accuracy, this first function can effectively remove noise from the variable process milling process, preventing invalid data from interfering with the prediction.

[0148] In operation S323, the third feature is compressed according to the second function to generate a training feature. The compression process includes: when the absolute value of the second feature is less than a threshold, the second feature is deleted; when the absolute value of the second feature is greater than the threshold, the second feature is shrunk relative to zero. The second function is represented by the following formula:

[0149]

[0150] According to an embodiment of the present disclosure, the gradient of the soft threshold function can be set to 0 or 1. Noise reduction and compression processing of data using the soft threshold function can effectively reduce the gradient explosion or gradient vanishing phenomenon during the model training process.

[0151] To facilitate understanding of the training and processing methods of the residual block, attention mechanism, and soft threshold function of the above-mentioned deep residual shrinkage network, a specific application scenario of the above-mentioned embodiment will be used as an example for explanation below:

[0152] Figure 7 The figure schematically shows a structure diagram of a deep residual shrinkage network according to an embodiment of the present disclosure.

[0153] According to the embodiments of the present disclosure, a deep residual shrinkage network structure can be pre-built. Figure 7 As shown in the figure, the data sample U1 constructed from the signal collected during the variable process milling process is input into the deep residual contraction network. After feature extraction through two convolutional layers, U2 is obtained. U2 obtains the appropriate threshold through the attention mechanism sub-network, takes the absolute value and performs global average pooling operations on the data to obtain a one-dimensional vector β. Then, through the fully connected layer of the attention mechanism and the activation function (for example, the activation function can be a Sigmoid activation function), a one-dimensional scaling parameter vector α with an output range of [0, 1] is obtained. Multiplying α and β can obtain the combination of channel thresholds τ. U2 and τ are input into the soft threshold function for signal noise reduction processing to obtain feature U3. U3 is recombined with the features mapped by the identity path to obtain U4. Under the action of the identity path, the difficulty of network parameter training of the deep residual contraction network is greatly reduced, making it easy to train a deep learning model with good results.

[0154] Common feature extraction methods in related technologies are mainly based on signal analysis methods, which perform noise reduction processing on the signal, extract features, and then screen out sensitive features. When manually extracting time domain and frequency domain features in this way, it over-relies on signal processing knowledge, lacks adaptability, and the denoising process is complicated. The deep residual shrinkage network (DRSN) proposed in the present invention is based on the residual network, and integrates the attention mechanism and the soft threshold function, which solves the problems of over-reliance on signal processing knowledge, lack of adaptability, and complex denoising process in conventional methods, and realizes soft thresholding. In the process of feature learning, the deep residual shrinkage network avoids the complex process of applying signal processing knowledge to eliminate redundant information, realizes denoising of the input signal, and then adaptively extracts features.

[0155] According to an embodiment of the present disclosure, in operation S340, the common underlying features are mapped to m feature spaces according to the multi-representation domain adaptation network to generate migration features, including the following operations S341 to S344:

[0156] In operation S341, corresponding common underlying features in the source domain dataset and the target domain dataset are mapped to m feature spaces according to the multi-representation domain adaptation network, and multi-scale features in the m feature spaces are extracted, where m is a positive integer greater than or equal to 1.

[0157] According to an embodiment of the present disclosure, the output function of the multi-representation feature extractor can be applied to map the common underlying features into m feature spaces. The output function of the shared feature extractor is represented by the following formula: f = G f (x,θ f ), where x is the input data, θ f is the feature extractor parameter, G f is the feature map, and f is the feature extractor output function. In the early stage of training, first the feature extractor f = G f (x,θ f ) function converts the signal data into a high-dimensional abstract representation, and then uses the soft thresholding function to align the signal data to reduce noise and remove redundant features.

[0158] According to another embodiment of the present disclosure, the rich detail information of the common underlying features can be used to help the model locate the feature position more accurately. At the same time, by extracting multi-scale features, that is, extracting features of different scales, it is possible to identify data sample information of different processes in the variable process milling process, thereby improving the robustness of the model. The present disclosure improves the understanding and recognition capabilities of the prediction model in complex scenarios such as variable process milling by combining the above-mentioned advantages of common underlying features and multi-scale features, thereby improving the robustness of the prediction model and the roughness prediction accuracy. In operation S342, the distribution distance between the corresponding multi-scale features in the source domain dataset and the target domain dataset in each feature space is calculated.

[0159] The calculation formula of the above distribution distance is represented by the following formula:

[0160]

[0161] Among them, d Hm (x s ,x t ) is represented as the distribution distance in the mth space, x s Represented as the source domain dataset, x t It is represented as the target domain dataset; C is represented as the number of categories of data in the source domain dataset and the target domain dataset; Represented as the c-th data subset in the source domain dataset; Represented as the c-th data subset in the target domain dataset; Characterized by the number of samples of category c in the source domain dataset; Characterized as the number of samples of category c in the target domain dataset; Represented as the i-th sample feature vector of the c-th data subset in the source domain dataset; It is represented as the j-th sample feature vector of the c-th data subset in the target domain dataset; φ is represented as the mapping function.

[0162] According to the embodiments of the present disclosure, the feature alignment method in the related art only aligns the edge distribution differences of the data, without involving feature categories, and only performs global feature alignment. However, for the surface roughness dataset under variable process milling conditions, the overall similarity between the source domain and target domain data is high, and the feature distribution differences are mainly reflected in the differences between individuals in the same category. To minimize the inter-domain distribution differences, it is necessary to align the source domain label y s and the target domain label y t However, due to the lack of labeled data in the target domain, y tTo solve this problem, the present invention uses the Conditional Maximum Mean Discrepancy (CMMD) as a measure of the feature distribution distance between the source domain and the target domain dataset. CMMD is given by the formula above. Hm (x s ,x t ) is obtained by the calculation formula. CMMD makes the target domain pseudo label y t Instead of labeling data y t By minimizing CMMD, the extracted features in the source and target domains are aligned, and y is continuously improved in the iterative and optimization process. t The quality of the roughness is improved, and the accurate roughness prediction is achieved under the condition that the data distribution of variable process milling is significantly different. This solves the technical problems that the roughness prediction methods in related technologies are not general enough and are only applicable to roughness prediction application scenarios with consistent data distribution.

[0163] In operation S343 , the multi-scale features in the source domain dataset and the multi-scale features in the target domain dataset are aligned by optimizing the distribution distance to generate a migration feature.

[0164] According to the embodiments of the present disclosure, the single-representation domain adaptation method in the related art uses a single network structure to extract data from the source domain and the target domain into the same feature space, and aligns the feature distributions of the two domains in the space. However, a single network structure can usually only extract partial features when faced with a complex data set, and only calculates and transforms these partial features during the domain adaptation process, which ultimately affects the migration effect. To solve the above problems, the present disclosure proposes the introduction of the Inception domain adaptation module in the multi-representation domain adaptation network, which can greatly speed up data transmission and reduce time and resource consumption during the migration process.

[0165] Figure 8 The figure schematically shows the structure of the Inception domain adaptation module according to an embodiment of the present disclosure.

[0166] like Figure 8 As shown. The multi-representation domain adaptation network of the present disclosure can use the Inception domain adaptation module to extract multiple representations of data. For example, four branch structures are set in the same convolutional layer of the Inception domain adaptation module, and each channel contains convolution kernels of different scales such as 1×1, 3×3, and 5×5, as well as a 3×3 average pooling layer.

[0167] The input of the Inception domain adaptation module is the feature vector extracted by the shared feature extractor, and the different extracted representations are merged in a specific dimension through tensor splicing operations at the output. The Inception domain adaptation module has two advantages: (1) By utilizing a diverse network structure to map the data of the source domain and the target domain to multiple different feature spaces, it can not only cover more information in the data, but also facilitate the domain adapter to align the distribution of different features in the two domains, thereby reducing the risk of negative transfer. (2) By fusing multiple substructures into a convolutional layer, multi-scale features of the data can be extracted without the need to train multiple neural networks independently, which can effectively reduce computational costs.

[0168] According to an embodiment of the present disclosure, the total training loss value in operation S360 includes: a roughness prediction loss value and a feature alignment loss value. In operation S360, the total training loss value is iteratively calculated based on the process prediction value and the neural network model is reversely updated until the total training loss value converges, including the following operations S361 to S323:

[0169] In operation S361, the roughness prediction loss value is calculated according to the process prediction value; wherein the roughness prediction loss value is calculated by the formula representation.

[0170] In the above roughness prediction loss value formula, L c Characterized as the roughness prediction loss value; y k Characterized as the roughness value actually measured in the kth experimental case; y i is represented by the process prediction value in the kth experimental case; n is represented by the total number of experimental cases.

[0171] In operation S362, the feature alignment loss value is calculated according to the distribution distance; wherein the feature alignment loss value is represented as the sum of the distribution distances in the m feature spaces; the feature alignment loss value is calculated by the formula representation.

[0172] In the above feature alignment loss formula, L CMMD Characterized as feature alignment loss value; d Hm (x s ,x t ) is characterized as the distribution distance between the common underlying features in operation S342.

[0173] In operation S363, the sum of the roughness prediction loss value and the feature alignment loss value is iteratively calculated to determine the total training loss value; wherein the total training loss value is given by the formula L=L c +λL CMMD representation.

[0174] Among them, L represents the total loss value of training; λ represents the loss value L of the feature to itCMMD The weight is continuously updated with the iteration round, and λ is given by the formula Here, p represents the iteration progress, that is, the ratio of the current iteration round to the total iteration rounds.

[0175] According to an embodiment of the present disclosure, the learning rate during model training can be dynamically adjusted as iterations progress. The learning rate can be expressed as Characterization. Where μ0 is the initial learning rate, set to 0.01. α is the decay rate parameter, which controls the rate at which the learning rate decreases as the iteration progresses, and its value is 10. β is the nonlinear decay exponent, which adjusts the shape of the learning rate decrease curve, and its value is 0.75.

[0176] In operation S364, it is confirmed that the total training loss value does not converge, and the neural network model is reversely updated according to the iteration progress parameter.

[0177] In operation S365 , the total training loss value is recalculated according to the new process prediction value generated by the updated neural network model until the total training loss value converges.

[0178] According to an embodiment of the present disclosure, the total training loss value is determined to have converged based on the fluctuation of the total training loss value within a preset range becoming stable.

[0179] In the variable process milling process, due to the complex and changeable process conditions, there are often significant differences in data distribution, and the amount of data is limited, which is a typical small sample characteristic. The above reasons lead to the insufficient versatility of the variable process milling roughness prediction model in the related art, and it is prone to overfitting problems, making it difficult to apply to actual engineering. In the variable process milling roughness prediction model disclosed in the present invention, the high-dimensional training features are reduced and integrated and reorganized through a multi-representation domain adaptation network, and different spatial features are aligned separately to reduce the risk of negative transfer, breaking the technical barrier that the network model in the related art usually requires sufficient training data and test data with consistent distribution, and realizing the accurate prediction of roughness under small sample conditions of variable process milling.

[0180] To facilitate understanding of the above embodiment, a specific application scenario of the above embodiment will be used as an example for explanation below. At the same time, the effectiveness of the variable process milling roughness prediction method proposed in the present disclosure is verified through the following examples.

[0181] Figure 9 A schematic diagram of an experimental device according to an embodiment of the present disclosure is schematically shown. Figure 9 (a) shows the schematic diagram of the CNC milling machine of the experimental setup, Figure 9 (b) shows a schematic diagram of the tool and sensor device, Figure 9 (c) shows a cutting force acquisition device, Figure 9(d) shows the vibration collection device.

[0182] like Figure 9 (a)~ Figure 9 As shown in (d), the experimental device includes a CNC milling machine, a tool, a vibration sensor, a force sensor, etc. Figure 9 As shown in (b), reference numerals 1, 2, and 3 are accelerometers (PCB 352C03) installed on the spindle to measure the vibration acceleration during the milling process. The measured vibration signals are recorded by a data acquisition device (DAQ NI 9234) with a sampling frequency of 5000 Hz. Reference numeral 4 is a force sensor (Kistler 9257B) installed at the bottom of the part, which uses a multi-channel charge amplifier (Type 5070) to record the cutting force during the milling process with a sampling frequency of 5000 Hz.

[0183] First, a milling experiment was designed, and data samples were collected from signals during variable process milling on a CNC milling machine tool. The collected signals included spindle speed, feed rate, cutting depth, vibration signals, and force signals.

[0184] Figure 10 The figure schematically shows the setting diagram of the measuring line during the roughness measurement process according to an embodiment of the present disclosure. Figure 10 (a) shows the setup diagram of the survey line 1, Figure 10 (b) shows a schematic diagram of the setup of measurement line 2, Figure 10 (c) shows a schematic diagram of the setting of the measuring line 3;

[0185] The cutting parameters of the experiment include spindle speed, feed rate and cutting depth. The detailed parameter settings are shown in Table 1. According to different combinations of cutting parameters, after a part is milled, the surface roughness of the part is measured by the three-dimensional surface measuring instrument IPM G5. The method of selecting measurement lines is adopted. For each process, 9 evenly distributed measurement lines are selected and the average value is taken to represent the average roughness Ra of the process. The roughness measurement is as follows: Figure 10 As shown, three survey lines are shown ( Figure 10 The settings shown in red thin line.

[0186] Table 1 Cutting parameters

[0187]

[0188] Figure 11 A schematic diagram of milling process planning according to an embodiment of the present disclosure is schematically shown.

[0189] This experiment obtained 63 sets of data, which are mainly divided into four types. The specific process planning is as follows: Figure 11As shown, the numbers 1, 2, 3, and 4 represent plane milling, slot milling, hole milling, and fillet milling, respectively. That is, the number of process types p for the variable process milling process in this embodiment is 4. The number of experimental samples corresponding to the four milling processes is shown in Table 2.

[0190] Table 2 Process sample information

[0191]

[0192] In this embodiment, a large amount of data collection was performed and corresponding experimental results were obtained. Due to space limitations, only part of the experimental results are shown in Table 3.

[0193] Table 3 Part of experimental data

[0194]

[0195]

[0196] The migration dataset settings under different working conditions are shown in Table 4. The source domain dataset is the labeled roughness data composed of three processes, and the target domain dataset is the unlabeled roughness data under the remaining process.

[0197] Table 4 Migration task schedule

[0198]

[0199] After presetting the migration task schedule shown in Table 4, the vibration signal and cutting force signal data in the X, Y, and Z directions were first concatenated. These data were then combined with the static factors to yield 63 data samples, with 18 samples for surfaces, 18 for slots, 18 for holes, and 9 for fillets, respectively. These data samples were then fed into a neural network model for iterative training, constructing a roughness prediction model comprised of a deep residual shrinkage network and a multi-representation domain adaptation network.

[0200] When evaluating the performance of a prediction model, the mean absolute percentage error (MAPE) and the root mean square error (RMSE) are usually used. This embodiment uses these indicators to calculate the difference between the predicted values obtained by the roughness prediction model and the actual observed values, thereby evaluating the accuracy and reliability of the roughness prediction model.

[0201] MAPE values range from [0 to +∞), with smaller values indicating more accurate prediction models. Generally speaking, a MAPE less than 10% is considered a good prediction model, and a MAPE between 10% and 20% indicates acceptable prediction accuracy. However, if the MAPE exceeds 20%, the prediction results are less than ideal, and further improvement of the prediction model's accuracy is needed. RMSE values range from 0 to positive infinity, with smaller values indicating smaller prediction errors and stronger prediction capabilities.

[0202] To verify the feasibility of our proposed variable process milling roughness prediction method (DRSN-MRAN), we compared it with three other roughness prediction methods to demonstrate its superior prediction capabilities under variable process conditions. The four roughness prediction methods are BiLSTM, DRSN, CNN-LSTM, and IDRSN-BiLTSM. The experimental results are shown in Table 5.

[0203] Table 5 Comparison of the disclosed method with other methods

[0204]

[0205] Table 5 shows that the proposed DRSN-MRAN model achieves excellent prediction results, with low MAPE and RMSE, regardless of whether the target domain is used for transfer: milled surfaces, milled slots, milled holes, or milled fillets. Table 5 summarizes the mean values of the evaluation metrics for each network model for the four transfer tasks. Compared to the other models, the DRSN-MRAN model achieves lower MAPE values of 10.2%, 5.2%, 7.3%, and 5.1%, respectively, and lower RMSE values of 2.5%, 3.6%, 2.0%, and 1.9%, respectively. This demonstrates the excellent performance of the DRSN-MRAN model in controlling prediction error. Experimental results show that the DRSN-MRAN model achieves relatively low MAPE and RMSE values. The mean values of the evaluation metrics indicate that its prediction results are more stable and accurate. Compared to the BiLSTM, DRSN, CNN-LSTM, and IDRSN-BiLSTM models, the DRSN-MRAN model is more suitable for roughness prediction under variable process and small sample conditions.

[0206] This paper proposes a variable process milling roughness prediction method for surface roughness prediction under variable process milling conditions. First, in order to solve the problem of low prediction accuracy caused by cumbersome noise reduction and insufficient feature extraction capability in the roughness prediction process, the feature extraction method of Deep Residual Shrinkage Network (DRSN) is used to extract high-dimensional training feature information; secondly, a surface roughness prediction model is constructed using Multi-Representation Adaptation Networks (MRAN). In view of the distribution difference between the source domain and the target domain data, a domain adaptive loss function is constructed using CMMD to achieve feature domain alignment between the source domain and the target domain data in different spaces and the same category; finally, a multi-process milling experiment is designed and carried out to obtain a small sample milling roughness dataset, and the proposed method is experimentally verified. The results show that the DRSN-MRAN method can effectively extract domain-invariant features between the source domain and the target domain under small samples, and realize accurate prediction of multi-process milling surface roughness.

[0207] Based on the above-mentioned variable process milling roughness prediction method, the present disclosure also provides a variable process milling roughness prediction system. Figure 12 and Figure 13 The system is described in detail.

[0208] Figure 12 The structural block diagram of the variable process milling roughness prediction system according to an embodiment of the present disclosure is schematically shown.

[0209] like Figure 12 As shown, the variable process milling roughness prediction method 500 of this embodiment includes a signal acquisition module 510 , a training module 520 and a prediction module 530 .

[0210] The signal acquisition module 510 is used to acquire signals during the variable process milling process and construct data samples. In one embodiment, the signal acquisition module 510 can be used to perform the operation S200 described above, which will not be repeated here.

[0211] Training module 520 is used to input data samples into a neural network model for iterative training to construct a roughness prediction model. The neural network model includes a deep residual shrinkage network and a multi-representation domain adaptation network. In one embodiment, training module 520 can be used to perform operation S300 described above and will not be further described here.

[0212] The prediction module 530 is used to input the measured data of the variable process milling into the roughness prediction model to generate a prediction value. In one embodiment, the prediction module 530 can be used to perform the operation S400 described above, which will not be repeated here.

[0213] Figure 13 The structural block diagram of the training module according to an embodiment of the present disclosure is schematically shown.

[0214] like Figure 13 As shown,

[0215] like Figure 8 As shown, the training module 520 of this embodiment includes a data conversion module 521 , a noise reduction module 522 , a feature extraction module 523 , a mapping module 524 , a process prediction module 525 and a roughness prediction module 526 .

[0216] The data conversion module 521 is used to convert the data sample into the first feature according to the residual block and attention mechanism of the deep residual shrinkage network. In one embodiment, the data conversion module 521 can be used to perform the operation S310 described above, which will not be repeated here.

[0217] The noise reduction module 522 is used to perform noise reduction and compression processing on the first feature according to the soft threshold function to generate a training feature. In one embodiment, the noise reduction module 522 can be used to perform the operation S320 described above, which will not be repeated here.

[0218] Feature extraction module 523 is used to divide the dataset consisting of training features into a source domain dataset and a target domain dataset, and extract common underlying features of the source domain dataset and the target domain dataset. In one embodiment, feature extraction module 523 can be used to perform operation S330 described above, which will not be repeated here.

[0219] The mapping module 524 is used to map the common underlying features to m feature spaces according to the multi-representation domain adaptation network to generate transfer features. In one embodiment, the mapping module 524 can be used to perform the operation S340 described above, which will not be repeated here.

[0220] The process prediction module 525 is used to integrate and reorganize the migration features, build a neural network model and generate a process prediction value of roughness. In one embodiment, the process prediction module 525 can be used to perform the operation S350 described above, which will not be repeated here.

[0221] The roughness prediction module 526 is configured to iteratively calculate the total training loss value based on the process prediction value and reversely update the neural network model until the total training loss value converges. After convergence, the updated neural network model is determined to be the roughness prediction model. In one embodiment, the roughness prediction module 526 can be configured to perform operation S360 described above, which will not be further described here.

[0222] According to an embodiment of the present disclosure, any multiple modules among the signal acquisition module 510, the training module 520, and the prediction module 530 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the signal acquisition module 510, the training module 520, and the prediction module 530 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable manner of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the signal acquisition module 510, the training module 520, and the prediction module 530 can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is executed.

[0223] Figure 14 The block diagram of an electronic device suitable for implementing the method for predicting roughness in variable process milling according to an embodiment of the present disclosure is schematically shown.

[0224] like Figure 14 As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for executing different actions of the method flow according to an embodiment of the present disclosure.

[0225] Various programs and data required for the operation of the electronic device 600 are stored in the RAM 603. The processor 601, ROM 602, and RAM 603 are connected to each other via a bus 604. The processor 601 executes the various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than the ROM 602 and RAM 603. The processor 601 may also execute the various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0226] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the I / O interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage portion 608 including a hard disk; and a communication portion 609 including a network interface card such as a LAN card or a modem. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. Removable media 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in the drive 610 as needed, so that computer programs read therefrom can be installed into the storage portion 608 as needed.

[0227] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0228] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, such as but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.

[0229] The present disclosure also includes a computer program product comprising a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code causes the computer system to implement the variable process milling roughness prediction method provided in the present disclosure.

[0230] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the processor 601 executes the computer program. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0231] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0232] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from a removable medium 611. When the computer program is executed by the processor 601, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0233] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0234] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for predicting roughness in variable process milling, comprising: Collect signals from variable process milling and construct data samples; Inputting the data samples into a neural network model for iterative training to construct a roughness prediction model; wherein the neural network model includes: a deep residual shrinkage network and a multi-representation domain adaptation network; Inputting the data to be measured during variable process milling into the roughness prediction model to generate a prediction value; The step of inputting the data samples into a neural network model for iterative training to construct a roughness prediction model includes: Converting the data sample into a first feature according to the residual block and attention mechanism of the deep residual shrinkage network; Performing noise reduction and compression processing on the first feature according to a soft threshold function to generate a training feature; Dividing the data set consisting of the training features into a source domain data set and a target domain data set, and extracting common underlying features of the source domain data set and the target domain data set; Mapping the common underlying features to m feature spaces according to the multi-representation domain adaptation network to generate migration features; Integrating and reorganizing the migration features, constructing the neural network model and generating a process prediction value of roughness; The total training loss value is iteratively calculated according to the process prediction value and the neural network model is updated in reverse until the total training loss value converges. After confirming the convergence, the updated neural network model is the roughness prediction model.

2. The method according to claim 1, wherein The converting the data sample into a first feature according to the residual block and attention mechanism of the deep residual shrinkage network includes: The data sample is input into the residual block to generate output features; wherein the output features are calculated by the following formula: H(x)=F(x)+x; Wherein, x represents the input data sample, F(x) represents the residual block function, and H(x) represents the output feature; Converting the output features into dimensionality-reduced features according to a global average pooling operation of the attention mechanism; Attention weights are generated by back propagation according to the fully connected layer and activation function of the attention mechanism, and the attention weights are assigned to the dimensionality reduction features to obtain the first features.

3. The method according to claim 1, wherein The soft threshold function includes: a first function and a second function; The performing noise reduction and compression processing on the first feature according to the soft threshold function to generate a training feature includes: Extracting and processing the first feature through the convolutional layer of the deep residual shrinkage network to generate a second feature; The second feature is subjected to noise reduction processing according to the first function to generate a third feature; wherein the first function is represented by the following formula: Wherein, U2 represents the second feature; τ represents the threshold; U3 represents the third feature; The third feature is compressed according to the second function to generate the training feature; wherein the compression processing includes: when the absolute value of the second feature is less than a threshold, deleting the second feature; when the absolute value of the second feature is greater than the threshold, shrinking the second feature relative to zero; the second function is represented by the following formula:

4. The method according to claim 1, wherein Mapping the common underlying features to m feature spaces according to the multi-representation domain adaptation network to generate migration features includes: According to the multi-representation domain adaptation network, the corresponding common underlying features in the source domain dataset and the target domain dataset are mapped to m feature spaces, and multi-scale features in the m feature spaces are extracted; where m is a positive integer greater than or equal to 1; the distribution distance between the corresponding multi-scale features in the source domain dataset and the target domain dataset in each feature space is calculated; the calculation formula of the distribution distance is represented by the following formula: Among them, d Hm (x s ,x t ) is characterized as the distribution distance in the m-th space, x s Represented as the source domain dataset, x t It is represented as the target domain dataset; C is represented as the number of categories of data in the source domain dataset and the target domain dataset; Characterized as the c-th data subset in the source domain dataset; Characterized as the c-th data subset in the target domain dataset; Characterized by the number of samples of category c in the source domain dataset; Characterized by the number of samples of category c in the target domain dataset; Represented as the i-th sample feature vector of the c-th data subset in the source domain dataset; It is represented as the j-th sample feature vector of the c-th data subset in the target domain dataset; φ is represented as a mapping function; The multi-scale features in the source domain dataset and the multi-scale features in the target domain dataset are aligned by optimizing the distribution distance to generate migration features.

5. The method according to claim 4, wherein The total training loss value includes: a roughness prediction loss value and a feature alignment loss value; The iterative calculation of the total training loss value according to the process prediction value and reverse updating the neural network model until the total training loss value converges includes: The roughness prediction loss value is calculated according to the process prediction value; wherein the roughness prediction loss value is represented by the following formula: Among them, L c Characterized by the roughness predicted loss value; y k Characterized as the roughness value actually measured in the kth experimental case; y i is represented by the predicted value of the process in the kth experimental case; n is represented by the total number of experimental cases; The feature alignment loss value is calculated according to the distribution distance; wherein the feature alignment loss value is represented by the sum of the distribution distances in the m feature spaces; the feature alignment loss value is represented by the following formula: Among them, L CMMD Characterized by the feature alignment loss value; Iteratively calculate the sum of the roughness prediction loss value and the feature alignment loss value to determine the total training loss value; wherein the total training loss value is represented by the following formula: L=L c +λL CMMD ; Among them, L represents the total loss value of the training; λ represents the loss value L of the feature to it CMMD The weight is continuously updated with the iteration rounds, and λ is represented by the following formula: Among them, p represents the ratio of the current iteration round to the total iteration rounds; Confirming that the total training loss value does not converge, and reversely updating the neural network model according to the iteration progress parameter; The total training loss value is recalculated according to the new process prediction value generated by the updated neural network model until the total training loss value converges.

6. The method according to claim 1, wherein The signals include: vibration signal, force signal, spindle speed, feed speed and cutting depth.

7. A variable process milling roughness prediction system, comprising: Signal acquisition module, used to collect signals in variable process milling processing and construct data samples; A training module is used to input the data samples into a neural network model for iterative training to build a roughness prediction model; wherein the neural network model includes: a deep residual shrinkage network and a multi-representation domain adaptation network; A prediction module, configured to input the data to be measured during variable process milling into the roughness prediction model to generate a prediction value; Wherein, the training module includes: A data conversion module, configured to convert the data sample into a first feature according to the residual block and attention mechanism of the deep residual shrinkage network; a denoising module, configured to perform denoising and compression processing on the first feature according to a soft threshold function to generate a training feature; a feature extraction module, configured to divide the dataset consisting of the training features into a source domain dataset and a target domain dataset, and extract common underlying features of the source domain dataset and the target domain dataset; A mapping module, configured to map the common underlying features to m feature spaces according to the multi-representation domain adaptation network to generate migration features; A process prediction module, configured to integrate and reorganize the migration features, construct the neural network model and generate a process prediction value of roughness; The roughness prediction module is used to iteratively calculate the total training loss value according to the process prediction value and reversely update the neural network model until the total training loss value is trained and the updated neural network model after convergence is confirmed to be the roughness prediction model.

8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.