Intelligent design method of shaft part automatic straightening machine based on knowledge engineering
By building a rule library, ontology library and case library, combining rule reasoning and case reasoning, the efficient and intelligent design of automatic straightening machines for axle parts is achieved, solving the problem of insufficient design accuracy in traditional methods, and improving the accuracy and efficiency of the design.
Patent Information
- Application Number
- CN202510929831.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-07
AI Technical Summary
Traditional knowledge engineering technology is difficult to accurately design automatic straightening machines for non-standard shaft parts, making it difficult to ensure design accuracy.
Using an intelligent design method based on knowledge engineering, we use the rule library, ontology library and case library to build a rule library, combined with rule reasoning and case reasoning, and use Drools rule engine, Spacy library, Protege, ontology editing tools, ANSYS simulation and other technologies to perform parameterized modeling and multi-objective optimization to achieve efficient design of automatic shaft-type parts automatic straightening machines.
It improves the design efficiency and accuracy of the automatic straightening machine for shaft parts, and reduces design errors and trial and error costs.
Smart Images

Figure CN120408870A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent digital technology of straightening machines, and more specifically, to an intelligent design method for an automatic straightening machine for shaft parts based on knowledge engineering. Background Art
[0002] With the rapid development of the manufacturing industry, the precision requirements for component manufacturing are getting higher and higher. As an essential part of the assembly, the design accuracy of the automatic straightening machine for shaft parts directly affects the overall performance and working efficiency of the assembly. However, due to the variety of shaft parts and the more diverse use of new materials and new alloys, the current traditional design method of straightening machines is difficult to efficiently meet the requirements of part straightening.
[0003] The traditional knowledge engineering technology is the extraction and reuse of knowledge, using past experience combined with theory to solve current problems. Although it can achieve certain effects in some scenarios, in the face of the difficulties of accurately extracting expert experience for the automatic straightening machine of shaft parts and the difficulty of covering the straightening conditions of non-standard parts, it is often difficult to ensure the accuracy of the reasoning results, resulting in difficulty in guaranteeing the design accuracy of the straightening machine. Therefore, how to quickly design an automatic straightening machine for non-standard shaft parts that meets the straightening requirements is an urgent problem for those skilled in the art. Summary of the Invention
[0004] In view of this, the present invention provides an intelligent design method for an automatic straightening machine for shaft parts based on knowledge engineering. To overcome the above problems, the present invention provides the following technical solutions:
[0005] An intelligent design method for an automatic straightening machine for shaft parts based on knowledge engineering, comprising the following steps:
[0006] Step 1, acquiring knowledge and constructing a knowledge base:
[0007] The knowledge acquisition method is: collecting the knowledge involved in the design process of the automatic straightening machine for shaft parts by referring to national standards, industry specifications, design manuals, relevant literature, etc.
[0008] Step 2, constructing a knowledge base including a rule base, an ontology base, and a case base:
[0009] Step 2.1, establishing a rule base for the automatic straightening machine for shaft parts:
[0010] The specific process of constructing the rule base of the automatic straightening machine for shaft parts is as follows: Construct the rule base through the Drools rule engine: Write IF-THEN rules using the Drools rule engine for industry rules, national rules, design manuals, etc. to construct the rule base. The rule base is divided into logical rules, calculation rules, and constraint rules. Logical rules include material rules, geometric rules, and equipment rules. Material rules include straightening strategies for controlling different materials. Geometric rules include dealing with the influence of the geometric features of shaft parts on the process. Equipment rules include process parameters based on the capacity limitations of the straightening machine equipment. Calculation rules are rules for key parameters derived from material mechanics formulas or empirical models. Constraint rules include the allowable range or environmental limitations for setting process parameters such as temperature and humidity.
[0011] When adding new rules to the rule base, the Rete algorithm is introduced to detect conflicting rules. The rules in the rule base are divided into Alpha nodes, Beta nodes, and terminal nodes. Among them, Alpha nodes are conditional atomic nodes, and the content is the noun phrases in the IF structure in the rule base. Beta nodes are conditional combination matches, and the content is the mutual match of the noun phrases in the conditional atomic nodes. Terminal nodes are rule actions, and the content is the THEN action in the rule. When the new rules generated by the online learning module are divided into Alpha nodes, Beta nodes, and terminal nodes through the Rete algorithm, when multiple Beta nodes are passed, the corresponding terminal nodes are compared and the rules are output for manual verification.
[0012] Step 2.2: Establish the ontology library of the automatic straightening machine for shaft parts:
[0013] The specific process of constructing the ontology library of the automatic straightening machine for shaft parts is as follows: Determine the coverage of the ontology through the induction and summary of the design of the straightening machine processing and materials science fields such as patents, literature, and expert experience. Use the Spacy library to extract noun phrases and structured data from unstructured data (such as segmented pressurization is required when the length-diameter ratio exceeds 30) as concepts. Use the ontology editing tool Protege to use shaft parts, materials, process parameters, and equipment as the names of classes, formalize the relevant attributes of the concepts as the data attributes of the classes, and use the relationships between the concepts as the object attributes of the classes. Encode the ontology in the form of OWL. Finally, use the Pellet inference engine to detect logical contradictions (such as a certain type of part is defined as "not straightenable" and "needs to be straightened" at the same time).
[0014] Step 2.3: Establish the case library of the automatic straightening machine for shaft parts:
[0015] Collect data from the past straightening records, special test cases for new materials, and virtual cases generated by ANSYS simulation as the data collection sources for the case library. Extract numerical features from the cases, including structured data such as diameter, length-diameter ratio, yield strength, etc., time series data such as pressure-time curve, pressure-time-temperature curve, etc. (unstructured data), and text data such as material type, pressurization strategy, heat treatment status, etc. (structured data). Use MySQL to store structured data, Neo4j to store structured data of the relationships between concepts, and MinIO to store unstructured data such as pressure-displacement curve graphs.
[0016] Step 3: Input relevant parameters of the automatic straightening machine for shaft parts:
[0017] The specific parameters are material properties (type, yield strength, elastic modulus, etc.), geometric parameters (shaft outer diameter, length, wall thickness, straightness error, etc.), process objectives (resultant straightness, surface roughness, maximum springback rate, etc.), and environmental constraints (temperature, humidity, equipment tonnage, etc.).
[0018] Step 4: The rule inference method generates basic process parameters by rule inference. The specific steps of screening similar cases and fine-tuning parameters in combination with the mixed distance metric of the case library are as follows:
[0019] Step 4.1: Preprocessing of input parameters:
[0020] Standardize the units of the input parameters, and match the default values for the missing values of the input parameters through the ontology library. Trigger the IF-THEN rules to output some output parameters and the concept associations in the ontology library.
[0021] Step 4.2: Inference of unknown parameters:
[0022] Adopt a combination of rule inference and case-based reasoning. Generate basic process parameters by calling the rules in the rule library, and use the process parameters to screen the most similar cases in the case library through the nearest neighbor algorithm for parameter fine-tuning and reference. The nearest neighbor algorithm realizes the screening of similar cases by adopting a mixed distance metric, including the measurement of data feature distance, the measurement of chart data features, and the measurement of text information features. The mixed distance expression is as follows,
[0023] ;
[0024] In the formula, is the weight of each feature, Dynamically configure according to feature sensitivity analysis, and the sensitivity analysis is obtained by training historical cases through the XGBoost model.
[0025] Step 4.2.1: The measurement of the data feature distance is to select the features that have a significant impact on the straightening result (such as material yield strength, shaft diameter, length-diameter ratio, etc.) and encode them. The weighted Euclidean distance expression is as follows,
[0026] ;
[0027] In the formula, is the weight of the i-th parameter, , is the i-th numerical feature in two cases.
[0028] Step 4.2.2: The measurement of the chart data feature distance is to solve the problem of inconsistent chart data lengths by using dynamic time warping. Construct an m×n matrix through similar actions in two cases and Each element (i, j) represents , The local distance of, and the distance expression is obtained by calculating the cumulative sum from (1, 1) to the local distance as follows,
[0029] ;
[0030] In the formula, , are the sequence data in two cases.
[0031] Step 4.2.3: The measurement of the text information feature is to map text information such as the mutual relationship of concepts into binary vectors through one-hot encoding and use cosine similarity to measure the feature. The expression is as follows,
[0032] ;
[0033] In the formula, , is the text vector.
[0034] Step 4.2.4: The process of dynamically obtaining the weight is as follows:
[0035] Construct a training set: Extract 100 complete historical cases from the case library. Each case includes input features: numerical features, sequence features, text features. The key performance indicators of the straightening result include: straightness error, springback rate.
[0036] Preprocess the features: Numerical features: Processed using the weighted Euclidean distance expression. Sequence features: Extract the mean, variance, extreme values and perform DTW alignment and then standardize. Text features: Map to semantic vectors through the ontology library and then reduce the dimension.
[0037] Training the XGBoost sensitivity analysis model: Establish a multi-output XGBoost regression model, that is, a multi-output regression model that simultaneously predicts the straightness error and springback rate. The three types of feature combinations , , are composed of combinations ( , , ). The mixed features are used as inputs. The expression of the loss function is as follows.
[0038] ;
[0039] In the formula, is the true straightness error and springback rate corresponding to the i-th feature, is the straightness error and springback rate predicted by the model, is the global regularization strength used to overall control the regularization strength. || || represents the expression of the model complexity regularization term as follows.
[0040] ;
[0041] In the formula, T is the number of leaf nodes in the decision tree, is the weight value of the j-th leaf node, is the penalty coefficient of the number of leaf nodes used to control the tree complexity, is the regularization coefficient of the leaf node weights to prevent overfitting.
[0042] Feature sensitivity analysis: For the trained XGBoost model, use its built-in feature importance calculation function. This method uses the importance based on gain, which is essentially the sum of the reduction in the loss function (i.e., the gradient boost) brought by the feature when it is used for splitting in all trees. This is more in line with the characteristics of XGBoost based on gradient boosting trees.
[0043] Calculate the gain value of each input feature for each target variable. The expression of gain is as follows.
[0044] ;
[0045] In the formula, M is the number of splits of each input feature in all trees, is the loss value of each input feature f before splitting, is the loss value of the left node after splitting of each input feature f, is the loss value of the right node after splitting of each input feature f.
[0046] Calculate the feature class sensitivity:
[0047] For the numerical feature class ( ), it is calculated as the average value of the gain values of all sub - features in for the target vector. .
[0048] For the numerical feature class ( ), it is calculated as the average value of the gain values of all sub - features in for the target vector. .
[0049] For the numerical feature class ( ), it is calculated as the average value of the gain values of all sub - features in for the target vector. .
[0050] Sum the importance scores of each type of feature and calculate the weight coefficient. The expression is as follows,
[0051] , , .
[0052] Step 5: Parametric modeling of the automatic straightening machine for shaft parts:
[0053] By pre - designing the core components of the automatic straightening machine for shaft parts in Solidworks software, bind the dimension markings with parameter variables and define the assembly relationship. Generate the model by reading the user input through a script and replacing the variable values in the inference parameters with templates.
[0054] Step 6: Simulation verification of the automatic straightening machine model for shaft parts:
[0055] Check the frame stress ( ≤0.8 ) and the deformation of the shaft through finite - element analysis of the finite - element software ANSYS. Verify whether the stroke of the hydraulic rod can cover the entire length of the shaft and whether the pressurization process is stable through kinematic simulation. Compare the key process indicators in the rule base with the simulation results through calls. Determine whether it meets the process standards.
[0056] Step 7: Parameter optimization of the simulation results:
[0057] Step 7.1: Solve the multi-objective optimization model of the automatic straightening machine for shaft parts using the multi-objective optimization NSGA-II algorithm; retrieve the solution strategies of similar failure cases through the case library to provide references for parameter fine-tuning. Call the key process indicators in the rule library, calculate the overlimit ratio and deviation value to establish an optimization model, and use the NSGA-II algorithm to search for Pareto optimal solutions in the parameter space. The mathematical model is as follows,
[0058] ;
[0059] In the formula, X is the decision variable. In this embodiment, the straightening force F, the support spacing S, the radius R of the die arc surface, the pressure holding time T, and the pressurization speed V are selected as the parameters of the automatic straightening machine for shaft parts to be optimized, is the maximum stress obtained by simulation, is the allowable stress of the material, D is the diameter of the shaft part, is the maximum tonnage of the straightening machine, f(F) is the target straightening force function, ψ(F,S,R,T,V) is the target straightness error function. The expressions are as follows,
[0060] ;
[0061] In the formula, is the straightness after straightening obtained by simulation, is the target straightness.
[0062] Step 7.2: The solution steps of the multi-objective optimization model are as follows:
[0063] Step 7.2.1: Input the original parameters (straightening force F, support spacing S, radius R of the die arc surface, pressure holding time T, pressurization speed V), and establish trigger conditions (simulation failure), including stress overrun, springback overlimit, collision in motion simulation, etc.
[0064] Step 7.2.2: Define the dominance relationship of individuals in the evolutionary population.
[0065] Step 7.2.3: Normalize the input parameters. The expression is as follows,
[0066] ;
[0067] In the formula, is the maximum tonnage of the straightening machine, is the minimum straightening force obtained by the empirical formula.
[0068] Step 7.2.4: Initialize the population and set the planned generation number Gen = 1: Randomly generate 90 population individuals within the set range and 10 most similar successful cases found by the case base according to the nearest neighbor algorithm. Evaluate the fitness of the initialized population through simulation and calculation of the objective function.
[0069] Step 7.2.5: Determine whether the first-generation offspring population has been generated. If it has been generated, set the evolutionary generation number Gen = 2. Otherwise, perform non-dominated sorting, selection, crossover, and mutation on the initialized population to generate the first-generation offspring population and set the evolutionary generation number Gen = 2. Combine the parent population and the offspring population into a new population, and fill the population from low to high according to the non-dominated level. Select from high to low according to the crowding degree at the same level until 100 positions are filled, and then perform simulation and calculate the objective function and start iteration, repeating until the iteration number is reached , and finally obtain the process parameters corresponding to the optimal objective from the algorithm solution set.
[0070] The specific process of performing non-dominated sorting, selection, normal distribution crossover, and mutation on the initialized population to generate the first-generation offspring population and set the evolutionary generation number Gen = 2 is as follows:
[0071] Non-dominated sorting: Divide the population into two layers according to the Pareto dominance relationship. The first layer (Front 1) is the solutions that are not dominated by any other individuals, and the second layer (Front 2) is the solutions that are only dominated by Front 1.
[0072] Selection: Use stochastic tournament selection to randomly select 2 individuals from the population each time, and select the individual with a higher level (or a larger crowding degree at the same level) as the parent.
[0073] Crossover: Use the simulated binary crossover (SBX) operator to generate offspring. The expression is as follows,
[0074] ;
[0075] where, is the (k + 1)-th generation individual generated after crossover, is an individual selected from the k-th generation, is another individual selected from the k-th generation, is the uniform distribution factor, and its calculation method is as follows,
[0076] ;
[0077] where, u is a random number belonging to [0, 1); η is the crossover distribution index.
[0078] Mutation: Use the polynomial mutation operator to generate new individuals. The expression is as follows,
[0079] ;
[0080] Wherein, is the k-th generation individual selected; is the (k + 1)-th generation individual obtained through mutation operation; and are the upper and lower bounds of the decision variable respectively; The calculation formula is as follows,
[0081] ;
[0082] Wherein, is a uniformly distributed random number in [0, 1]; is the mutation distribution index.
[0083] Step 8, the specific process of the online learning module to update the knowledge base:
[0084] Data collection and preprocessing: By collecting real-time sensor data (pressure, displacement, temperature), process parameters (straightening force, pressurization time, holding pressure time), and at the same time screening similar cases in the case base through the nearest neighbor algorithm, dealing with missing items in the collected data, filling based on similar cases or deleting incomplete records, and then eliminating abnormal fluctuations in the data based on wavelet transform. One-hot encoding is performed on the processed original data (pressure, displacement, material type) to extract key features (maximum springback amount, straightening linearity error), and binning is performed on continuous data (straightening force value, temperature). A transaction dataset is generated according to a single instance, where each transaction is a set of feature items.
[0085] Scanning and updating the dataset: By setting to scan new data every 24 hours, comparing the data distribution of the new and old windows each time, and when the difference value exceeds the threshold, data update is performed to generate a new transaction dataset.
[0086] Processing of the frequent item list: For the newly added transaction dataset, calculate the support degree of each transaction in the transaction dataset in the new dataset, and filter out low-frequency items by removing items with a support degree lower than 0.05. Furthermore, a frequent item list is generated. The support degree expression of the transaction is as follows,
[0087] ;
[0088] FP-Tree construction and adjustment module: Sort the frequent item list in descending order of frequency, increase the node count along the book path in order, and create a new branch and update the node count if the path does not exist.
[0089] Recursively mine the FP-Tree: Starting from the bottom item, trace back its prefix path to generate the conditional pattern base. Recursively construct subtrees for each conditional pattern base, and filter valid rules based on confidence and lift.
[0090] Update the knowledge base: Convert the generated valid rules into IF-THEN rules and detect conflicting rules through the Rete algorithm to avoid rule conflicts.
[0091] As can be seen from the above technical solutions, the present invention discloses an intelligent design method for an automatic straightening machine for shaft parts based on knowledge engineering. Compared with the prior art, it has the following beneficial effects: The present invention combines knowledge engineering theory and modern design theory to perform parametric design on the automatic straightening machine for shaft parts, which helps to improve the design efficiency of the automatic straightening machine for shaft parts, has a more efficient design efficiency of the automatic straightening machine for shaft parts, and is more accurate and reliable in reasoning about unknown parameters, reducing design errors and trial-and-error costs. Brief Description of the Drawings
[0092] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0093] Figure 1 It is a schematic diagram of the intelligent design process of the automatic straightening machine for shaft parts provided by the present invention.
[0094] Figure 2 It is a schematic diagram of the rule base writing process provided by the present invention.
[0095] Figure 3 It is a schematic diagram of the ontology library writing process provided by the present invention.
[0096] Figure 4 It is a schematic diagram of the case library writing process provided by the present invention.
[0097] Figure 5 It is a schematic diagram of the process of the online learning module provided by the present invention. Detailed Embodiments
[0098] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0099] The present invention discloses an intelligent design method for an automatic straightening machine for shaft parts based on knowledge engineering. Please refer to Figure 1 , and the specific steps are as follows:
[0100] Step 1: Obtain knowledge and build a knowledge base:
[0101] The knowledge acquisition method is as follows: Collect the knowledge involved in the design process of the automatic straightening machine for shaft parts by referring to national standards, industry specifications, design manuals, relevant literature, etc.
[0102] Step 2: Build a knowledge base including a rule base, an ontology library, and a case library:
[0103] Step 2.1: Establish a rule base for the automatic straightening machine for shaft parts:
[0104] Please refer to Figure 2 , and the specific process of building the rule base for the automatic straightening machine for shaft parts is as follows: Build a rule base through the Drools rule engine: Use the Drools rule engine to write IF-THEN rules for industry rules, national rules, design manuals, etc. to build the rule base. The rule base is divided into logical rules, calculation rules, and constraint rules. Logical rules include material rules, geometric rules, and equipment rules. Material rules include straightening strategies for controlling different materials. Geometric rules include dealing with the influence of the geometric features of shaft parts on the process. Equipment rules include process parameters restricted by the capabilities of the straightening machine equipment. Calculation rules are rules for key parameters derived based on material mechanics formulas or empirical models. Constraint rules include the allowable ranges or environmental restrictions for setting process parameters such as temperature and humidity.
[0105] When adding new rules to the rule base, introduce the Rete algorithm to detect conflicting rules. Divide the rules in the rule base into Alpha nodes, Beta nodes, and terminal nodes. Among them, Alpha nodes are conditional atomic nodes, and the content is the noun phrases in the IF structure in the rule base. Beta nodes are conditional combination matches, and the content is the mutual match of the noun phrases in the conditional atomic nodes. Terminal nodes are rule actions, and the content is the THEN actions in the rules. When new rules generated by the online learning module are divided into Alpha nodes, Beta nodes, and terminal nodes through the Rete algorithm, compare the corresponding terminal nodes when multiple Beta nodes are passed and output the rules for manual verification.
[0106] Step 2.2: Establish an ontology library for the automatic straightening machine for shaft parts:
[0107] Please refer to Figure 3, the specific process of constructing the ontology library of the shaft part automatic straightening machine is as follows: Determine the coverage of the ontology by summarizing patents, literature, expert experience, etc. in the fields of straightening machine processing and material science. Extract noun phrases and structured data from unstructured data (such as parts with a length-diameter ratio exceeding 30 that require segmented pressurization) using the Spacy library. Use the ontology editing tool Protege to name shaft parts, materials, process parameters, and equipment as classes, formalize the relevant attributes of the concepts as data attributes of the classes, and use the relationships between the concepts as object attributes of the classes, and encode the ontology in the form of OWL. Finally, use the Pellet reasoner to detect logical contradictions (such as a certain type of part being defined as "unstraightenable" and "needing to be straightened" at the same time).
[0108] Step 2.3: Establish a case library for the shaft part automatic straightening machine:
[0109] Please refer to Figure 4 , and collect data for the case library from past straightening records, special test cases for new materials, and virtual cases generated by ANSYS simulations. Extract numerical features from the cases, including structured data such as diameter, length-diameter ratio, yield strength, etc., time series data such as pressure-time curves, pressure-time-temperature curves, etc. (unstructured data), and text data such as material type, pressurization strategy, heat treatment status, etc. (structured data). Use MySQL to store structured data, Neo4j to store structured data of the mutual relationships between concepts, and MinIO to store unstructured data such as pressure-displacement curves.
[0110] Step 3: Input relevant parameters of the shaft part automatic straightening machine:
[0111] The specific parameters are material properties (type, yield strength, elastic modulus, etc.), geometric parameters (shaft outer diameter, length, wall thickness, straightness error, etc.), process objectives (resultant straightness, surface roughness, maximum springback rate, etc.), and environmental constraints (temperature, humidity, equipment tonnage, etc.).
[0112] Step 4: The rule inference method is to generate basic process parameters through rule inference. The specific steps of screening similar cases and fine-tuning parameters by combining the hybrid distance metric of the case library are as follows:
[0113] Step 4.1: Preprocessing of input parameters:
[0114] Standardize the units of the input parameters, and match the default values for the missing values of the input parameters in the ontology library. Trigger the IF-THEN rule to output some output parameters and the concept associations of the ontology library.
[0115] Step 4.2: Inference of unknown parameters:
[0116] Please refer to Figure 4, adopt a combination of rule - based reasoning and case - based reasoning. Generate basic process parameters by invoking the rules in the rule base, and use the process parameters to screen the most similar cases in the case base through the nearest - neighbor algorithm for parameter fine - tuning and reference. The nearest - neighbor algorithm realizes the screening of similar cases by adopting a hybrid distance metric, including the measurement of data feature distance, the measurement of chart data features, and the measurement of text information features. The hybrid distance expression is as follows,
[0117] ;
[0118] In the formula, is the weight of each feature, dynamically configured according to feature sensitivity analysis, and the sensitivity analysis is obtained by training historical cases through the XGBoost model.
[0119] Step 4.2.1: The measurement of data feature distance is to select features that have a significant impact on the straightening result (such as material yield strength, shaft diameter, length - diameter ratio, etc.) and encode them. The weighted Euclidean distance expression is as follows,
[0120] ;
[0121] In the formula, is the weight of the i - th parameter, , is the i - th numerical feature in two cases.
[0122] Step 4.2.2: The measurement of chart data feature distance is to solve the problem of inconsistent chart data lengths by using dynamic time adjustment, and construct and in two cases to construct an m×n matrix, and each element (i, j) represents , The local distance of, and the distance expression is obtained by calculating the cumulative sum from (1, 1) to the local distance as follows,
[0123] ;
[0124] In the formula, , are the sequence data in two cases.
[0125] Step 4.2.3: The measurement of text information features is to map text information such as the mutual relationship of concepts into binary vectors through one - hot encoding and use cosine similarity to measure the features. The expression is as follows,
[0126] ;
[0127] In the formula, , is a text vector.
[0128] Step 4.2.4: Weight The process of dynamically obtaining is as follows:
[0129] Construct a training set: Extract 100 complete historical cases from the case library. Each case includes input features: numerical features, sequence features, and text features. The key performance indicators of the straightening result include: straightness error and springback rate.
[0130] Preprocess the features: Numerical features: Process using the weighted Euclidean distance expression. Sequence features: Extract the mean, variance, extreme values, and perform DTW alignment and then standardize. Text features: Map to semantic vectors through the ontology library and then reduce the dimension.
[0131] Train the XGBoost sensitivity analysis model: Establish a multi-output XGBoost regression model, that is, a multi-output regression model that simultaneously predicts the straightness error and springback rate. The three types of feature combinations , , are composed of combinations ( , , ) of the mixed features as input. The loss function expression is as follows,
[0132] ;
[0133] In the formula, is the true straightness error and springback rate corresponding to the i-th feature, is the straightness error and springback rate predicted by the model, is the global regularization strength used to overall control the regularization strength, || || represents the model complexity regularization term, and the expression is as follows,
[0134] ;
[0135] In the formula, T is the number of leaf nodes in the decision tree, is the weight value of the j-th leaf node, is the penalty coefficient of the number of leaf nodes used to control the tree complexity, is the regularization coefficient of the leaf node weights to prevent overfitting.
[0136] Feature Sensitivity Analysis: For the trained XGBoost model, utilize its built-in feature importance calculation function. This method adopts importance based on gain, which is essentially the sum of the reduction in the loss function (i.e., the gradient boost amount) brought about when the feature is used for splitting in all trees. This is more in line with the characteristics of XGBoost based on gradient boosting trees.
[0137] Calculate the gain value of each input feature for each target variable. The expression of gain is as follows.
[0138] ;
[0139] In the formula, M is the number of splits of each input feature in all trees. is the loss value of each input feature f before splitting. is the loss value of the left node after splitting of each input feature f. is the loss value of the right node after splitting of each input feature f.
[0140] Calculate Feature Class Sensitivity:
[0141] For numerical feature classes ( ), it is calculated as the average value of the gain values of all sub-features in for the target vector. .
[0142] For numerical feature classes ( ), it is calculated as the average value of the gain values of all sub-features in for the target vector. .
[0143] For numerical feature classes ( ), it is calculated as the average value of the gain values of all sub-features in for the target vector. .
[0144] Sum the importance scores of each feature class and calculate the weight coefficient. The expression is as follows.
[0145] , , .
[0146] Step 5: Parametric Modeling of the Automatic Straightening Machine for Shaft Parts
[0147] By pre - designing the core components of the automatic straightening machine for shaft parts in Solidworks software, bind the dimension markings with parameter variables and define the assembly relationship. Generate a model by reading user input through a script and replacing the variable values in the inference parameter template.
[0148] Step 6: Conduct simulation verification on the model of the automatic straightening machine for shaft parts:
[0149] Check the frame stress ( ≦0.8 ) and the deformation of the shaft through finite - element analysis using the finite - element software ANSYS. Verify whether the stroke of the hydraulic rod can cover the entire length of the shaft and whether the pressurization process is stable through kinematic simulation. Compare the key process indicators in the rule library with the simulation results to determine whether it meets the process standards.
[0150] Step 7: Optimize the parameters of the simulation results:
[0151] Step 7.1: Use the multi - objective optimization NSGA - II algorithm to solve the multi - objective optimization model of the automatic straightening machine for shaft parts; retrieve the solution strategies for similar failure cases from the case library to provide references for parameter fine - tuning. Call the key process indicators in the rule library, calculate the over - limit ratio and deviation value, establish an optimization model, and use the NSGA - II algorithm to search for the Pareto optimal solution in the parameter space. The mathematical model is as follows,
[0152] ;
[0153] In the formula, X is the decision variable. In this embodiment, the straightening force F, the support spacing S, the radius R of the die arc surface, the pressure - maintaining time T, and the pressurization speed V are selected as the parameters of the automatic straightening machine for shaft parts to be optimized. is the maximum stress obtained from the simulation, is the allowable stress of the material, D is the diameter of the shaft part, is the maximum tonnage of the straightening machine, f(F) is the target straightening force function, (F,S,R,T,V) is the target straightness error function. The expression is as follows,
[0154] ;
[0155] In the formula, is the straightness after straightening obtained from the simulation, is the target straightness.
[0156] Step 7.2: The solution steps of the multi - objective optimization model are as follows:
[0157] Step 7.2.1: Enter the original parameters (straightening force F, support spacing S, mold arc radius R, holding time T, and pressurization speed V) to establish trigger conditions (simulation failure), including stress exceeding the limit, springback exceeding the limit, and collision during motion simulation.
[0158] Step 7.2.2: Define the dominance relationships among individuals in the evolving population.
[0159] Step 7.2.3: Normalize the input parameters. The expression is as follows:
[0160] ;
[0161] Where, The maximum tonnage of the straightening machine. This is the minimum straightening force obtained from the empirical formula, and the other four parameters can be deduced similarly.
[0162] Step 7.2.4: Initialize the population and set the planned generation number Gen=1: Randomly generate 90 population individuals within the set range and 10 most similar successful cases found by the case library using the nearest neighbor algorithm. The fitness of the initialized population is evaluated by simulation and calculation of the objective function.
[0163] Step 7.2.5: Determine whether the first generation of subpopulations has been generated. If so, set the evolutionary generation number Gen=2. Otherwise, perform non-dominated sorting, selection, crossover, and mutation on the initialized population to generate the first generation of subpopulations and set the evolutionary generation number Gen=2. Merge the parent population and the child population into a new population, and fill the population from low to high according to the non-dominated hierarchy. Select from high to low according to the congestion degree at the same hierarchy until 100 positions are filled. Simulate and calculate the objective function, then start iteration. Repeat the cycle until the number of iterations is reached. , and finally the process parameters corresponding to the optimal target are obtained from the algorithm solution set.
[0164] Step 7.2.6: The specific process of performing non-dominated sorting and selection, normal distribution crossover, and mutation on the initialized population to generate the first generation of subpopulation and make the evolutionary generation number Gen=2 is as follows:
[0165] Non-dominated sorting: The population is divided into two layers according to the Pareto dominance relationship. The first layer (Front 1) is the solution that is not dominated by any other individual, and the second layer (Front 2) is the solution that is only dominated by Front 1.
[0166] Selection: Random league selection is used to randomly select 2 individuals from the population each time, and the individual with a higher level (or a higher crowding degree when in the same level) is selected as the parent.
[0167] Crossover: The offspring is generated using the operator that simulates binary crossover (SBX). The expression is as follows:
[0168] ;
[0169] Wherein, is the (k + 1)-th generation individual generated after crossover, is an individual selected from the k-th generation, is another individual selected from the k-th generation, is the uniform distribution factor, and its calculation method is as follows,
[0170] ;
[0171] Wherein, u is a random number belonging to [0, 1); η is the crossover distribution index.
[0172] Mutation: The polynomial mutation operator is used to generate new individuals, and the expression is as follows,
[0173] ;
[0174] Wherein, is the individual selected from the k-th generation; is the (k + 1)-th generation individual obtained through mutation operation; and are the upper and lower bounds of the decision variable respectively; The calculation formula is as follows,
[0175] ;
[0176] Wherein, is a uniform distribution random number in [0, 1]; is the mutation distribution index.
[0177] Step 8, The specific process of the online learning module updating the knowledge base:
[0178] Please refer to Figure 5 , Data collection and preprocessing: By collecting real-time sensor data (pressure, displacement, temperature), process parameters (straightening force, pressurizing time, holding pressure time), at the same time screening similar cases in the case base through the nearest neighbor algorithm, processing the missing items of the collected data, filling or deleting incomplete records based on similar cases, and then eliminating abnormal fluctuations of the data based on wavelet transform. One-hot encoding is performed on the processed original data (pressure, displacement, material type) to extract key features (maximum springback amount, straightening linearity error), and binning processing is performed on the continuous data (straightening force value, temperature). Generate a transaction dataset according to a single instance, where each transaction is a set of feature items.
[0179] Scan and update the dataset: By setting a 24-hour scan for new data, compare the data distributions of the old and new windows during each scan. When the difference value exceeds the threshold, update the data to generate a new transaction dataset.
[0180] Processing of the frequent item list: Calculate the support of each transaction in the transaction dataset in the new dataset for the newly added transaction dataset, and filter out low-frequency items by removing items with a support lower than 0.05. Then generate a frequent item list. The support expression of a transaction is as follows.
[0181] ;
[0182] FP-Tree construction and adjustment module: Sort the frequent item list in descending order of frequency, increase the node count along the book path in order. If the path does not exist, create a new branch and update the node count.
[0183] Recursively mine the FP-Tree: Trace back its prefix path from the bottom item to generate a conditional pattern base. Recursively construct subtrees for each conditional pattern base, and filter valid rules based on confidence and lift.
[0184] Update of the knowledge base: Convert the generated valid rules into IF-THEN rules and detect conflicting rules through the Rete algorithm to avoid rule conflicts.
Claims
1. An intelligent design method for an automatic straightening machine of shaft parts based on knowledge engineering, characterized in that, The knowledge base constructed by this method includes: a rule base, an ontology base, and a case base. Based on the user input parameters, rule reasoning is triggered to generate basic process parameters. The hybrid distance metric mechanism of the case base is combined to screen similar cases for fine-tuning the parameters. The optimized parameters are imported into SolidWorks to adjust the model through equation driving. Based on the simulation verification results, the NSGA-II algorithm is used for multi-objective parameter optimization. The online learning module collects sensor data, mines association rules through the FP-Growth algorithm, and realizes the dynamic update of the knowledge base through Rete conflict detection.
2. The intelligent design method of an automatic straightening machine for shaft parts based on knowledge engineering according to claim 1, characterized in that The construction methods of the rule base, ontology base, and case base are as follows: (1) Rule base construction method: The rule base is constructed through the Drools rule engine, and the Rete algorithm is added to the rule base to detect whether there are contradictions when introducing new rules; (2) Ontology base construction method: Using the ontology editing tool Protege, the shaft parts, materials, process parameters, and equipment are used as the names of classes. The relevant attributes of the concepts are formalized as the data attributes of the classes, and the relationships between the concepts are used as the object attributes of the classes. Finally, the Pellet reasoner is used to detect logical contradictions; (3) Case base construction method: The data collection sources of the case base are the past straightening records, special test cases for new materials, and virtual cases generated by ANSYS simulation. The numerical features are extracted from the cases, including the structured data of numerical types such as diameter, length-diameter ratio, and yield strength, the unstructured data of time series data such as pressure-time curve and pressure-time-temperature curve, and the structured data of text types such as material type, pressurization strategy, and heat treatment state. MySQL is used to store the structured data of numerical types, Neo4j is used to store the structured data of text types of the mutual relationships between concepts, and MinIO is used to store the unstructured data such as pressure-displacement curve graphs.
3. An intelligent design method for an automatic straightening machine for shaft parts based on knowledge engineering according to claim 1, characterized in that, The rule reasoning method is that rule reasoning generates basic process parameters, and the specific steps of combining the hybrid distance metric of the case base to screen similar cases for fine-tuning the parameters are as follows: (1) Preprocessing of input parameters; (2) Reasoning about unknown parameters: By calling the rules in the rule base to generate basic process parameters, and using the process parameters to screen the most similar cases in the case base through the nearest neighbor algorithm for parameter fine-tuning and reference. The nearest neighbor algorithm realizes the screening of similar cases by adopting a hybrid distance metric, including the measurement of data feature distance, the measurement of chart data features, and the measurement of text information features. The hybrid distance expression is as follows. ; In the formula, is the weight of each feature, dynamically configured according to feature sensitivity analysis, and the sensitivity analysis is obtained by training historical cases through the XGBoost model.
4. An intelligent design method for an automatic straightening machine for shaft parts based on knowledge engineering according to claim 3, characterized in that, The measurement of the data feature distance is to select the features that have a significant impact on the straightening result and encode them. The distance expression is as follows. ; where is the weight of the i-th parameter, , is the i-th numerical feature in two cases; The measurement of the chart data feature distance is to solve the problem of inconsistent chart data lengths by using dynamic time adjustment. The distance expression is as follows. ; Wherein, , are the sequence data in two cases; The measurement of the text information feature is to map the text information of the mutual relationship of concepts into a binary vector through one-hot encoding and use the cosine similarity to measure the features. The expression is as follows. ; In the formula, , is the text vector.
5. The intelligent design method of an automatic straightening machine for shaft parts based on knowledge engineering according to claim 4, characterized in that The process of dynamically obtaining the weights α, β, γ is as follows: Construct a training set; Preprocess the features; Train the XGBoost sensitivity analysis model; Conduct feature sensitivity analysis; Sum the importance scores of each type of feature and calculate the weight coefficients.
6. The intelligent design method of an automatic straightening machine for shaft parts based on knowledge engineering according to claim 1, characterized in that, The parameter optimization of the simulation results is achieved by solving the multi-objective optimization model of the shaft part automatic straightening machine using the multi-objective optimization NSGA-II algorithm. The established mathematical model is: ; Wherein, X is a decision variable. In this embodiment, the straightening force F, the support spacing S, the radius R of the die arc surface, the holding time T, and the pressurization speed V are selected as the parameters of the automatic straightening machine for shaft parts to be optimized. is the maximum stress obtained by simulation. is the allowable stress of the material, and D is the diameter of the shaft part. is the maximum tonnage of the straightening machine, and f(F) is the target straightening force function. ψ(F, S, R, T, V) is the target straightness error function, and the expression is as follows. ; Among them is the straightness after straightening obtained by simulation, is the target straightness.
7. An intelligent design method for an automatic straightening machine of shaft parts based on knowledge engineering according to claim 1, characterized in that, The specific process of the online learning module collecting sensor data, mining association rules through FP-Growth, and updating the knowledge base through Rete conflict detection is as follows: (1) Data collection and preprocessing; (2) Scan and update the data set; (3) Processing of the frequent item list; (4) FP-Tree construction and adjustment module; (5) Recursively mine the FP-Tree; (6) Update of the knowledge base.
Citation Information
Patent Citations
Use method of combat knowledge system and combat decision auxiliary method
CN113255916A
Production line dynamic process knowledge base construction method and process scheme generation method
CN118296165A
Integrated circuit process parameter optimization method and system based on machine learning
CN119067028A
Mechanical design knowledge long-term memory-oriented AI processing method and system
CN120257996A
A method of case learning and comments generation for clinical pathology examination using rule optimization
KR1020170122146A
Cited By
Machine tool automatic finite element simulation system and method
CN121168159A