Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 8, No. 1, 2024 134 Research on the Application of CBR Technology in Intelligent Process Design System Junli Liu, Hui Lu *, Guanhui Cui, Xibin An School of Mechanical and Power Engineering, Henan Polytechnic University, Jiaozuo, Henan, China * Corresponding author: Hui Lu (Email: 212105020011@home.hpu.edu.cn) Abstract: A Case-Based Reasoning (CBR) intelligent process design system is developed through Visual Studio development tools to improve the processing efficiency of mechanical parts and the recurrence rate of corporate knowledge. The key factor in improving the accuracy of case matching in the CBR system is the similarity calculation of parts. In this paper, similarity calculation models for different attribute types are presented by combining the nearest neighbor method. And the improved AHP method and matrix calculation of MATLAB are used to determine the weighting coefficient. The most similar cases are matched according to the overall similarity of the cases and the set threshold, and the method is applied to the intelligent process design of shafts. The results show that this method is conducive to shortening the development cycle and quickly responding to the market, which provides a reference for intelligent manufacturing of mechanical parts. Keywords: Intelligent Process; Case-Based Reasoning; Similarity; Improved Analytic Hierarchy Process; Weight Coefficient. 1. Introduction In mechanical product design, process design is the bridge that connects designers and manufacturing floors. The design efficiency of the part process directly affects the production cycle of the product. The design efficiency of the part process directly affects the production cycle of the product. In the face of complex process systems, the reuse of similar processes based on product three-dimensional models and enterprise knowledge management has become the mainstream means of design of many enterprises. Case-Based Reasoning (CBR) is a similar problem-solving method that uses the existing knowledge and cases of enterprises, and is undoubtedly the preferred method for dealing with complex problems and multi-attribute decisions[1]. New issue description case retrieval Retrieve the workaround Remediate the workaround Study cases Instance libraries 1.retrieval 2.reuse 3.modification 4.retention Figure 1. Case-Based Reasoning diagram CBR technology solves current problems by comparing the differences between new and old problems, modifying and adjusting the cases and reusing the knowledge and information of old cases[2]. A complete CBR solution should include retrieval, reuse, modification, and retention of cases, as shown in Figure 1. Taking the belt conveyor roller shaft parts as an example, an intelligent process design system based on case reasoning was developed. According to the overall similarity of the cases and the set threshold, the most similar cases are matched, which is used to guide the design of new cases, and provides a fast process design method for mechanical parts, thereby improving the knowledge reuse rate and process design efficiency of mechanical parts in enterprises. 2. Establishment and Solution of CBR Model In the life cycle of CBR, case retrieval is an important part of case reasoning, and CBR is based on the idea that "similar problems have similar solutions"[3]. Therefore, in CBR calculation, the key to case retrieval lies in the calculation of similarity, and the case similarity calculation process mainly includes two aspects: Evaluate the similarity between the target case and the historical case on each feature item, that is, the local similarity; Evaluate overall similarity on the basis of local similarity[4]. 1 ( , ) ( , ) n j j j j Sim X C f X C W    (1) In the formula, X represents the target case; C represents the mature case; n indicates the number of feature attributes contained in the case; f represents the similarity calculation function between case C and target case X; Wj represents the weight of the feature attribute J. According to Equation (1), it can be seen that attribute similarity calculation and weight assignment will affect the matching accuracy of the case and the reliability of the final decision[5]. Figure 2 shows the overall framework of the similarity calculation solution. Different similarity calculation models are established according to the accurate numerical type, text type and feature set type. By using Delphi method combined with the improved AHP method, the weight of each attribute is calculated. The global similarity of each case is obtained, and the best similar case is finally matched. 135 3. Calculation Model for Attribute Similarity In this paper, K-Nearest Neibhdor (K-NN) is used to describe the similarity between case attributes. It determines similarity by calculating the spatial distance of attribute features. and provide highly similar cases to designers for reuse[6]. In this paper, the process parameters such as the category, blank, material, heat treatment method, basic parameter set (shaft length, maximum outer diameter, roughness, main machining accuracy) and shape feature set (number of main features and number of auxiliary features) of shaft parts are described. Since the process attribute information involves types mainly include numeric, text and set. Therefore, their similarity calculation function f (Xj, Cj) is also different. The following will establish the similarity calculation model for each type of attribute in the shaft part. Numerical similarity calculation model Text-based similarity calculation model Feature set similarity calculation model Delphi method combined with improved AHP method Weight coefficient calculation Similarity matrix Weight coefficient calculation Overall similarity Best Similarity Case Figure 2. Intelligent design architecture of mechanical products 3.1. Similarity Calculation of Numeric Types When the attribute is a deterministic numeric type, such as the basic process parameters of the axis class (shaft length, maximum outer diameter, roughness, main machining accuracy), the spatial distance between the two is usually used as the similarity calculation method. 1 1 ( , ) 1 ( , ) 1 ( , ) n r i i i i ij j Sim X C Dis X C w Dis x c             (2) In the formula, when r = 1, Dis(X, Ci) represents the Hamming distance; When r = 2, Dis(X, Ci) represents the Euler distance. Where Dis(X, Ci) is expressed as:  min max max min ( , ) , , , j ij j ij j ij x c Dis x c x c x x x x     (3) In the formula, xmax represents the maximum value of the case attribute j, and xmin represents the minimum value of the case attribute. When Dis(X, Ci)=0, it means that the properties j of the two cases are the same, and the similarity is 1; Otherwise, the two properties are completely different and have a similarity of 0. 3.2. Similarity Calculation of Text Types In this system, some properties of the case are described by text, such as part name, stock type, heat treatment method and material, collectively referred to as text type. For text class shapes, the similarity is calculated by the following formula: 0, ( , ) 1, j ij j ij j ij x c Sim x c x c    (4) 3.3. Similarity Calculation of Feature Set Types Due to the complex geometric features of the structure of shaft parts, the structure will involve shape features such as bosses, slots, and chamfers. Therefore, the geometric features are described as sets such as primary features and auxiliary features, as shown in Figure 3. Prima- ry feature Auxili- ary features Basic feature Raised features Ladder features Transition features Hole features Groove features sphere cube Cylindrical bulge Rectangular bulge Rectangular steps Inclined steps Chamfer Rounded corners Cylindrical holes Conical holes T-notch Square groove cylinder cone Geomet- ric features Figure 3. Classification of shape features The similarity of the shape feature set is judged and calculated by the primary and auxiliary features of the part. The part shape feature set similarity formula defined by this system is: 0 .7 0 .3x zx fxS im S im S im  (5) In the formula, 0.7Simzx represents the similarity coefficient of the primary feature of the current part and the case part. 0.3Simfx indicates the similarity coefficient of the auxiliary features. If the main feature set of the target part is O, the primary feature set of the case part is P, and O=[o1,o2,...,on], P=[p1,p2,...,pm], A=OP, then the primary feature similarity of the two parts is: 2 ZA zx ZO ZP Q Sim Q Q   (6) 136 In the formula, QZO represents the number of major features of the target part, QZP represents the number of major features of the case part, and QZA is the number of intersections of the two. Similarly, the formula for calculating auxiliary features Simfx can be obtained, which will not be repeated here. 4. Establishment of Attribute Weight Coefficient Calculation Model The size of the weight coefficient reflects the importance of each feature attribute of the case, which has a direct impact on the result of CBR matching. The Analytic Hierarchy Process (AHP) is a decision-making method that decomposes complex problems into multiple levels and conducts qualitative and quantitative analysis. This method evaluates the importance of attributes by constructing a judgment matrix, which provides a selection basis for decision-making. However, the calculation is more complex due to the need for consistency testing in traditional AHP. Therefore, it can improve the objectivity of judgment and omit consistency testing by introducing optimal transfer matrix to improve traditional AHP. The calculation steps to improve the AHP are as follows: 4.1. Constructing the Judgment Matrix The judgment matrix is the core of the entire operation and directly affects the evaluation results[7]. The questionnaire was administered to P experts and the questionnaire data were synthesized into a judgment matrix A, by judging the importance of the guidelines according to the events as in Table 1. 12 1 21 2 1 2 1 1 1 ij n n n n a a a a A a a                      (7) 1 1 ( ) p p r ij ij r a a    (8) Table 1. The importance of the event judgment criterion The importance of attribute i over attribute j Pairwise comparison standard extremely important 9 more important 7 significantly important 5 slightly more important 3 equally important 1 slightly less important 1/3 significantly less important 1/5 Strongly unimportant 1/7 Extremely unimportant 1/9 The importance level falls between the two 8,6,4,2,1/2,1/4,1/6,1/8 In the formula, ɑij indicates the results of the fusion of multiple expert opinions, and ɑij = 1/ɑij ɑij r is the r-th expert to determine the importance value of the i-th attribute relative to the j-th attribute. P is the number of experts and n is the number of case attributes. 4.2. Optimization Consistency Matrix In the traditional hierarchical analysis method, the consistency index CI, the average random consistency index RI and the consistency ratio CR must be used to test the consistency of the matrix, in order to satisfy the coordination between the elements of the judgment matrix and avoid the inconsistency of the importance between the elements that affect the decision results[8],[9]. However, with the optimization of the calculation method, the consistency check process can be replaced by constructing a consistency matrix. that is, the judgment matrix A belongs to the antisymmetric matrix, B = lgA; If matrix C is an optimal transfer matrix of A, then A*=10c is the quasi optimal consistent matrix of judgment matrix A. Due to the consistency of this matrix, the traditional consistency verification process is omitted. (9) 1 1 ( ) n ij ik jknxn k C c b b n        (10) * c10A  (11) 4.3. Determination of Weighting Coefficients The methods to calculate the weights include sum method, product method and eigenvalue method, and this paper adopts the sum method to solve for the weight coefficients. The specific steps are as follows. Firstly, normalize each column element of the quasi- optimal uniform matrix, denoted as: D=[dij]nxn * * 1 ij n ij i a D a    (12) Then, sum the elements of matrix D in rows, denoted as: vector group:  1 2, , ..., T nC c c c 1 , (1, 2, ..., ) n i ij j c d i n    (13) Finally, the column elements in the vector group C are each divided by n to obtain the weight vector Wi. * *1 1 1 n ij i n j ij i a W n a     (14)  1 2, , ...,i nW w w w , (1, 2, ..., )i n , W are the weight coefficients of each attribute. 4.4. Implementation of Attribute Weight Coefficients Based on the model structure of the improved analytic hierarchy method described above, the weight coefficient of case attributes is calculated by using MATLAB software. Taking the decision matrix given by four experts as an example, according to Equations (7) and (8), the calculated similarity matrix A is as follows. lg   ij ijnxn B b A 137 1 1 0.4518 0.4083 0.2686 0.2272 1 1 0.4083 0.4083 0.3102 0.2272 2.2134 2.4495 1 1 0.4518 0.25 2 2 1 1 0.4518 0.2887 3.7224 3.2237 2.2134 2.2134 1 0.4518 4.4006 4.4006 4 3.4641 2.2134 1 A                     According to the weight calculation formulas (9) to (14) of the improved AHP method, combined with MATLAB programming, the weight coefficients of the case properties can be obtained: shape feature set (0.3887), basic parameter set (0.2316), heat treatment method (0.1287), material (0.1236), roughcast (0.0639) and part category (0.0635).  0.3887 0.2316 0.1287 0.1236 0.0639 0.0635iW  5. Application Cases This system is mainly based on the secondary development of SolidWorks API and Visual Studio software. By using feature recognition technology and CBR inference technology, it can meet the rapid design of the process. Finally, an intelligent process design system based on CBR is developed, which realizes the information extraction of 3D process models and intelligent matching of process cases. The overall operation interface of the system is shown in Figure 4 and 5. Taking the design of the roller shaft as an example, the similarity calculation model and weight calculation method are applied to this design scheme. Table 2 shows the contents of the case library of the roller shaft, and the attribute types include text, numeric, and feature types, so it can be solved using the global similarity model. By storing mature cases in the database, the numbers C1-C5 are partial cases, C= {c1, c2,...,c5}, and the case characteristic properties are described by U={u1,u2,...,u10} Table 2. Historical Case Feature Attribute Values Cases Part category roughcast material heat treatment Shaft length Maximum outer diameter roughness Machining accuracy Number of main features number of auxiliary features C1 shaft Bar stock 45 tempering 2350 140 0.8 7 13 11 C2 shaft Bar stock 40cr quench 100 50 0.4 6 8 6 C3 shaft Bar stock 45 tempering 2258 146 3.2 9 11 12 C4 shaft Bar stock 35 anneal 4300 450 6.3 5 18 12 C5 shaft Bar stock 45 anneal 2105 160 3.2 7 10 9 (1) Target part information extraction and output. By the function interfaces of Feature, GetFirstAnnotation2 and GetCustomProperty, the feature traversal and information extraction of the eight process parameters of the target part are carried out in the SolidWorks software. That is, click the "Information Extraction" button, the system extracts the attribute information of the category, roughcast, material, heat treatment, shaft length, maximum outer diameter, roughness, machining accuracy, number of main features, and number of auxiliary features of the target part. The information is automatically output to the system application interface, as shown in Figure 4, for the next intelligent process retrieval by the designer. (2) Retrieval and matching of similar process cases. Based on the similarity calculation model and attribute weight calculation method studied above, the similarity calculation between the extracted target case attribute information and the case in the database is calculated. By clicking the " Retrieval " button and setting a threshold, match the cases that meet the requirements and sort them by overall similarity, as shown in Figure 5. (3) Modification of the case and output of the process card. From the system interface, it can be seen that the most similar process case (97.18%) is reused. After modification and adjustment, the final output is a process card that matches the current target part. This enables the reuse of similar process cases and the rapid design of part processes. Figure 4. Information extraction of the target part 138 Figure 5. The cases retrieval results 6. Conclusion This paper studies the problems of mechanical parts that cannot effectively use enterprise resources and insufficient rapid response ability to the market when designing the process. Taking the roller shaft of belt conveyor as an example, the description and expression of different attribute information in shaft process cases are given, and a global similarity calculation model is established. By combining CBR technology and feature recognition technology, an intelligent process design system was developed. The feasibility of applying this method to the process system is verified by case studies, and the retrieval and reuse of cases are realized. Thus, the process design efficiency of shaft parts is greatly improved, and it provides a reference for the research of intelligent process design of mechanical parts. References [1] Ren Gongchang,Tang Yali.Green products innovative design process model based on CBR[J].Machinery Design & Manufacture, 2019, 341(07):254-257. [2] Chen Jianjun,Ge Ruhai,LIU Defang,et al.Applications of case retrieval based on improved AHP and grey relational analysis [J]. Manufacturing Automation,2012,34(11):85-88. [3] Jiang Zhansi,Chen Liping,Luo Nianmeng.Similarity analysis in nearest-neighbor case retrieval[J].Computer Integrated Manufacturing Systems,2007,(06):1165-1168. [4] Liu Yu,Ben Kerong.A new approach based on similarity rough set for determining case feature weights[J].Information and Control, 2012, 18(6):1230-1235. [5] Yang Baohua,Gu Lichuan,Li Shaowen.Improved algorithm for case feature weight based on sensitivity analysis [J].Computer Science, 2010, 37(5):194-196. [6] Liu Fengshan.Approximate nearest neighbor search algorithms and their application [D].Nanjing:Nanjing University,2021. [7] Zhang Chi.Index weight scheme design based on improved analytic hierarchy process[J].New Technology & New Products of China, 2022, 472(18):139-141. [8] Li Bo, Huang Xinjing.Application of matlab software algorithm in analytic hierarchy process[J].Techniques of Automation and Applications,2018,37(12):35-38. [9] Ren Shengbing, Feng Di,Chen Xiaonan.Grey analytic hierarchy process using optimal transfer matrix[J].Computer Engineering and Applications, 2017,53(18):44-50.