Grinding precision prediction method based on improved twin cross-shared network
By improving the twin cross-sharing network and clustering model, the problem that the twin network cannot be directly used for grinding processing accuracy prediction and convolutional neural network information loss is solved, and efficient prediction and control of grinding processing accuracy is achieved.
Patent Information
- Application Number
- CN202510068193.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-13
AI Technical Summary
In the prior art, twin networks cannot be directly used for grinding processing accuracy prediction, and there is a problem of information loss in convolutional neural networks.
The improved twin cross-sharing network is adopted to build cross-sharing networks and clustering models to extract data features and reduce dimensionality, solve the problem of information loss, and transform the similarity judgment into clustering category judgment to solve the problem of modeling difficulties.
The feature extraction capability of grinding processing data is improved, information loss is avoided, and effective prediction and control of grinding processing accuracy is achieved.
Smart Images

Figure CN119993325A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machining accuracy monitoring and optimization, and in particular to a grinding accuracy prediction method based on an improved twin cross-sharing network. Background Art
[0002] As the core equipment of modern precision manufacturing, CNC grinding machines play a vital role in improving the machining accuracy and production efficiency of workpieces. However, the complexity of the grinding process of complex parts determines that it is difficult to establish an accurate physical model for precision prediction, which makes it impossible to predict and control the grinding accuracy of workpieces. In recent years, the rapid development of artificial intelligence and deep learning technology has provided a solid theoretical support for the establishment of grinding accuracy prediction models. Deep learning modeling based on unbalanced small sample data is a difficult problem that needs to be solved urgently to achieve grinding accuracy prediction. As a small sample modeling method, twin networks are widely used in face recognition, image recognition and other fields. However, grinding data does not have the intuitive and scale-invariant characteristics of image data. It is relatively complex. The key features extracted from the same type of samples may not be completely equivalent, resulting in modeling difficulties. Therefore, twin networks cannot be directly used for grinding accuracy prediction. In addition, although convolutional neural networks are often used to extract data features, they only retain summary information such as the maximum value or average value in the pooling window, discard specific features and position information, and have the disadvantage of information loss. It cannot be used for key feature extraction of complex grinding data. Summary of the invention
[0003] In view of the shortcomings of the prior art, the present invention provides a grinding accuracy prediction method based on an improved twin cross-sharing network, which solves the problems in the prior art that the twin network cannot be directly used for grinding process accuracy prediction and that convolutional neural networks have data loss.
[0004] According to an embodiment of the present invention, a grinding accuracy prediction method based on an improved twin cross sharing network includes:
[0005] Constructing a cross-sharing network, obtaining training data, and using the training data to train the cross-sharing network to obtain an optimized cross-sharing network;
[0006] The training data is input into the optimized cross-sharing network, and the output results of the optimized cross-sharing network are clustered using a clustering model to obtain multiple accuracy categories, each of which contains qualified data or unqualified data;
[0007] The grinding processing data is obtained and input into the optimized cross-sharing network. The output results of the optimized cross-sharing network are clustered using a clustering model to obtain the corresponding accuracy category. The qualified or unqualified grinding processing data is judged according to the ratio of qualified data to unqualified data in the accuracy category.
[0008] Preferably, the cross-sharing network is composed of a plurality of end-to-end connected Part networks, and the Part networks are used to reduce the dimension of the data;
[0009] The method for reducing the dimension of data by the Part network includes:
[0010] Divide the input data into m segments of equal length;
[0011] Use m identical Block networks to extract features from each segmented data, and obtain m segmented feature data;
[0012] Each segmented feature data is divided equally, and according to the data position after the segmented feature data is divided equally, all the segmented feature data are cross-combined to obtain m cross-feature data;
[0013] All cross-feature data are added to obtain dimension-reduced data.
[0014] Preferably, the Block network includes three layers of one-dimensional convolutional networks, the input channel of the first layer of one-dimensional convolutional network is 1, the output channel is m, the input channel of the second layer of one-dimensional convolutional network is n, the output channel is n, and the input channel of the third layer of one-dimensional convolutional network is n, and the output channel is 1.
[0015] Preferably, each Part network has the same structure, but divides the input data into different numbers of segments.
[0016] Preferably, the training method of the cross-sharing network includes:
[0017] S1: Divide the training data into two groups and input them into two identical cross-sharing networks to obtain the first feature and the second feature respectively;
[0018] S2: After calculating the absolute difference between the first feature and the second feature, the absolute difference is input into a fully connected neural network for similarity determination, and the parameters of the cross-sharing network are adjusted according to the determination result;
[0019] S3: Repeat steps S1-S2 until the cross-sharing network converges to obtain an optimized cross-sharing network.
[0020] Preferably, before obtaining the accuracy category, centroid downsampling is also required;
[0021] Methods for centroid downsampling include:
[0022] A1: Based on the prediction accuracy of the optimized cross-sharing network, the Gray Wolf Algorithm is used to optimize the number of downsampling, learning rate, and batch size.
[0023] A2: Optimize the cross-sharing network to extract features from the training data according to the learning rate and batch size to obtain optimized feature data;
[0024] A3: The clustering model clusters the optimized feature data according to the number of downsampling, and calculates the prediction accuracy of the optimized cross-sharing network based on the clustering results;
[0025] A4: Repeat steps A1-A3 until the difference between the latest prediction accuracy and the previous prediction accuracy is less than 0.1 for multiple consecutive times or the maximum number of iterations is reached. Then the optimized cross-sharing network operates with the latest learning rate and batch size, and the clustering model operates with the latest number of downsampling.
[0026] Preferably, the value of the downsampling number is an odd number, that is, the number of training data in each precision category is an odd number.
[0027] Preferably, after the grinding process data are clustered, if all the precision categories to which they belong are qualified or unqualified, the grinding process data are directly judged as qualified or unqualified.
[0028] Preferably, after clustering the grinding processing data, if the accuracy category to which it belongs contains both qualified data and unqualified data, the number of qualified data and the number of unqualified data are compared. If the number of qualified data is greater than the number of unqualified data, the grinding processing data is judged to be qualified; if the number of qualified data is less than the number of unqualified data, the grinding processing data is judged to be unqualified.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] A cross-sharing network model is used to extract and downsample features from the data to solve the problem of information loss in convolutional neural networks. At the same time, a clustering model is used to convert the similarity judgment between the two data into a clustering category judgment that considers all training data, thereby converting the features of all data in different dimensions into features in the same dimension to solve the problem of modeling difficulties. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 4 is a diagram showing the architecture of the accuracy prediction method according to an embodiment of the present invention.
[0032] Figure 2 The figure is a data dimension reduction flowchart of the Part network according to an embodiment of the present invention.
[0033] Figure 3 This is a flow chart of centroid downsampling according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0035] like Figure 1 As shown, the embodiment of the present invention proposes a grinding accuracy prediction method based on an improved twin cross sharing network, comprising:
[0036] Constructing a cross-sharing network, obtaining training data, and using the training data to train the cross-sharing network to obtain an optimized cross-sharing network;
[0037] When 1D CNN (one-dimensional convolutional neural network) extracts features from complex data, it is necessary to build a multi-layer 1D CNN network, which requires a large amount of data and cannot be applied to feature extraction of a small number of samples; in addition, the pooling operation in 1D CNN has the disadvantage of information loss. When performing the pooling operation, 1D CNN only retains summary information such as the maximum value or average value within the pooling window, and discards other detailed information, causing the model to ignore some potentially important local features. At the same time, because only summary information is retained and specific features and location information are discarded, the model cannot capture the location information of the features, affecting the model's understanding and learning ability of the features.
[0038] Since the collected grinding data has the characteristics of small data volume but many feature points, it increases the difficulty of extracting data features, so 1D CNN is not competent. In view of the limitations and disadvantages of 1D CNN, this paper combines the periodicity of grinding data and proposes a new cross-sharing network (CSNet), which helps to reduce the relative complexity of data and improve the feature extraction capability. The framework of the cross-sharing network is as follows Figure 2 The cross-sharing network uses equal division and cross-combination of data to replace the pooling operation in 1D CNN, which improves the model's attention to all data information and locations.
[0039] The cross-sharing network is composed of multiple Part networks, each of which has the same structure but different parameters and the number of segments of input data. In the present invention, three Part networks are taken as an example to illustrate the Part network.
[0040] A single Part network includes data equal division, feature extraction of shared weights, cross combination and feature addition. The data is divided into multiple segments by integer division to ensure that the data can be equally divided. Considering the balance between the number of data features and the number of network parameters, in the present invention, the input data is divided into three segments of equal length as an example (in actual operation, more segmented data can be used as needed). The input data of the Part network is divided into three segments, and each segment is connected to a Block network to extract the features of the segmented data.
[0041] Since the time scale of each segmented data is different, the three Block networks can extract data features of different periods of the segmented data, which is beneficial to increasing the feature extraction ability of the network. The three Block networks share network parameters, which can reduce the number of network parameters. Each Block network includes three layers of one-dimensional convolutional networks. The input channel of the first layer of one-dimensional convolution is 1, and the output channel is n. The input channel of the second layer of one-dimensional convolution is n, and the output channel is n. The input channel of the third layer of one-dimensional convolution is n, and the output channel is 1. Through the same n-channel setting, these three layers of one-dimensional convolution can be combined together to form a Block network, and by changing the value of n, multiple Block networks can be freely combined to realize the feature extraction of complex one-dimensional data.
[0042] The features extracted from different periods by the three Block networks in each Part network will be divided equally again, and all segmented feature data will be cross-combined according to the data position of the segmented data after equal division. Finally, these three parts of the features will be added together to obtain the reduced dimension data of each Part network, reducing the dimension of the original data to 1 / 3 of the original. The Part network not only reduces the complexity of the data while ensuring that the data features are not lost, but also realizes the feature extraction and integration of the front, middle and back periods of the data, which helps to improve the feature extraction ability of the model.
[0043] Then, the training data is obtained and the cross-sharing network is trained using the training data to improve the performance of the cross-sharing network.
[0044] The collected training data (grinding data) is relatively complex and does not have the intuitive and scale-invariant characteristics of image data. The key features extracted from the same type of samples may not be completely equivalent. In addition, the structure of the ordinary twin network determines that when judging the sample, two training data need to be input for similarity judgment. This is inconsistent with only inputting one sample for quality feedback when predicting the grinding accuracy. Therefore, the twin network cannot be used directly to judge whether the grinding accuracy is qualified or not. Therefore, the present invention proposes an improved twin network, which introduces a clustering model to convert the similarity judgment between the two data into a clustering category judgment that considers all the training data, so that the features of all data in different dimensions are converted into features under the same dimension. In view of the category uncertainty of the twin network and the actual needs of grinding accuracy prediction, two completely identical cross-sharing networks are used for training, such as Figure 1 As shown in the second box from the left, the process of this training stage is consistent with that of the ordinary twin network.
[0045] First, the training data is divided into two groups and input into two identical cross-sharing networks respectively to obtain the first feature and the second feature respectively. Then, the absolute difference between the first feature and the second feature is calculated, and the absolute difference is input into the fully connected neural network for similarity judgment. Since the original similarity between the two training data can be known before the test, the parameters of the cross-sharing network can be adjusted according to the difference between the judgment result and the original similarity. Then, the above steps are repeated until the cross-sharing network converges to obtain the optimized cross-sharing network.
[0046] The training data is input into the optimized cross-sharing network, and the output results of the optimized cross-sharing network are clustered using a clustering model to obtain multiple accuracy categories, each of which contains qualified data or unqualified data;
[0047] See Figure 1 In the right half, the training data is input into the optimized cross-sharing network for feature extraction, and then the K-means clustering algorithm is used to classify the training data to obtain multiple accuracy categories. In the present invention, the final two accuracy categories are taken as an example. Since whether the training data is qualified is known before training, the two accuracy categories include the following two cases:
[0048] (1) The training data in accuracy category 1 are all qualified or unqualified, and the training data in accuracy category 2 are all unqualified or qualified.
[0049] (2) There are n qualified data and k unqualified data in the training data of accuracy category 1 and accuracy category 2.
[0050] In addition, in the grinding data, the data of qualified workpieces and unqualified workpieces are different, and the deviation is large, which is unbalanced data. Therefore, directly judging the number of n and k is likely to cause the prediction results to be biased towards qualified data with more data categories, resulting in loss of prediction accuracy. In order to ensure that the judgment is based on the same standard, the distance between each data in the two types of data and its centroid is calculated based on the centroid of the data, and the M data with the closest distance are selected to realize the centroid downsampling of unbalanced data. The gray wolf optimization algorithm is used to optimize the learning rate, batch size and number of M of the clustering algorithm of the cross-sharing network. The optimization process is as follows: Figure 3 shown.
[0051] Methods for centroid downsampling include:
[0052] A1: Based on the prediction accuracy of the optimized cross-sharing network, the Gray Wolf Algorithm is used to optimize the number of downsampling, learning rate, and batch size.
[0053] A2: Optimize the cross-sharing network to extract features from the training data according to the learning rate and batch size to obtain optimized feature data;
[0054] A3: The clustering model clusters the optimized feature data according to the number of downsampling, and calculates the prediction accuracy of the optimized cross-sharing network based on the clustering results;
[0055] A4: Repeat steps A1-A3 until the difference between the latest prediction accuracy and the previous prediction accuracy is less than 0.1 for multiple consecutive times or the maximum number of iterations is reached. Then the optimized cross-sharing network operates with the latest learning rate and batch size, and the clustering model operates with the latest number of downsampling.
[0056] In this way, a large amount of data can be reduced to M representative data, and then clustering is performed to avoid loss of prediction accuracy. At the same time, in order to avoid the same number of qualified data and unqualified data in one accuracy category as much as possible, the value of the downsampling number is set to an odd number, that is, the number of training data in each accuracy category is an odd number.
[0057] The grinding processing data is obtained and input into the optimized cross-sharing network. The output results of the optimized cross-sharing network are clustered using a clustering model to obtain the corresponding accuracy category. The qualified or unqualified grinding processing data is judged according to the ratio of qualified data to unqualified data in the accuracy category.
[0058] Grinding processing data is obtained. For any grinding processing data, after optimizing the cross-sharing network, the clustering algorithm is used to obtain the corresponding accuracy category, so as to convert the similarity judgment between the two data into a clustering category judgment considering all the training data.
[0059] Suppose the number of qualified data in the precision category is the above-mentioned case (1), and the grinding process data belongs to precision category 1 (or precision category 2) according to the precision category it belongs to. Then, if all the data in precision category 1 (or precision category 2) are qualified, the grinding process data is qualified; if all the data in precision category 1 (or precision category 2) are unqualified, the grinding process data is unqualified.
[0060] Suppose the number of qualified data in the precision category is the above-mentioned case (2), and the grinding process data belongs to precision category 1 (or precision category 2) according to the precision category it belongs to. Then, if the number of qualified data in precision category 1 (or precision category 2) is greater than the number of unqualified data (n>k), the grinding process data is qualified; if the number of qualified data in precision category 1 (or precision category 2) is less than the number of unqualified data (n<k), the grinding process data is unqualified.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.
Claims
1. A grinding accuracy prediction method based on an improved twin cross-sharing network, characterized in that: include: Constructing a cross-sharing network, obtaining training data, and using the training data to train the cross-sharing network to obtain an optimized cross-sharing network; The training data is input into the optimized cross-sharing network, and the output results of the optimized cross-sharing network are clustered using a clustering model to obtain multiple accuracy categories, each of which contains qualified data or unqualified data; The grinding processing data is obtained and input into the optimized cross-sharing network. The output results of the optimized cross-sharing network are clustered using a clustering model to obtain the corresponding accuracy category. The qualified or unqualified grinding processing data is judged according to the ratio of qualified data to unqualified data in the accuracy category.
2. The grinding accuracy prediction method based on the improved twin cross sharing network according to claim 1, characterized in that: The cross-sharing network consists of multiple Part networks connected end to end, and the Part network is used to reduce the dimension of the data; The method for reducing the dimension of data by the Part network includes: Divide the input data into m segments of equal length; Use m identical Block networks to extract features from each segmented data, and obtain m segmented feature data; Each segmented feature data is divided equally, and according to the data position after the segmented feature data is divided equally, all the segmented feature data are cross-combined to obtain m cross-feature data; All cross-feature data are added to obtain dimension-reduced data.
3. The grinding accuracy prediction method based on the improved twin cross sharing network as claimed in claim 2 is characterized by: The Block network includes three layers of one-dimensional convolutional networks, the input channel of the first layer of one-dimensional convolutional network is 1, the output channel is m, the input channel of the second layer of one-dimensional convolutional network is n, the output channel is n, and the input channel of the third layer of one-dimensional convolutional network is n, and the output channel is 1.
4. The grinding accuracy prediction method based on the improved twin cross sharing network as claimed in claim 2 is characterized by: The structure of each Part network is the same, but the number of segments of the input data is different.
5. The grinding accuracy prediction method based on the improved twin cross sharing network according to claim 1, characterized in that: The training methods of the cross-sharing network include: S1: Divide the training data into two groups and input them into two identical cross-sharing networks to obtain the first feature and the second feature respectively; S2: After calculating the absolute difference between the first feature and the second feature, the absolute difference is input into a fully connected neural network for similarity determination, and the parameters of the cross-sharing network are adjusted according to the determination result; S3: Repeat steps S1-S2 until the cross-sharing network converges to obtain an optimized cross-sharing network.
6. The grinding accuracy prediction method based on the improved twin cross sharing network according to claim 1, characterized in that: Before obtaining the accuracy category, centroid downsampling is required; Methods for centroid downsampling include: A1: Based on the prediction accuracy of the optimized cross-sharing network, the Gray Wolf Algorithm is used to optimize the number of downsampling, learning rate, and batch size. A2: Optimize the cross-sharing network to extract features from the training data according to the learning rate and batch size to obtain optimized feature data; A3: The clustering model clusters the optimized feature data according to the number of downsampling, and calculates the prediction accuracy of the optimized cross-sharing network based on the clustering results; A4: Repeat steps A1-A3 until the difference between the latest prediction accuracy and the previous prediction accuracy is less than 0.1 for multiple consecutive times or the maximum number of iterations is reached. Then the optimized cross-sharing network operates with the latest learning rate and batch size, and the clustering model operates with the latest number of downsampling.
7. The grinding accuracy prediction method based on the improved twin cross sharing network as claimed in claim 6 is characterized by: The value of the downsampling number is an odd number, that is, the number of training data in each precision category is an odd number.
8. The grinding accuracy prediction method based on the improved twin cross sharing network as claimed in claim 1, characterized in that: After the grinding processing data are clustered, if all the precision categories to which they belong are qualified or unqualified, the grinding processing data are directly judged as qualified or unqualified.
9. The grinding accuracy prediction method based on the improved twin cross sharing network as claimed in claim 8, characterized in that: After clustering the grinding data, if the accuracy category to which it belongs contains both qualified data and unqualified data, the number of qualified data and the number of unqualified data are compared. If the number of qualified data is greater than the number of unqualified data, the grinding data is judged to be qualified; if the number of qualified data is less than the number of unqualified data, the grinding data is judged to be unqualified.