Injection molding machine multi-parameter recommendation method based on bert architecture and neural network
Patent Information
- Application Number
- CN202410808762.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-06-21
AI Technical Summary
[0006]这两种方法的弊端在于:主要依赖相似性或匹配程度进行推荐,只能大致衡量特征之间的相关性,而不能提供精确的参数推荐,这些方法难以对具体的应用场景进行精确的参数优化,无法推荐出最优的具体参数设置
Smart Images

Figure CN118798264B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of parameter recommendation, specifically relating to a multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks. Background Technology
[0002] In the early stages of development, multi-parameter recommendation systems generally adopt rule-based or manually defined methods. These methods rely on predefined rules and features, and have limited personalization of recommendations.
[0003] Currently, common recommendation methods are scientific computing methods, such as the test case recommendation method, electronic device, and storage medium based on a pre-trained model described in patent number CN117093501A. This method includes the following steps: collecting functional requirement samples and test strategy samples; constructing a test strategy model, preprocessing the test strategy samples, and inputting them into branch 1 of the test strategy feature pre-training model to extract test strategy features; constructing a functional requirement information model, preprocessing functional requirement samples, and inputting them into branch 2 of the test strategy feature pre-training model to extract functional requirement features; integrating branches 1 and 2 of the test strategy feature pre-training model, inputting the preprocessed test strategy samples and functional requirement samples, extracting features, and calculating the matching degree; ranking the test strategy information according to the matching degree; and constructing a test case pre-training model, inputting the ranked test strategy information and preprocessed functional requirement samples, and outputting recommended test case step information.
[0004] For example, the information recommendation method and device based on a multimodal pre-trained model described in patent number CN115964560A includes the following steps: performing multimodal encoding on the information to be recommended and historical click information to obtain text and image representation vectors; inputting these vectors into a cross-modal attention network to calculate the user vector representation; combining the representation vector of the information to be recommended with the user vector to calculate the relevance score; and sorting the information according to the relevance score, prioritizing the recommendation of information with high scores.
[0005] These two patents can be summarized into four steps: 1. Collecting and preprocessing sample data; 2. Extracting feature representations; 3. Calculating the matching or correlation between features; 4. Ranking and recommending information based on the matching or correlation scores.
[0006] The drawbacks of these two methods are that they mainly rely on similarity or matching degree for recommendations, which can only roughly measure the correlation between features and cannot provide accurate parameter recommendations. These methods are difficult to optimize parameters accurately for specific application scenarios and cannot recommend the optimal specific parameter settings.
[0007] Therefore, it is crucial to design a multi-parameter recommendation method that can provide accurate parameter recommendations, optimize parameters for specific application scenarios, and recommend the optimal parameter settings. Summary of the Invention
[0008] The technical problem to be solved by this invention is to provide a multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks.
[0009] To solve the above-mentioned technical problems, the technical solution adopted by this invention is: a multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks, specifically including the following steps: Step S1, collecting parameter data from at least one data source as initial data X, and cleaning and preprocessing the initial data X to obtain data X′; Step S2, clustering the data X′, assigning task labels and standard labels to obtain dataset C; Step S3, performing one-hot encoding on the data in the training set of dataset C and the task labels to obtain the feature encoding H of the task labels. i and the feature encoding of data E i Step S4: Construct a multi-parameter recommendation model including a pre-trained model based on the BERT architecture and a neural network model; Step S5: Concatenate task labels and data features, perform masking, and then input them into the pre-trained model to obtain specific parameter features. i This reverses the process to optimize a multi-parameter recommendation model, while also incorporating specific parameter features. i and the feature encoding of data E i In step S6, the multi-parameter recommendation model is trained by inputting the neural network model; the test set of dataset C containing task labels is input into the trained and optimized multi-parameter recommendation model. The pre-trained model obtains specific parameter features based on the task labels, and the multi-parameter recommendation model pushes corresponding parameter recommendations.
[0010] In some implementations, step S5 specifically includes: step S51, concatenating the task label and data features to generate the concatenated result as the original input embedding. i Step S52: Embedding the original input. i Some data features are masked, and the masked elements are replaced with [MASK] to generate the masked input embedding. i masked Input Embedding i masked =masked(InputEmbedding) iStep S53: Embed the mask input into Input Embedding. i masked The input is fed into a pre-trained model for multi-parameter recommendation, and the output is a feature with specific parameters. i The formula is Step S54: Calculate the task label prediction loss L using the cross-entropy loss function. task This refers to the difference between the predicted task label and the actual task label. in From Feature i Extract the predicted value of the task label from T. i Let N be the true value of the task label and N be the number of samples; calculate the loss L for data feature prediction using the mean squared error loss function. feature That is, the gap between predicted features and true features: in, From Feature i The feature prediction values of the mask portion extracted from it. The masked portion contains the true feature values; in step S55, joint training is employed to simultaneously optimize task label prediction and data feature prediction, combined with L... task and L feature Optimize by summing the weights and calculate the total loss L. total The formula is L total =λ task L task +λ feature L feature , where λ task and λ feature These are the two loss weight parameters, and the pre-trained model is optimized using the backpropagation algorithm; Step S56, the obtained specific parameter features are... i and the feature encoding of data E i The features are input into the neural network model, i.e., Input to NN = [Feature] i E i This enables the training of a multi-parameter recommendation model.
[0011] In some implementations, the original input is embedded in the Input Embedding. i Including TokenEmbeddings, Segment Embeddings and Position Embeddings, namely Input Embedding i =TokenEmbeddings i +SegmentEmbeddings i+PositionEmbeddings i Where, Token Embeddings represent each token in the input sequence, which consists of task labels and data features, as shown in the formula: Among them, H i E is the feature encoding for task labels. i Encoding the features of the data, This represents the concatenation operation; Segment Embeddings are used to distinguish between task labels and data features, and the formula is: Where A represents the task label part, B represents the data feature part, k is the number of task labels, and d is the dimension of the data feature; Position Embeddings are used to represent the position of each label in the input sequence, using fixed-length position encoding. For an input sequence of length (k+d), the Position Embeddings of the corresponding length are Position Embeddings. i =Embedding([0,1,2,…,k-1+d).
[0012] In some implementations, step S7 is further included, which compares the predicted parameter recommendations with standard labels to obtain the prediction accuracy. Where TP represents the number of true positives, TN represents the number of true negatives, FP represents the number of false positives, and FN represents the number of false negatives.
[0013] In step S2, the data X′ is clustered, and X′={x′ (1) ,x′ (2) ,...,x′ (N)}, where N is the number of mold samples, resulting in dataset C. The formula is C = HierarchicalClustering(X′), where C is the cluster of each element in dataset C. i Assign a task label T i And a standard label Y i T i ={t1,t2,...,t k}, k is the number of task labels, task labels are used to identify the type of each task, and standard labels are used to determine whether the data is standard data. The dataset C is represented as C = {(C i ,t k ,Y i )}, where i represents the i-th mold, Y i It is a standard label, Y i =0 indicates non-standard data, Y i=1 indicates standard data.
[0014] In some implementations, in step S3, the task labels in the dataset C are encoded using a one-hot function, with the formula: One-Hot(T i The encoded task label is obtained as follows: ) = [0,0,...,1,...,0] Only one element is 1, and the others are 0. The position of 1 represents the index position of the input task label. The dataset C after one-hot encoding is padded or cropped to the same size to obtain the feature encoding of the data. i E i =Encode(C i ).
[0015] In some embodiments, the parameter data is injection molding machine mold parameter data, and the task tags have 30 items, namely injection volume, mold opening and closing action and distance, drying temperature, plasticizing temperature, pressure oil temperature, mold clamping pressure, mold temperature, screw injection endpoint, screw speed, heating coil temperature gradient, back pressure value, injection pressure value, injection stroke, multi-stage injection parameters, initial holding pressure value, injection speed, nozzle pressure, holding pressure, holding time, cooling time, mold opening time, gradually increasing injection volume, mold opening stroke, demolding stroke, demolding start position, mold opening speed, injection volume, increasing holding pressure, shortest holding time and shortest continuous cooling time.
[0016] In some implementations, the dataset C is divided into a training set and a test set, wherein the training set accounts for 80% of the total number of samples and the test set accounts for 20% of the total number of samples.
[0017] The scope of this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but also includes other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in this application.
[0018] Due to the application of the above technical solution, the present invention has the following advantages compared with the prior art:
[0019] 1. The multi-parameter recommendation model provided by this invention includes a pre-trained model based on the BERT architecture and a neural network model, which can achieve simultaneous learning and reasoning on multiple tasks and can recommend parameters with high accuracy.
[0020] 2. Using pre-trained models can make full use of large-scale data for pre-training, capturing complex features and relationships in the data, and improving the accuracy of recommendations;
[0021] 3. It can provide more accurate parameter settings based on historical data and task tags, reducing debugging time and material waste. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the process of the present invention;
[0023] Figure 2 This is a schematic diagram of the structure of a pre-trained model based on the BERT architecture. Detailed Implementation
[0024] The present invention will now be described in detail with reference to the accompanying drawings.
[0025] As attached Figure 1 The following is a detailed step-by-step guide to a multi-parameter recommendation method for injection molding machines based on the BERT architecture and neural networks.
[0026] Step S1: Collect parameter data from multiple data sources, including databases, network APIs, log files, etc., as initial data X, denoted as X = {x} (1) ,x (2) ,...,x (N)}, where i = 1, 2, ..., N, x (i) This is the i-th parameter data sample, where N is the number of data samples. In this embodiment, N is the number of molds. The data includes different types such as text, images, and time series. The initial data X contains 5450 molds, each mold has 30 first-piece forming parameters, where x... (i) This is the parameter vector of the i-th mold. The initial data X is cleaned and preprocessed, such as filling missing values by averaging, to obtain data X′, denoted as X′={x′ (1) ,x′ (2) ,...,x′ (N)}
[0027] Step S2: Clustering algorithms such as K-means clustering and hierarchical clustering are used to cluster the data X′ into different clusters to obtain dataset C. In this embodiment, hierarchical clustering is used, with the formula C = HierarchicalClustering(X′), and each element in dataset C is assigned to a cluster C0. i Assign a task label T i Task labels are used to identify the type of each task, and standard labels are used to determine whether the data is standard data. i ={t1,t2,...,t k}, where k is the number of task labels. In this embodiment, k = 30. The resulting dataset C is represented as C = {(C i ,t k ,Y i)}, where i represents the i-th mold, Y i It is a standard label, Y i =0 indicates non-standard data, Y i =1 indicates standard data.
[0028] In this embodiment, the 30 task labels are injection volume, mold opening and closing and ejection actions and distances, drying temperature, plasticizing temperature, pressure oil temperature, mold clamping pressure, mold temperature, screw injection endpoint, screw speed, heating coil temperature gradient, back pressure value, injection pressure value, injection stroke, multi-stage injection parameters, initial holding pressure value, injection speed, nozzle pressure, holding pressure, holding time, cooling time, mold opening time, gradually increasing injection volume, mold opening stroke, demolding stroke, demolding start position, mold opening speed, injection volume, increasing holding pressure, shortest holding time and shortest continuous cooling time.
[0029] Step S3: Use the one-hot function to perform one-hot encoding on the data in the training set of the dataset C and the task labels, with the formula: One-Hot(T i The task label is defined as [0,0,...,1,...,0]. The one-hot encoding function converts the task label into a one-hot encoded vector to represent the task type, resulting in the encoded task label. Only one element is 1, and the others are 0. The position of 1 represents the index position of the input task label. The encoded task label is padded or cropped to the same size to obtain the feature encoding H of the task label. i and the feature encoding of data E i Data feature encoding E i It is the data C i The formula obtained using the standardization method is E. i =Encode(C i ).
[0030] Step S4: Construct a multi-parameter recommendation model including a pre-trained model and a neural network model, wherein the pre-trained model is as follows: Figure 2 The BERT model shown is a pre-trained model that can associate the task labels with the data features.
[0031] Step S5: Concatenate the task labels and data features to generate the original input embedding. Perform masking on the original input embedding to obtain the masked input embedding. Input the masked input embedding into the pre-trained model to obtain the corresponding specific parameter features. i And through the specific parameter feature i The multi-parameter recommendation model is optimized, and the resulting specific parameter features are...i and the feature encoding of data E i Input into the neural network model to train a multi-parameter recommendation model.
[0032] Step S5 is explained in detail below.
[0033] Step S51: Concatenate the task labels and data features to generate the concatenated result, which is the original input embedding. i Original input embedding i Including Token Embeddings, SegmentEmbeddings and Position Embeddings, namely Input Embedding i =TokenEmbeddings i +SegmentEmbeddings i +PositionEmbeddings i Where, Token Embeddings represent each token in the input sequence, which consists of task labels and data features, as shown in the formula: Among them, H i E is the feature encoding for task labels. i Encoding the features of the data, This represents the concatenation operation; Segment Embeddings are used to distinguish between task labels and data features, and the formula is: Where A represents the task label part, B represents the data feature part, k is the number of task labels (in this embodiment, k = 30), and d is the dimension of the data feature; PositionEmbeddings is used to represent the position of each label in the input sequence, using fixed-length position encoding. For an input sequence of length (k+d), the corresponding length of PositionEmbeddings is PositionEmbeddings. i =Embedding([0,1,2,…,k-1+d]).
[0034] Step S52, embed Input Embedding into the original input. i Some data features are masked, and the masked elements are replaced with [MASK] to generate the masked input embedding. i masked InputEmbedding i masked=masked(Input Embedding) i ).
[0035] Step S53: Embed the mask input into Input Embedding i masked Inputting the data into a pre-trained multi-parameter recommendation model yields the model's output, i.e., the feature for specific parameters. i The formula is
[0036] Step S54 actually includes two pre-training tasks: task label prediction and data feature prediction. The two pre-training tasks are explained in detail below.
[0037] (1) Task label prediction task: The goal of task label prediction is to enable the pre-trained model to predict the corresponding task label based on the input task features. This pre-training task helps the pre-trained model understand the relationship between task labels and data features.
[0038] This task uses the cross-entropy loss function to calculate the loss L for task label prediction. task This refers to the difference between the predicted task label and the actual task label. in From Feature i Extract the predicted value of the task label from T. i is the true value of the task label, and N is the number of samples.
[0039] (2) Data feature prediction task: The goal of data feature prediction is to enable the model to predict the remaining features from the task label and some data features. This pre-training task can help the pre-trained model understand the relationship between data features.
[0040] This task uses the mean squared error loss function to calculate the loss L for data feature prediction. feature That is, the gap between predicted features and true features: in, From Feature i The feature prediction values of the mask portion extracted from it. The masked part represents the true value of the feature. In order to predict the feature, a masking strategy is adopted.
[0041] Step S55: Joint training is employed to simultaneously optimize task label prediction and data feature prediction, combined with L... task and L feature Optimize by summing the weights and calculate the total loss L. total The formula is L total =λ task L task +λfeature L feature , where λ task and λ feature These are the weight parameters of the two losses, used to balance the importance of the two tasks. The pre-trained model is optimized using the backpropagation algorithm, enabling the model to effectively learn the complex relationship between task labels and data features.
[0042] Step S56, obtain the specific parameter features. i and the feature encoding of data E i The features are input into the neural network model, i.e., Input to NN = [Feature] i E i This implements the training of a multi-parameter recommendation model, using the cross-entropy loss function during training. in, It is the standard label for prediction, Y i These are real standard labels, used to evaluate the accuracy of model predictions, and the error between predicted and true values is used to guide the optimization of model parameters.
[0043] Step S6: Input the test set of the dataset C containing task labels into the trained and optimized multi-parameter recommendation model. The task labels are selected from 30 task labels using the clustering algorithm in step S2. The pre-trained model obtains specific parameter features based on the task labels, and the multi-parameter recommendation model pushes corresponding parameter recommendations.
[0044] Based on the correlations between learning tasks and the patterns of data, the trained model is used to predict the test set data to determine whether it represents standard injection molding parameters. The model's performance is measured by comparing the prediction results with the standard labels to obtain the prediction accuracy. In this embodiment, the dataset C is divided into a training set and a test set, where the training set accounts for 80% of the total samples and the test set accounts for 20% of the total samples. The specific division is shown in the table below:
[0045] Number of molds First piece forming parameters train 4360 30 test 1090 30 sum 5450 30
[0046] That is, the dataset C is divided into a training set and a test set in an 8:2 ratio to test the performance of the optimized model.
[0047] Step S7: Compare the prediction results with the standard labels to obtain the prediction accuracy, as shown in the table below:
[0048] Should a pre-trained model with multi-parameter recommendation be used? Accuracy Do not use pre-trained models 0.9015 Using pre-trained models 0.9422
[0049] Where TP represents the number of true positives, TN represents the number of true negatives, FP represents the number of false positives, and FN represents the number of false negatives.
[0050] It can be seen that the pre-trained model of multi-parameter recommendation can greatly improve the accuracy of parameter prediction, which indicates that the pre-trained model of multi-parameter recommendation can play the role of pushing corresponding parameter recommendations.
[0051] This invention provides a multi-parameter recommendation method based on a pre-trained model. It designs a pre-trained model and a neural network model based on the BERT architecture for multi-parameter recommendation, enabling simultaneous learning and inference on multiple tasks and providing accurate recommendation parameters. Based on the pre-trained model, it can fully utilize large-scale data for pre-training, capturing complex features and relationships within the data to improve recommendation accuracy. It can provide more precise parameter settings based on historical data and task labels, reducing debugging time and material waste. The model used in this invention is an end-to-end network. Compared with other existing technologies, this model can predict multiple tasks with high accuracy.
[0052] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks, characterized in that: Specifically, the following steps are included: Step S1: Collect parameter data from at least one data source as initial data X, and clean and preprocess the initial data X to obtain data X'; Step S2: Cluster the data X', assign task labels and standard labels, and obtain dataset C; Step S3: Perform one-hot encoding on the data in the training set of the dataset C and the task labels to obtain the feature encoding H of the task labels. i and the feature encoding of data E i ; Step S4: Construct a multi-parameter recommendation model that includes a pre-trained model based on the BERT architecture and a neural network model; Step S5: Concatenate task labels and data features, perform masking, and then input them into the pre-trained model to obtain specific parameter features. i This reverses the process to optimize a multi-parameter recommendation model, while also incorporating specific parameter features. i and the feature encoding of data E i In the input neural network model, the training of a multi-parameter recommendation model is implemented. The specific steps include: Step S51, concatenating the task labels and data features to generate the concatenated result as the original input embedding. ; Step S52, embedding the original input Partial data features are masked, and the masked elements are replaced with [MASK] to generate the masked input embedding. , ); Step S53, embed the mask input The input is fed into a pre-trained model for multi-parameter recommendation, and the output is a feature with specific parameters. i The formula is ; Step S54: Calculate the loss for task label prediction using the cross-entropy loss function. This refers to the difference between the predicted task label and the actual task label. ,in From Feature i Extract the predicted values of the task labels from them. The true values of the task labels are given, and N is the number of samples; the loss for data feature prediction is calculated using the mean squared error loss function. That is, the gap between predicted features and true features: ,in, From Feature i The feature prediction values of the mask portion extracted from it. The true value of the feature in the masked part; Step S55 involves joint training, simultaneously optimizing task label prediction and data feature prediction, combining... and Optimize by summing the weights and calculate the total loss. The formula is ,in, and These are the weight parameters of the two losses, and the pre-trained model is optimized using the backpropagation algorithm; Step S56, obtain the specific parameter features. i and the feature encoding of data E i They are input into the neural network model together, that is To enable the training of a multi-parameter recommendation model; Step S6: Input the test set of the dataset C containing task labels into the trained and optimized multi-parameter recommendation model. The pre-trained model obtains specific parameter features based on the task labels, and the multi-parameter recommendation model pushes the corresponding parameter recommendations.
2. The multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks according to claim 1, characterized in that: The original input embedding This includes Token Embeddings, Segment Embeddings, and Position Embeddings, namely... Where, Token Embeddings represent each token in the input sequence, which consists of task labels and data features, as shown in the formula: , where H i E is the feature encoding for task labels. i Encoding the features of the data, This represents the concatenation operation; Segment Embeddings are used to distinguish between task labels and data features, and the formula is: Where A represents the task label part, B represents the data feature part, k is the number of task labels, and d is the dimension of the data feature; Position Embeddings are used to represent the position of each label in the input sequence, using fixed-length position encoding. For an input sequence of length (k+d), the corresponding Position Embeddings are: .
3. The multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks according to claim 1, characterized in that: It also includes step S7, which compares the predicted parameter recommendations with the standard labels to obtain the prediction accuracy. , , where TP represents the number of true positives, TN represents the number of true negatives, FP represents the number of false positives, and FN represents the number of false negatives.
4. The multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks according to claim 1, characterized in that: In step S2, the data is clustered. N is the number of mold samples, resulting in the dataset. The formula is For dataset Each element in the cluster Assign a task tag and a standard label , k represents the number of task labels, which are used to identify the type of each task. Standard labels are used to determine whether the data is standard data. The dataset C is represented as... Where i represents the i-th mold, It is a standard label. =0 indicates non-standard data. =1 indicates standard data.
5. The multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks according to claim 4, characterized in that: In step S3, the task labels in the dataset C are encoded using a one-hot function, with the following formula: The encoded task label is Only one element in the dataset is 1, and the others are 0. The position of 1 represents the index position corresponding to the input task label. The dataset C after one-hot encoding is padded or cropped to the same size to obtain the feature encoding of the data. i , .
6. The multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks according to claim 1, characterized in that: The parameter data refers to the injection molding machine mold parameter data. The task tags have 30 items, namely injection volume, mold opening and closing action and distance, drying temperature, plasticizing temperature, pressure oil temperature, mold clamping pressure, mold temperature, screw injection endpoint, screw speed, heating coil temperature gradient, back pressure value, injection pressure value, injection stroke, multi-stage injection parameters, initial holding pressure value, injection speed, nozzle pressure, holding pressure, holding time, cooling time, mold opening time, gradually increasing injection volume, mold opening stroke, demolding stroke, demolding start position, mold opening speed, injection volume, increasing holding pressure, shortest holding time and shortest continuous cooling time.
7. The multi-parameter recommendation method for injection molding machines based on BERT architecture and neural networks according to claim 1, characterized in that: The dataset The dataset is divided into a training set and a test set, with the training set accounting for 80% of the total samples and the test set accounting for 20%.
Citation Information
Patent Citations
Test case recommendation method based on pre-training model, electronic equipment and storage medium
CN117093501A
A twin network model training method, a twin network model measuring method, a twin network model training device, a twin network model measuring device, a medium and equipment
CN112784130A
Imbalanced judicial judgment document data-oriented law article recommendation method and system
CN114610891A
