A multidimensional data prediction method and system for discrete manufacturing workshops
Through the combination of DBSCAN and Apriori algorithms, a knowledge network is built and the DMTLBO-BP network model is initialized, which solves the problems of high computing cost and low information mining efficiency in high-dimensional data processing in discrete manufacturing workshops, and realizes efficient multi-dimensional data prediction.
Patent Information
- Application Number
- CN202411441286.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The prior art is very cost-effective when processing high-dimensional data of discrete manufacturing workshops and it is difficult to efficiently mine valuable information.
Data clustering is used by DBSCAN algorithm, qualitative cognition is established in combination with Apriori algorithm, knowledge network is built, DMTLBO-BP network model is initialized, and the final prediction model is obtained through iterative optimization.
It reduces calculation costs, improves the mining efficiency of multi-dimensional data, and can effectively predict product quality, equipment energy consumption and operating costs in discrete manufacturing workshops.
Smart Images

Figure CN118966472B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a data prediction method and system, and in particular to a multidimensional data prediction method and system for a discrete manufacturing workshop. Background Art
[0002] At present, most manufacturing companies have completed the exploration from manual management mode to information management mode, and have accumulated massive processing, quality, equipment, personnel and other related data in the manufacturing process. Faced with the continuously generated high-dimensional manufacturing data, how to mine valuable information from it and provide correct guidance for daily production in the manufacturing industry to reduce quality, energy consumption and operating costs in the manufacturing process and improve production efficiency has become an urgent problem to be solved.
[0003] Especially in the discrete manufacturing industry, its business scenarios are complex and diverse, the production processes and methods are changeable, and the data generated in the production process is large in volume and high in dimension. At present, most of the ways to mine useful information are to directly use deep learning methods to build neural network models and predict production factors, but high-dimensional data will lead to redundant network nodes, which increases the computing cost. Summary of the invention
[0004] Purpose of the invention: The first purpose of the present invention is to provide a multidimensional data prediction method for discrete manufacturing workshops that can reduce computing costs and efficiently mine valuable information.
[0005] The second object of the present invention is to provide a multi-dimensional data prediction system for a discrete manufacturing workshop.
[0006] Technical solution: The present invention discloses a method for predicting multidimensional data of a discrete manufacturing workshop, comprising the following steps:
[0007] S1: Collect and clean the original data of discrete manufacturing to obtain the original data set; the original data includes product quality index data, equipment energy consumption index data, and operating cost data in the discrete manufacturing process;
[0008] S2: Use the DBSCAN algorithm to cluster the original data set, obtain multiple data clusters, and establish corresponding labels for the data clusters;
[0009] S3: Establish qualitative cognition and use the Apriori algorithm to search for the association between each label, and there are two or more related labels that constitute a piece of data knowledge;
[0010] S4: Delete all redundant data in the data knowledge, extract the associations between each piece of data knowledge and construct a knowledge network to complete qualitative cognition;
[0011] S5: traverse each piece of data knowledge contained in the knowledge network in step S4, obtain the original data cleaned in step S1 corresponding to the label contained in the data knowledge, and use this part of the original data as a performance indicator sample;
[0012] S6: Using the DMTLBO-BP network model, construct the original BP network structure, initialize the weight of the BP network structure according to the performance index sample, and obtain the initial model;
[0013] S7: train the initial model and update the weight of the initial model to obtain the final prediction model;
[0014] S8: Obtain performance indicator samples corresponding to the original data of discrete manufacturing to be processed, input the samples into the prediction model, and the prediction model outputs the prediction results.
[0015] Furthermore, the BP network structure in step S6 includes an input layer, two hidden layers and an output layer, wherein the number of neurons in the input layer is N. m , and N m The total number of data knowledge obtained in step S3 is equal to the number of neurons in hidden layer 1. i , the number of neurons in hidden layer 2 is N k , the number of neurons in the output layer is N j , and N j The number of conclusions obtained by associating with the Apriori algorithm in step S3 is the same.
[0016] Furthermore, in step S6, the steps of initializing the weights of the BP network structure according to the performance indicator samples are as follows:
[0017] S6-1: Use real number coding to encode the performance indicator samples to obtain a coding array; the coding formula is as follows:
[0018] ; Where L is the code length;
[0019] S6-2: Define the encoding array as a class group, determine the class group size as L, and the number of iterations as a;
[0020] S6-3: Randomly divide the class into b groups, and select the individual with the best fitness in each group as the teacher, and define fitness as the score;
[0021] S6-4: Use the achievement differences between teachers and students in the class group to enable teachers to impart knowledge to students;
[0022] S6-5: Calculate the average scores of b groups, define the top half of the students in each group as excellent students, and the rest as poor students;
[0023] S6-6: Implement self-learning strategies for good students and mutual learning strategies for poor students;
[0024] S6-7: Each group conducts collaborative communication optimization, and selects the top k best individuals in the group to replace the last k worst individuals in the group according to their scores. This process is repeated h times until the difference between the current score of each group and the score of the previous iteration is less than the preset value. The calculation formula for k is:
[0025] ;
[0026] Where Gen represents the current number of iterations, and C is a constant;
[0027] S6-8: Repeat S6-4 to S6-7 until it is iterated a times;
[0028] S6-9: Find the individual with the best performance in the class group. The encoding of this individual is the initial weight of the BP network structure.
[0029] Furthermore, the fitness calculation formula in step S6-3 is:
[0030] , where N i is the number of neurons in the output layer, d q is the expected output of the kth neuron in the output layer, y q is the actual output of the kth neuron in the output layer.
[0031] Furthermore, the calculation formula for imparting knowledge in step S6-4 is: where r i =rand(0,1) represents the learning step, TF=[1+rand(0,1)] represents the teaching factor, M taecher Indicates teacher performance, M mean Indicates contemporary achievements;
[0032] Students according to D M-style approach to teachers, in represents the performance of the i-th generation student j after teaching, X i,j It represents the performance of student j of the i-th generation before teaching.
[0033] Furthermore, the mutual learning strategy of the eugenics in step S6-6 means that the eugenics conducts N times of in-depth exploration on itself, and the calculation formula of the number of explorations N is as follows:
[0034] ; where F i represents the score of the i-th individual in the group; F max Indicates the best score in the group, Fmin Indicates the worst result in the group; UL is the upper limit of the number of explorations, which can be set according to the actual situation; LL is the lower limit of the number of explorations, which can be set according to the actual situation;
[0035] The mutual learning strategy for poor students means that poor students learn from other better individuals through mutual learning between groups. p Randomly select x that is better than q To learn, the learning formula is as follows:
[0036] ;in Represents individual x p After teaching, the results Represents individual x p In the pre-teaching grades, Better than If yes, accept the new individual, otherwise keep the old one.
[0037] Furthermore, in step S7, the initial model is trained and the weight of the initial model is updated to obtain the final prediction model, which includes the following steps:
[0038] S7-1: Calculate the input value of the hidden layer 1 of the BP network structure;
[0039] S7-2: Calculate the output value of hidden layer 1 according to the input value of hidden layer 1;
[0040] S7-3: Calculate the input value of hidden layer 2 according to the output value of hidden layer 1;
[0041] S7-4: Calculate the output value of hidden layer 2 according to the input value of hidden layer 2;
[0042] S7-5: Calculate the input value of the output layer according to the output value of the hidden layer 2;
[0043] S7-6: Calculate the output value of the output layer according to the input value of the output layer;
[0044] S7-7: Calculate the back propagation error of the BP network structure according to the output value of the output layer;
[0045] S7-8: Update the weight value of the BP network structure according to the back propagation error;
[0046] S7-9: Set the number of iterations of the weight value of the BP network structure. If the number of iterations is not reached, repeat steps S7-1 to S7-8. When the number of iterations is reached, output the initial model of the current weight value, which is the final prediction model.
[0047] Furthermore, the calculation formula in step S7-1 is: ;in represents the data matrix composed of performance indicator samples, is the distance from the input layer to the hidden layer 1 Weight matrix;
[0048] The calculation formula in step S7-2 is:
[0049] ;in, represents the activation function, ;
[0050] The calculation formula in step S7-3 is:
[0051] ;in represent The weight matrix of
[0052] The calculation formula in step S7-4 is:
[0053] ; The calculation formula in step S7-5 is:
[0054] ;in represent The weight matrix of
[0055] The calculation formula in step S7-6 is: ;
[0056] The back propagation error in step S7-7 includes the output layer error and the hidden layer error, wherein the calculation formula of the output layer error is: ;in Represents the actual output value matrix;
[0057] The calculation formula of the hidden layer error is:
[0058] ;in Represents the transpose of the weight matrix between the hidden layer and the output layer;
[0059] The calculation formula of the weight value in step S7-8 is:
[0060] ;in represents the expected output matrix, represents the expected output matrix, represents the expected output matrix, Represents the weight value of the previous iteration, α represents the learning rate, α∈(0,1).
[0061] Based on the same inventive concept, the present invention also discloses a multidimensional data prediction system for a discrete manufacturing workshop, comprising:
[0062] The data processing module is used to clean, cluster, label and associate the raw data of discrete manufacturing in order to obtain the performance indicator module;
[0063] The model building module uses the DMTLBO-BP network model to build the original BP network structure, initializes the weight of the BP network structure according to the performance indicator sample, and obtains the initial model;
[0064] The prediction model module trains the initial model and updates the weights of the initial model to obtain the final prediction model.
[0065] Furthermore, the data processing module includes:
[0066] The data input submodule obtains the raw data of discrete manufacturing and cleans it to obtain the original data set;
[0067] The clustering classification submodule is used to cluster the original data set using the DBSCAN algorithm, obtain multiple data clusters, and establish corresponding labels for the data clusters;
[0068] The qualitative cognitive submodule uses the Apriori algorithm to search for the association between various tags, and two or more associated tags constitute a piece of data knowledge;
[0069] The knowledge network construction submodule deletes the redundant data in all the data knowledge in the qualitative cognitive module, extracts the correlation between each piece of data knowledge and constructs a knowledge network;
[0070] The data reconstruction submodule obtains the cleaned original data in the data input submodule corresponding to the labels contained in the data knowledge contained in the network knowledge in the knowledge network construction submodule, and uses this part of the original data as a performance indicator sample.
[0071] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: the present invention solves the problem of large volume and high latitude of discrete manufacturing workshop data in a divide-and-conquer manner through qualitative cognition and quantitative and qualitative two-stage cognition methods, reduces the computing cost, and the prediction model of the present invention can efficiently mine the valuable information required for prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 is a flow chart of the method of the present invention;
[0073] Figure 2 A flowchart of the training initial model of the present invention;
[0074] Figure 3 It is a structural diagram of the BP network structure of the present invention;
[0075] Figure 4 A schematic diagram of the discrete manufacturing process of the present invention;
[0076] Figure 5 Flow chart of the system of the present invention. DETAILED DESCRIPTION
[0077] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0078] Example 1
[0079] The multidimensional data prediction method of a discrete manufacturing workshop described in the present invention is as follows: Figure 1 and Figure 3 As shown, the following steps are included:
[0080] S1: Collect the original data of discrete manufacturing and clean it to form the original data set; the original data includes product quality index data, equipment energy consumption index data, and operating cost data in the discrete manufacturing process. Data cleaning refers to deleting duplicate values in the original data and filling in missing values.
[0081] S2: Preprocess the original data set, cluster the original data set using the DBSCAN algorithm, obtain multiple data clusters, and establish corresponding labels for the data clusters. Using the DBSCAN algorithm, in the original data set containing t indicator data, define the radius and the minimum number of Minpts, randomly select an indicator data with ξ as the radius, and observe whether it contains the minimum number of Minpts. If it meets the requirements, the indicator data is the core point, and then find all the corresponding indicator data as new clusters, and continue to cycle in this way until all indicator data in the original data set are processed. Take the equipment energy consumption indicator data as an example: the equipment energy consumption data includes temperature, pressure, etc.; construct similar labels as shown below: equipment ① temperature ① pressure ①, equipment ① temperature ① pressure ②, equipment ① temperature ② pressure ① and other similar labels.
[0082] S3: Establish qualitative cognition and use the Apriori algorithm to search for the association between each tag, and two or more related tags constitute a piece of data knowledge. Figure 4As shown, taking the labels corresponding to product quality indicator data as an example: using the Apriori association algorithm, the labels related to product quality indicators in step S2 are scanned into a data set, the count of each item is accumulated, and the items that meet the minimum support are mined to find the set L1 of frequent 1-item sets, product 1 measurement 1 quality is excellent; L1 is used to find the set L2 of frequent 2-item sets, that is, the association rules of two different process measurements, and L2 is used to find L3, that is, the association rules of three process measurements, until no frequent n-item sets can be found to establish qualitative cognition and establish a mathematical model of product quality indicator data. , where P i and K represent the conditions and conclusions of the corresponding labels, respectively. It means that conclusion K can be drawn from conditions P1 and P2. For example, if product 1 measured at 1 has excellent quality + product 1 measured at 2 has excellent quality + ..... product 1 measured at n has excellent quality, it can be concluded that product 1 has excellent quality.
[0083] S4: Delete all redundant data in the data knowledge, then extract the association between the cleaned data knowledge and construct a knowledge network to complete qualitative cognition. Deleting redundant data refers to the following two situations: ① If there are two pieces of knowledge and , and satisfies , then knowledge It is knowledge If there is redundancy, delete ② If there are two pieces of knowledge and , and satisfies , then knowledge It is knowledge If there is redundancy, delete .
[0084] S5: Traverse each piece of data knowledge contained in the knowledge network in step S4, obtain the original data cleaned in step S1 corresponding to the label contained in the data knowledge, and use this part of the original data as a performance indicator sample. This step and the subsequent steps are to quantitatively recognize the data. This embodiment solves the problem of large volume and high latitude of discrete manufacturing workshop data by using qualitative cognition and quantitative and qualitative two-stage cognition methods in a divide-and-conquer manner, reduces the computing cost, and can efficiently mine valuable information required for prediction.
[0085] S6: Establish the DMTLBO-BP network model as the original model, construct the original BP network structure, initialize the weight of the BP network structure according to the performance indicator sample, and obtain the preliminary model. The BP network structure includes an input layer, two hidden layers and an output layer. The neurons in the input layer are N m , and N mThe total number of data knowledge obtained in step S3 is equal to N m and The number of characteristic elements is equal to that of N, and the number of neurons in hidden layer 1 is N i , the number of neurons in hidden layer 2 is N k , the number of neurons in the output layer is N j , and N j The same number of conclusions obtained by the Apriori algorithm in step S3, that is, N j is equal to K in step S4, such as Figure 3 shown.
[0086] The steps of initializing the weight of the BP network structure according to the performance indicator sample in step S6 are as follows:
[0087] S6-1: Use real number coding to encode the performance indicator samples to obtain a coding array. The coding method is: ; Where L is the code length.
[0088] S6-2: Define the coding array as a class group, determine the class group size as L, and the number of iterations as a. The number of iterations a can be set according to the situation.
[0089] S6-3: Randomly divide the class into b groups, and select the individual with the best fitness in each group as the teacher. The fitness is defined as the score. The fitness calculation formula is: , where N i is the number of neurons in the output layer, d q is the expected output of the kth neuron in the output layer, y q is the actual output of the kth neuron in the output layer.
[0090] S6-4: Using the differences between teachers and students in a class group, teachers can impart knowledge to students in the class group. The calculation formula for imparting knowledge is: where r i =rand(0,1) represents the learning step, TF=[1+rand(0,1)] represents the teaching factor, M taecher Indicates teacher performance, M mean Indicates contemporary achievements;
[0091] Students according to D M-style approach to teachers, in represents the performance of the i-th generation student j after teaching, X i,j It represents the performance of student j of the i-th generation before teaching.
[0092] S6-5: Calculate the average scores of b groups, define the top half of the students in each group as excellent students, and the rest as poor students.
[0093] S6-6: Implement the self-study strategy for excellent students and the mutual learning strategy for poor students. The self-study strategy for excellent students means that excellent students improve their performance by conducting N times of in-depth exploration of themselves, where the calculation formula for the number of explorations N is as follows:
[0094] ; where F i represents the score of the i-th individual in the group; F max Indicates the best score in the group, F min Indicates the worst result in the group; UL is the upper limit of the number of explorations, which can be set according to the actual situation; LL is the lower limit of the number of explorations, which can be set according to the actual situation;
[0095] The mutual learning strategy for poor students means that poor students learn from other better individuals through mutual learning between groups. p Randomly select x that is better than q To learn, the learning formula is as follows:
[0096] ;in Represents individual x p The results after teaching, Represents individual x p In the pre-teaching grades, Better than If yes, accept the new individual, otherwise keep the old one.
[0097] S6-7: Each group conducts collaborative communication optimization, and selects the top k best individuals in the group to replace the last k worst individuals in the group according to their scores. This process is repeated h times until the difference between the current score of each group and the score of the previous iteration is less than the preset value, that is, the score of each group tends to the preset stable state. The calculation formula for the number of students k participating in the inter-group replacement communication is: ;
[0098] Where Gen represents the current number of iterations, C is a constant, and C can be set according to actual conditions.
[0099] S6-8: Determine whether the number of iterations meets the conditions, and repeat S6-4 to S6-7 until the number of iterations is a.
[0100] S6-9: Initialize the initial weights of the initial model and find the individual with the best performance in the class group. The encoding of this individual is the initial weight of the BP network structure.
[0101] S7: Train the initial model and update the weight of the initial model to obtain the final prediction model. This includes the following steps:
[0102] S7-1: Calculate the input value of the hidden layer 1 of the BP network structure. The calculation formula is as follows:
[0103] ;in represents the data matrix composed of performance indicator samples, is the distance from the input layer to the hidden layer 1 Weight matrix.
[0104] S7-2: Calculate the output value of hidden layer 1 according to the input value of hidden layer 1. The calculation formula is: ;in, represents the activation function, .
[0105] S7-3: Calculate the input value of hidden layer 2 based on the output value of hidden layer 1. The calculation formula is:
[0106] ;in represent The weight matrix of i Represents the number of neurons in hidden layer 1, N k Represents the number of neurons in hidden layer 2.
[0107] S7-4: Calculate the output value of hidden layer 2 according to the input value of hidden layer 2. The calculation formula is:
[0108] .
[0109] S7-5: Calculate the input value of the output layer according to the output value of the hidden layer 2. The calculation formula is:
[0110] ;in represent The weight matrix, N j The number of neurons in the output layer is represented by N, which is the number of label categories of the prediction elements (product quality index data, equipment energy consumption index data, and operating cost data). k Represents the number of neurons in hidden layer 2.
[0111] S7-6: Calculate the output value of the output layer based on the input value of the output layer. The calculation formula is: ;in, Represents the activation function.
[0112] S7-7: Calculate the back propagation error of the BP network structure according to the output value of the output layer. The back propagation error includes the output layer error and the hidden layer error. The calculation formula of the output layer error is: ;in Represents the actual output value matrix;
[0113] The calculation formula of the hidden layer error is:
[0114] ;in Represents the transpose of the weight matrix between the hidden layer and the output layer;
[0115] S7-8: Update the weight value of the BP network structure according to the back propagation error. The calculation formula is:
[0116] ;in represents the expected output matrix, represents the expected output matrix, represents the expected output matrix, Represents the weight value of the previous iteration, α represents the learning rate, α∈(0,1).
[0117] S7-9: Set the number of iterations of the weight value of the BP network structure. If the number of iterations is not reached, repeat steps S7-1 to S7-8. When the number of iterations is reached, output the initial model of the current weight value, which is the final prediction model.
[0118] S8: Obtain performance indicator samples corresponding to the original data of discrete manufacturing to be processed, input the samples into the prediction model, and the prediction model outputs the prediction results.
[0119] Example 2
[0120] The multidimensional data prediction system of a discrete manufacturing workshop described in the present invention is as follows: Figure 2 As shown, it includes a data processing module, a model building module and a prediction model module.
[0121] The data processing module is used to clean, cluster, label and associate the raw data of discrete manufacturing in turn to obtain the performance indicator module. The data processing module includes a data input submodule, a clustering classification submodule, a qualitative cognition submodule, a knowledge network construction submodule and a data reconstruction submodule.
[0122] The data input submodule obtains the original data of discrete manufacturing and cleans it to obtain the original data set, where the original data includes product quality index data, equipment energy consumption index data, and operating cost data in the discrete manufacturing process. Data cleaning refers to deleting duplicate values in the original data and filling in missing values.
[0123] The clustering classification submodule is used to cluster the original data set with the DBSCAN algorithm, obtain multiple data clusters, and establish corresponding labels for the data clusters; using the DBSCAN algorithm, in the original data set containing t indicator data, define the radius and the minimum number of Minpts, randomly select an indicator data with ξ as the radius, and observe whether it contains the minimum number of Minpts. If it meets the requirements, the indicator data is the core point, and then find all the corresponding indicator data as new clusters, and continue to cycle in this way until all indicator data in the original data set are processed. Take the equipment energy consumption indicator data as an example: the equipment energy consumption data includes temperature, pressure, etc.; construct similar labels as shown below: equipment ① temperature ① pressure ①, equipment ① temperature ① pressure ②, equipment ① temperature ② pressure ① and other similar labels.
[0124] The qualitative cognition submodule uses the Apriori algorithm to search for the association between each label, and two or more related labels constitute a piece of data knowledge. Take the label corresponding to the product quality indicator data as an example: using the Apriori association algorithm, the labels related to the product quality indicators in the clustering classification submodule are scanned into a data set, the count of each item is accumulated, and the items that meet the minimum support are mined to find the set L1 of frequent 1-item sets, product 1 measurement 1 quality is excellent; L1 is used to find the set L2 of frequent 2-item sets, that is, the association rules of two different process measurements, and L2 is used to find L3, that is, the association rules of three process measurements, until no frequent n-item sets can be found to establish qualitative cognition and establish a mathematical model of product quality indicator data. , where P i and K represent the conditions and conclusions of the corresponding labels, respectively. It means that conclusion K can be drawn from conditions P1 and P2. For example, if product 1 measured at 1 has excellent quality + product 1 measured at 2 has excellent quality + ..... product 1 measured at n has excellent quality, it can be concluded that product 1 has excellent quality.
[0125] The knowledge network construction submodule deletes the redundant data in all the data knowledge in the qualitative cognitive module, and then extracts the association between each piece of data knowledge and constructs a knowledge network. Deleting redundant data refers to the following two situations: ① If there are two pieces of knowledge and , and satisfies , then knowledge It is knowledge If there is redundancy, delete ② If there are two pieces of knowledge and , and satisfies , then knowledge It is knowledge If there is redundancy, delete The data reconstruction submodule obtains the cleaned original data in the data input submodule corresponding to the data knowledge contained in the knowledge network in the knowledge network construction submodule, and uses this part of the original data as the performance indicator sample.
[0126] The model building module uses the DMTLBO-BP network model to build the original BP network structure, and initializes the weight of the BP network structure based on the performance indicator sample to obtain the initial model. The BP network structure includes an input layer, two hidden layers and an output layer. The neurons in the input layer are N m , and N m The total number of data knowledge obtained by the qualitative cognitive submodule is equal to N m and The number of characteristic elements is equal to that of N, and the number of neurons in hidden layer 1 is N i , the number of neurons in hidden layer 2 is N k , the number of neurons in the output layer is N j , and N j The same number of conclusions obtained by associating with the Apriori algorithm in the qualitative cognitive submodule is N j Equal to K in the knowledge network construction submodule.
[0127] Use real number coding to encode the performance indicator samples and obtain the encoding array. The encoding method is: ; Where L is the code length.
[0128] Define the encoding array as a class group, determine the class group size as L, and the number of iterations as a. The number of iterations a can be set according to the situation.
[0129] The class group is randomly divided into b groups, and the individual with the best fitness in each group is selected as the teacher. The fitness is defined as the score. The fitness calculation formula is: , where N i is the number of neurons in the output layer, d q is the expected output of the kth neuron in the output layer, y q is the actual output of the kth neuron in the output layer.
[0130] By taking advantage of the differences between teachers and students in a class group, teachers can impart knowledge to students in the class group. The calculation formula for imparting knowledge is: where r i =rand(0,1) represents the learning step, TF=[1+rand(0,1)] represents the teaching factor, M taecher Indicates teacher performance, M mean Indicates contemporary achievements;
[0131] Students according to D M-style approach to teachers, in represents the performance of the i-th generation student j after teaching, X i,j It represents the performance of student j of the i-th generation before teaching.
[0132] Calculate the average scores of b groups, define the top half of the students in each group as excellent students, and the rest as poor students.
[0133] Implement the self-study strategy for excellent students and the mutual learning strategy for poor students. The self-study strategy for excellent students means that excellent students improve their performance by conducting N times of in-depth exploration of themselves. The calculation formula for the number of explorations N is as follows:
[0134] ; where F i represents the score of the i-th individual in the group; F max Indicates the best score in the group, F min Indicates the worst result in the group; UL is the upper limit of the number of explorations, which can be set according to the actual situation; LL is the lower limit of the number of explorations, which can be set according to the actual situation;
[0135] The mutual learning strategy for poor students means that poor students learn from other better individuals through mutual learning between groups. p Randomly select x that is better than q To learn, the learning formula is as follows:
[0136] ;in Represents individual x p The results after teaching, Represents individual x p In the pre-teaching grades, Better than If yes, accept the new individual, otherwise keep the old one.
[0137] Each group conducts collaborative communication optimization, and selects the top k best individuals in the group to replace the last k worst individuals in the group based on their scores. This process is repeated h times until the difference between the current score of each group and the score of the previous iteration is less than the preset value, that is, the score of each group tends to the preset stable state. The calculation formula for the number of students k participating in the inter-group replacement communication is: ;
[0138] Where Gen represents the current number of iterations, C is a constant, and C can be set according to actual conditions.
[0139] Determine whether the number of iterations meets the conditions, and repeat S6-4 to S6-7 until the number of iterations a is reached.
[0140] Initialize the initial weights of the initial model and find the individual with the best performance in the class group. The encoding of this individual is the initial weight of the BP network structure.
[0141] The prediction model module trains the initial model and updates the weights of the initial model to obtain the final prediction model.
[0142] Calculate the input value of the hidden layer 1 of the BP network structure. The calculation formula is as follows:
[0143] ;in represents the data matrix composed of performance indicator samples, is the distance from the input layer to the hidden layer 1 Weight matrix.
[0144] The output value of hidden layer 1 is calculated based on the input value of hidden layer 1. The calculation formula is: ;in, represents the activation function, .
[0145] The input value of hidden layer 2 is calculated based on the output value of hidden layer 1. The calculation formula is:
[0146] ;in represent The weight matrix of i Represents the number of neurons in hidden layer 1, N k Represents the number of neurons in hidden layer 2.
[0147] The output value of hidden layer 2 is calculated based on the input value of hidden layer 2. The calculation formula is:
[0148] .
[0149] The input value of the output layer is calculated based on the output value of the hidden layer 2. The calculation formula is:
[0150] ;in represent The weight matrix, N j The number of neurons in the output layer is represented by N, which is the number of label categories of the prediction elements (product quality index data, equipment energy consumption index data, and operating cost data). k Represents the number of neurons in hidden layer 2.
[0151] The output value of the output layer is calculated based on the input value of the output layer. The calculation formula is: ;in, Represents the activation function.
[0152] The back propagation error of the BP network structure is calculated based on the output value of the output layer. The back propagation error includes the output layer error and the hidden layer error. The calculation formula of the output layer error is: ;in Represents the actual output value matrix;
[0153] The calculation formula of the hidden layer error is:
[0154] ;in Represents the transpose of the weight matrix between the hidden layer and the output layer;
[0155] The weight value of the BP network structure is updated according to the back propagation error. The calculation formula is:
[0156] ;in represents the expected output matrix, represents the expected output matrix, represents the expected output matrix, Represents the weight value of the previous iteration, α represents the learning rate, α∈(0,1).
[0157] The number of iterations of the weight value of the BP network structure is set. If the number of iterations is not reached, steps S7-1 to S7-8 are repeated. When the number of iterations is reached, the initial model of the current weight value is output, and the initial model is the final prediction model.
[0158] When using the multidimensional data prediction system of the discrete manufacturing workshop, the original data of the discrete manufacturing to be processed is input into the data processing module to obtain the corresponding performance index module. The performance index module is input into the prediction module as input data, and the prediction module can output the prediction result.
Claims
1. A multidimensional data prediction method for a discrete manufacturing workshop, characterized by: The following steps are included: S1: Collect and clean the original data of discrete manufacturing to obtain the original data set; the original data includes product quality index data, equipment energy consumption index data, and operating cost data in the discrete manufacturing process; S2: Use the DBSCAN algorithm to cluster the original data set, obtain multiple data clusters, and establish corresponding labels for the data clusters; S3: Establish qualitative cognition and use the Apriori algorithm to search for the association between each label, and there are two or more related labels that constitute a piece of data knowledge; S4: Delete all redundant data in the data knowledge, extract the associations between each piece of data knowledge and construct a knowledge network to complete qualitative cognition; S5: traverse each piece of data knowledge contained in the knowledge network in step S4, obtain the original data cleaned in step S1 corresponding to the label contained in the data knowledge, and use this part of the original data as a performance indicator sample; S6: Using the DMTLBO-BP network model, construct the original BP network structure, initialize the weight of the BP network structure according to the performance index sample, and obtain the initial model; The BP network structure in step S6 includes an input layer, two hidden layers and an output layer, wherein the number of neurons in the input layer is N. m , and N m The total number of data knowledge obtained in step S3 is equal to the number of neurons in hidden layer 1. i , the number of neurons in hidden layer 2 is N k , the number of neurons in the output layer is N j , and N j The same number of conclusions obtained by associating with the Apriori algorithm in step S3; S6-1: Use real number coding to encode the performance indicator samples to obtain a coding array; the coding formula is as follows: ; Where L is the code length; S6-2: Define the encoding array as a class group, determine the class group size as L, and the number of iterations as a; S6-3: Randomly divide the class into b groups, and select the individual with the best fitness in each group as the teacher, and define fitness as the score; The fitness calculation formula is: , where N j is the number of neurons in the output layer, d q is the expected output of the kth neuron in the output layer, y q is the actual output of the kth neuron in the output layer; S6-4: Use the achievement differences between teachers and students in the class group to enable teachers to impart knowledge to students; The calculation formula for imparting knowledge is: where r i =rand(0,1) represents the learning step, TF=[1+rand(0,1)] represents the teaching factor, M taecher Indicates teacher performance, M mean Indicates contemporary achievements; Students move closer to teachers according to the D_M method. in represents the performance of the i-th generation student j after teaching, X i,j represents the performance of student j of the i-th generation before teaching; S6-5: Calculate the average scores of b groups, define the top half of the students in each group as excellent students, and the rest as poor students; S6-6: Implement self-learning strategies for good students and mutual learning strategies for poor students; The mutual learning strategy of eugenics means that eugenics conducts N times of in-depth exploration on itself. The calculation formula of the number of explorations N is as follows: ; where F i represents the score of the i-th individual in the group; F max Indicates the best score in the group, F min Indicates the worst result in the group; UL is the upper limit of the number of explorations, which can be set according to the actual situation; LL is the lower limit of the number of explorations, which can be set according to the actual situation; The mutual learning strategy for poor students means that poor students learn from other better individuals through mutual learning between groups. p Randomly select x that is better than q To learn, the learning formula is as follows: ;in Represents individual x p The results after teaching, Represents individual x p In the pre-teaching grades, Better than Accept new individuals when necessary, otherwise maintain the old individuals; S6-7: Each group conducts collaborative communication optimization, and selects the top k best individuals in the group to replace the last k worst individuals in the group according to their scores. This process is repeated h times until the difference between the current score of each group and the score of the previous iteration is less than the preset value. The calculation formula for k is: ; Where Gen represents the current number of iterations, and C is a constant; S6-8: Repeat S6-4 to S6-7 until it is iterated a times; S6-9: Find the individual with the best performance in the class group. The encoding of this individual is the initial weight of the BP network structure; S7: train the initial model and update the weight of the initial model to obtain the final prediction model; S7-1: Calculate the input value of the hidden layer 1 of the BP network structure; The calculation formula is: ;in represents the data matrix composed of performance indicator samples, is the distance from the input layer to the hidden layer 1 Weight matrix; S7-2: Calculate the output value of hidden layer 1 according to the input value of hidden layer 1; The calculation formula is: ;in, represents the activation function, ; S7-3: Calculate the input value of hidden layer 2 according to the output value of hidden layer 1; The calculation formula is: ;in represent The weight matrix of S7-4: Calculate the output value of hidden layer 2 according to the input value of hidden layer 2; The calculation formula is: ; S7-5: Calculate the input value of the output layer according to the output value of the hidden layer 2; The calculation formula is: ;in represent The weight matrix of S7-6: Calculate the output value of the output layer according to the input value of the output layer; The calculation formula is: ; S7-7: Calculate the back propagation error of the BP network structure according to the output value of the output layer; The back propagation error includes the output layer error and the hidden layer error, where the calculation formula of the output layer error is: ;in Represents the actual output value matrix; The calculation formula of the hidden layer error is: ;in Represents the transpose of the weight matrix between the hidden layer and the output layer; S7-8: Update the weight value of the BP network structure according to the back propagation error; The weight value is calculated as follows: ;in represents the expected output matrix, represents the expected output matrix, represents the expected output matrix, represents the weight value of the previous iteration, α represents the learning rate, α∈(0,1); S7-9: Set the number of iterations of the weight value of the BP network structure. If the number of iterations is not reached, repeat steps S7-1 to S7-8. When the number of iterations is reached, output the initial model of the current weight value, which is the final prediction model. S8: Obtain performance indicator samples corresponding to the original data of discrete manufacturing to be processed, input the samples into the prediction model, and the prediction model outputs the prediction results.
2. A multidimensional data prediction system for discrete manufacturing workshops, characterized by: include: The data processing module is used to clean, cluster, label and associate the original data of discrete manufacturing one in sequence to obtain the performance indicator module; The data processing module comprises: The data input submodule obtains the raw data of discrete manufacturing and cleans it to obtain the original data set; The clustering classification submodule is used to cluster the original data set using the DBSCAN algorithm, obtain multiple data clusters, and establish corresponding labels for the data clusters; The qualitative cognitive submodule uses the Apriori algorithm to search for the association between various tags, and two or more associated tags constitute a piece of data knowledge; The knowledge network construction submodule deletes the redundant data in all the data knowledge in the qualitative cognitive module, extracts the correlation between each piece of data knowledge and constructs a knowledge network; The data reconstruction submodule obtains the cleaned raw data in the data input submodule corresponding to the labels contained in the data knowledge contained in the network knowledge in the knowledge network construction submodule, and uses this part of the raw data as a performance indicator sample; The model building module uses the DMTLBO-BP network model to build the original BP network structure, initializes the weight of the BP network structure according to the performance indicator sample, and obtains the initial model; The BP network structure in the model building module includes an input layer, two hidden layers and an output layer, where the number of neurons in the input layer is N. m , and N m The total number of data knowledge obtained in step S3 is equal to the number of neurons in hidden layer 1. i , the number of neurons in hidden layer 2 is N k , the number of neurons in the output layer is N j , and N j The same number of conclusions obtained by associating with the Apriori algorithm in step S3; Initializing the weights of the BP network structure based on the performance indicator sample to obtain the initial model includes the following steps: Ⅰ-1: Use real number coding to encode the performance indicator samples to obtain a coding array; the coding formula is as follows: ; Where L is the code length; Ⅰ-2: Define the encoding array as a class group, determine the class group size as L and the number of iterations as a; Ⅰ-3: Randomly divide the class into b groups, and select the individual with the best fitness in each group as the teacher, and define fitness as performance; The fitness calculation formula is: , where N j is the number of neurons in the output layer, d q is the expected output of the kth neuron in the output layer, y q is the actual output of the kth neuron in the output layer; Ⅰ-4: Using the difference in performance between teachers and students in the class group to enable teachers to impart knowledge to students; The calculation formula for imparting knowledge is: where r i =rand(0,1) represents the learning step, TF=[1+rand(0,1)] represents the teaching factor, M taecher Indicates teacher performance, M mean Indicates contemporary achievements; Students move closer to teachers according to the DM method. in represents the performance of the i-th generation student j after teaching, X i,j represents the performance of student j of the i-th generation before teaching; Ⅰ-5: Calculate the average scores of b groups, define the top half of the students in each group as excellent students, and the rest as poor students; Ⅰ-6: Implement self-learning strategies for good students and mutual learning strategies for poor students; The mutual learning strategy of eugenics means that eugenics conducts N times of in-depth exploration on itself. The calculation formula of the number of explorations N is as follows: ; where F i represents the score of the i-th individual in the group; F max Indicates the best score in the group, F min Indicates the worst result in the group; UL is the upper limit of the number of explorations, which can be set according to the actual situation; LL is the lower limit of the number of explorations, which can be set according to the actual situation; The mutual learning strategy for poor students means that poor students learn from other better individuals through mutual learning between groups. p Randomly select x that is better than q To learn, the learning formula is as follows: ;in Represents individual x p The results after teaching, Represents individual x p In the pre-teaching grades, Better than Accept new individuals when necessary, otherwise maintain the old individuals; Ⅰ-7: Each group conducts collaborative communication optimization, and selects the top k best individuals in the group to replace the last k worst individuals in the group according to their scores. This process is repeated h times until the difference between the current score of each group and the score of the previous iteration is less than the preset value. The calculation formula for k is: ; Where Gen represents the current number of iterations, and C is a constant; Ⅰ-8: Repeat Ⅰ-4 to Ⅰ-7 until a number of iterations are reached; Ⅰ-9: Find the individual with the best performance in the class group. The encoding of this individual is the initial weight of the BP network structure; Prediction model module, trains the initial model and updates the weight of the initial model to obtain the final prediction model; Obtaining the final prediction model includes the following steps: Ⅱ-1: Calculate the input value of hidden layer 1 of BP network structure; The calculation formula is: ;in represents the data matrix composed of performance indicator samples, is the distance from the input layer to the hidden layer 1 Weight matrix; Ⅱ-2: Calculate the output value of hidden layer 1 based on the input value of hidden layer 1; The calculation formula is: ;in, represents the activation function, ; Ⅱ-3: Calculate the input value of hidden layer 2 based on the output value of hidden layer 1; The calculation formula is: ;in represent The weight matrix of Ⅱ-4: Calculate the output value of hidden layer 2 based on the input value of hidden layer 2; The calculation formula is: ; Ⅱ-5: Calculate the input value of the output layer based on the output value of hidden layer 2; The calculation formula is: ;in represent The weight matrix of Ⅱ-6: Calculate the output value of the output layer based on the input value of the output layer; The calculation formula is: ; Ⅱ-7: Calculate the back propagation error of the BP network structure based on the output value of the output layer; The back propagation error includes the output layer error and the hidden layer error, where the calculation formula of the output layer error is: ;in Represents the actual output value matrix; The calculation formula of the hidden layer error is: ;in Represents the transpose of the weight matrix between the hidden layer and the output layer; Ⅱ-8: Update the weight value of the BP network structure according to the back propagation error; The weight value is calculated as follows: ;in represents the expected output matrix, represents the expected output matrix, represents the expected output matrix, represents the weight value of the previous iteration, α represents the learning rate, α∈(0,1); Ⅱ-9: Set the number of iterations of the weight value of the BP network structure. If the number of iterations is not reached, repeat Ⅱ-1 to Ⅱ-8. After the number of iterations is reached, output the initial model of the current weight value. This initial model is the final prediction model.
Citation Information
Patent Citations
Teaching-and-learning-algorithm-based static scheduling optimization system for discrete manufacturing shop
CN105843197A
Man-machine cooperation efficiency optimization method for discrete manufacturing mixed flow production
CN116739179A