A processing chain reuse method based on knowledge graph representation learning
The method addresses the challenge of reusing processing chains for customized products by using knowledge graph representation learning with the TransD model to calculate multi-attribute similarity, facilitating efficient reuse and decision-making in mechanical processing.
Patent Information
- Application Number
- CN202210438900.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-04-25
AI Technical Summary
Existing mechanical processing methods struggle to efficiently reuse processing chains for small-batch customized products due to the challenges of personalized, diversified, and dynamic product demands, leading to difficulties in decision-making and poor reusability of process knowledge.
A processing chain generation method based on knowledge graph representation learning, utilizing the TransD model to transform entities and relationships into low-dimensional dense vectors, calculating multi-attribute similarity to reuse historical processing chains.
Enables efficient retrieval and reuse of processing chains by leveraging knowledge graph representation learning, enhancing the ability to respond to dynamic changes and support high-quality customized product production.
Smart Images

Figure CN114781641B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mechanical processing process planning, and specifically is a processing chain generation method based on knowledge graph representation learning. Background Art
[0002] Knowledge graph is a technical method that uses a graph model to describe knowledge and model the relationship between all things in the world. Knowledge graph aims to identify, discover and infer the complex relationships between things or concepts from data. It is a computable model of the relationship between things. It has the ability to access multi-source data in the construction of knowledge base, which is more efficient than traditional manual methods. The representation learning of knowledge graph is to map the semantic information of entities and relationships in the knowledge graph into a low-dimensional dense vector for representation. Through the training of a large number of knowledge triples in the knowledge graph, the vector representation is obtained to express the semantic content of the entity relationship, which is convenient for downstream knowledge reasoning and calculation. At present, the application of knowledge graph in the machinery industry has gradually developed. Some companies have built knowledge graphs in the vertical field of mechanical processing planning, such as machining process planning knowledge graph and cutting processing knowledge graph.
[0003] At the same time, as product demand tends to be personalized, diversified and dynamic, products are updated faster and have more styles, and the market share of small-batch customized products has increased significantly. Faced with the difficulties in making decisions on process methods and the poor reusability of process knowledge in small-batch customized products, there is an urgent need for an efficient process knowledge retrieval and reuse method to utilize relevant knowledge in process planning and reuse the processing chain of historical processing features. Under the existing methods, the process information model is generally established to match nodes or measure the similarity of structures, or typical process routes are extracted to achieve process knowledge reuse. This method can barely cope with the production and processing of large quantities of standardized workpieces, but it is difficult to cope with the diversification of customized product processing methods and the real-time requirements of decision-making, and it is difficult to respond to the dynamic change requirements of customized products.
[0004] Therefore, combined with the existing mechanical processing process planning knowledge graph, the representation learning technology of the knowledge graph is used to learn the vector representation for the knowledge triples in the process planning knowledge graph, and the similarity of the processing chain of the processing features is measured through semantic information to further realize the reuse of processing routes, respond to decision-making needs more quickly, and support the high-quality development of customized product production and manufacturing. Summary of the invention
[0005] The purpose of the present invention is to invent a processing chain generation method based on knowledge graph representation learning technology, use knowledge graph representation learning technology to learn a vector representation for each entity and relationship in the knowledge graph, transform each entity and relationship into a low-dimensional dense vector, thereby obtaining quantized real-valued data, and then calculate the similarity of processing feature entities with multi-attribute similarity, so as to further complete the reuse of historical processing chain information.
[0006] A method for processing chain reuse based on knowledge graph representation learning includes the following steps:
[0007] Step 1: Establish the process information model of the parts;
[0008] Step 2: Train vector representation based on TransD model
[0009] For a given knowledge triple (h, r, t), the TransD model is designed with a projection matrix M rh and M rt ,
[0010] After projection transformation, the vectors of the head entity h and the tail entity t are expressed as:
[0011] h ⊥ =M rh h,t ⊥ =M rt t
[0012] The TransD model is applied to the vector representation of the knowledge graph in the process planning field. The training process is as follows:
[0013] (1) The entities and relationships in the process planning knowledge graph are compiled into different files, and a unique ID is set for each entity and relationship; a new file is created to store triples, in which the entities and relationships in the triples are replaced by IDs, completing the processing of the data set;
[0014] (2) Enter the hyperparameters for TransD model training. The normalization term γ in the loss function is 1, and the loss function is:
[0015]
[0016] Where T represents positive samples, T′ represents negative samples, h represents the head entity, t represents the tail entity, γ represents the interval between positive samples and negative samples, and the larger the γ is, the larger the allowed error between triplets is; positive samples are obtained from the original data set, and negative samples are formed by randomly replacing the head entity or the tail entity in the original triplet;
[0017] Its scoring function f r as follows:
[0018]
[0019] (3) Calculate the loss through the stochastic gradient descent method SGD and update the model parameters; if the convergence condition is not met, then generate positive and negative examples in a loop to calculate the loss; if the convergence condition is met, obtain the final embedding vector;
[0020] Step 3: Multi-attribute similarity calculation based on vector representation
[0021] According to the vector representation trained by the TransD model, the features to be processed are regarded as target processing features, and the reusable historical processing features are regarded as similar processing features. The similarity of the four attributes of feature type FT, size feature SF, material feature MC, and precision feature AF belonging to the features to be processed is calculated respectively, and then the weighted sum is obtained to obtain the similarity value between the final processing features. The similarity between attributes is calculated using cosine similarity.
[0022] The attributes of feature MF are similarly measured by multi-attribute similarity calculation, and the processing chain in historical data is reused; the multi-attribute similarity calculation method is:
[0023]
[0024] In the formula, MF i With the characteristic MF j The multi-attribute similarity score of , FT, MC, AF, SF are the representation vectors of the corresponding attribute nodes, FT i ,MC i ,AF i ,SF i ∈MF i , FT j ,MC j ,AF j ,SF j ∈MF j , α, β, ω is the weight coefficient,
[0025] For α, β, ω The weights of the four types of indicators are determined, and the coefficient of variation method is used to assign weights. The weighted sum of the similarity scores of the four types of attributes is obtained to obtain the multi-attribute similarity value between the processing features.
[0026] Step 4: Use multi-attribute similarity to calculate scores for processing chain reuse
[0027] According to the obtained multi-attribute similarity value Sort and process the target feature MF i Select the similar machining feature MF with the highest score j, thus for the subordinate MF j The processing chain PC = {ME1, ME2, ME3…} is reused.
[0028] Further, the method of the first step is as follows:
[0029] The parts to be processed are disassembled into several processing features, expressed as:
[0030]
[0031] Where PMF represents the feature set of the part to be processed PM, MF i A feature unit is an information description of the processing feature. All feature units of a part constitute the feature information set of the part.
[0032] According to the machining information description required by process manufacturing, the feature unit MF of the workpiece is expressed in the following seven-tuple form:
[0033] MF={ID,FT,SF,MC,AF,PC,PFs}
[0034] In the formula, ID represents the serial number of the feature unit, FT represents its processing feature type, SF represents its size feature, MC represents its material feature, AF represents its precision feature, PC represents the processing chain of the feature unit, and PFs represents the preceding feature set, that is, the processing order of the part to be processed must take precedence over the feature unit serial number set of the feature, which is determined by the constraint relationship between features. This constraint relationship mainly includes four categories: rough-first-fine-last type constraint, surface-first-hole-last type constraint, datum priority type constraint, and primary-secondary priority type constraint.
[0035] The machining feature types FT are divided into 16 basic categories based on the geometric shape of the machining features, namely FT = {boss category, cavity category, groove category, protrusion category, fillet category, outer circle category, step category, plane category, rotational feature category, spherical crown category, contour category, thread category, mark category, knurling category, general volume removal category, rib top category}; each category is further divided into subcategories.
[0036] Dimensional features SF include positioning dimensions and shaping dimensions. Material features MC include material type and hardness. Accuracy features AF include dimensional tolerance and surface roughness.
[0037] The processing chain PC is a processing sequence composed of all processing elements ME under the feature unit MF, which can be expressed as:
[0038]
[0039] In the formula, MF represents the feature unit of the processing chain, ME i is the i-th processing element.
[0040] Processing element ME can describe a single processing method:
[0041] ME={ID,MN,MF,PM}#(4)
[0042] In the formula, ID represents the serial number of the processing element, MN represents the name of the processing method, MF represents the number of its subordinate feature unit, and PM represents the process equipment that can be used.
[0043] The beneficial effects of the present invention are: first, the efficient retrieval and resource organization capabilities of the knowledge graph are utilized to provide a high-quality data source for process knowledge reuse; second, in the knowledge graph representation learning, the TransD model is used to train vector representations for knowledge triples. Compared with other representation learning models, this model has a stronger learning ability for the semantic information and entity relationship structure information of the knowledge graph, can more fully represent the semantics, and provide an effective vector representation for processing chain reuse. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 Process information model of parts
[0045] Figure 2 TransD model schematic diagram
[0046] Figure 3 TransD model training process
[0047] Figure 4 Schematic diagram of multi-attribute similarity calculation
[0048] Figure 5 Partial diagram of the process planning knowledge graph
[0049] Figure 6 Processing chain reuse diagram DETAILED DESCRIPTION
[0050] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below. In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention can also be implemented in other ways different from this description, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0051] The relevant concepts of the present invention are defined as follows:
[0052] From a technological perspective, the parts to be processed are mainly composed of several processing features. Processing features refer to the specific geometric configuration of the parts, as well as a collection of information related to practical engineering significance and manufacturing requirements. They are the basic units for forming the geometric shape and information model of the parts. The machining process can be regarded as a process in which the workpiece is processed in accordance with the requirements of various processing features, and the blank is processed in sequence to finally form a part that meets the process requirements. Based on the machining process, scholars have proposed relevant definitions such as processing elements and part processing chains. In order to facilitate the expression of process information of parts in process planning, referring to the national standard GB / T 4863-2008, this paper defines concepts such as processing chains and processing elements, and establishes a process information model for parts.
[0053] First of all, the parts to be processed can be disassembled into several processing features as a whole, which can be expressed mathematically as follows:
[0054]
[0055] Where PMF represents the feature set of the part to be processed PM, MF i A feature unit is an information description of the processing feature. All feature units of a part constitute the feature information set of the part.
[0056] Secondly, according to the machining information description required by the process manufacturing, the feature unit MF of the workpiece can be expressed in the following seven-tuple form:
[0057] MF={ID,FT,SF,MC,AF,PC,PFs}#(2)
[0058] In the formula, ID represents the serial number of the feature unit, FT represents its processing feature type, SF represents its size feature, MC represents its material feature, AF represents its precision feature, PC represents the processing chain of the feature unit, and PFs represents the preceding feature set, that is, the processing order of the part to be processed must take precedence over the feature unit serial number set of the feature, which is determined by the constraint relationship between features. This constraint relationship mainly includes four categories: rough-first-fine-last type constraint, surface-first-hole-last type constraint, datum priority type constraint, and primary-secondary priority type constraint.
[0059] According to the current standards, combined with ISO's definition of machining features as "the volume of material that should be removed from the blank to obtain the final geometric shape of the part", the machining feature type FT can be divided into 16 basic categories based on the geometry of the machining features, namely FT = {boss, cavity, groove, protrusion, fillet, outer circle, step, plane, rotation feature, spherical crown, profile, thread, mark, knurl, general removal volume, rib top}. Each category can be further divided into subcategories, such as the boss can be further divided into circular boss and rectangular boss, etc.
[0060] Dimensional features SF mainly include positioning dimensions and final dimensions. Material features MC mainly include material type, hardness, etc. Accuracy features AF mainly include dimensional tolerance and surface roughness, etc.
[0061] The processing chain PC is a processing sequence composed of all processing elements ME under this feature, which can be expressed as:
[0062]
[0063] In the formula, MF represents the characteristic unit to which the processing chain belongs, and ME is the processing element. For example, if the processing method of a plane is rough milling ME1-semi-finishing milling ME2-finishing milling ME3, then its processing chain PC can be expressed as: {ME1, ME2, ME3}.
[0064] The processing element ME can describe a single processing method and can be expressed in the following four-tuple form:
[0065] ME={ID,MN,MF,PM}#(4)
[0066] In the formula, ID represents the serial number of the processing element, MN represents the name of the processing method, MF represents the number of its subordinate feature unit, and PM represents the process equipment that can be used.
[0067] Figure 1 It is a schematic diagram of the part process information model established by the present invention, in which elements such as feature units, processing elements and the relationship between them are expressed.
[0068] Therefore, processing elements are the basic elements in the processing chain formed based on features, and the processing chain is a collection of processing methods for a single processing feature. In small-batch customized products, the processing chain of a single processing feature is determined, and then the priority of each processing chain is calculated and balanced through the optimization model, and finally the processing resources are integrated and scheduled to formulate the optimal processing route. Therefore, the determination of the processing chain is the basis, and it is also an important part of the intelligent generation of process routes for customized products. Through the processing chain, fine-grained processing methods can be further matched, thereby organizing a wide range of processing resources and scheduling production machines in real time.
[0069] Based on the above definitions and analysis of the machining process, the present invention will take the generation of machining chains of machining features as the main content, learn vector representations of knowledge triples for process planning knowledge graphs through knowledge graph representation learning methods, and then reuse historical machining chains by calculating the node similarity of attributes, ultimately realizing the generation of machining chains.
[0070] The technical solution of the present invention is as follows:
[0071] ①Training vector representation based on TransD model
[0072] In the knowledge graph, data is stored in triples, where nodes represent entities and different types of edges represent relationships. In order to more directly describe entities and relationships in the knowledge graph, triples are usually expressed in the following form:
[0073] T=(h,r,t)#(5)
[0074] In the formula, h represents the head entity, t represents the tail entity, and r represents the relationship between them.
[0075] The representation of triples is such as (machine tool, kind-of, milling machine), but this representation based on discrete symbols is difficult to express the corresponding semantic information and perform semantic calculations in the computer, so the knowledge graph representation learning technology came into being. Knowledge graph representation learning uses the idea of word vectors. By learning a vector representation for each entity and relationship in the knowledge graph, each entity and relationship is converted into a low-dimensional dense vector, thereby obtaining quantized real-valued data. Commonly used knowledge representation learning models include TransE, TransR, TransD, etc. Among them, the TransE model cannot support one-to-many or many-to-many types of relationships, and the TransR model calculation is too complex. The TransD model can support many pairs of relationships and has a lower computational difficulty. Taking into account the computational complexity, model effect and the dynamic growth characteristics of process data, after comparative analysis, the present invention adopts the TransD model to generate representation vectors of knowledge graph entities and relationships. The principle of the TransD model is as follows Figure 2 As shown, for a given knowledge triple (h, r, t), the TransD model designs a projection matrix M rh and M rt :
[0076]
[0077] In the formula, w r ∈R m , w h , w t ∈R n , all three are projection vectors, and I is the unit moment.
[0078] After projection transformation, the vectors of the head entity h and the tail entity t can be expressed as:
[0079] h ⊥ =M rh h,t ⊥ =M rt t#(7)
[0080] The present invention applies the TransD model to the vector representation of the knowledge graph in the process planning field. The training process is as follows: Figure 3 As shown, the steps are as follows:
[0081] (1) First, the entities and relations in the process planning knowledge graph are compiled into the files entity2id.txt and relation2id.txt respectively, and a unique ID is set for each entity and relationship; a new file triple.txt is created to store triples, in which the entities and relations in the triples are replaced by IDs, completing the processing of the data set.
[0082] (2) Then enter the hyperparameters for TransD model training. The main hyperparameters are: learning rate 0.001, batch size set to 100, number of iterations to 200, dimension K to 100, and the normalization term γ in the loss function to 1. The loss function is:
[0083]
[0084] In the formula, T represents positive samples, T′ represents negative samples, h represents the head entity, t represents the tail entity, γ represents the interval between positive samples and negative samples, and the larger the γ is, the greater the error allowed between triplets. Positive samples are obtained from the original data set, and negative samples are formed by randomly replacing the head entity or tail entity in the original triplet.
[0085] Its scoring function f r as follows:
[0086]
[0087] (3) Finally, the loss is calculated through SGD (stochastic gradient descent) and the model parameters are updated. If the convergence condition is not met, positive and negative examples are generated cyclically for loss calculation; if the convergence condition is met, the final embedding vector can be obtained.
[0088] ②Multi-attribute similarity calculation based on vector representation
[0089] According to the process information model of the part, the feature unit MF mainly includes seven types of information {ID, FT, SF, MC, AF, PC, PFs}, among which the processing feature type FT, size feature SF, material feature MC, and precision feature AF can be transformed from the demand information and design features, and the prior feature set PFs can be determined by rules based on the constraint relationship between the features. The processing chain PC contains several processing elements ME. For the processing chain under each feature, the existing methods often use manual formulation. This is because the determination of the processing chain requires the coordinated consideration of various processing methods and the accuracy that can be achieved by the method, and these conditions tend to be diversified. For example, for the processing of holes, you can choose "drill-expand-reamer", "drill-expand-pull", "rough boring-fine boring" and other processing chains. Therefore, the formulation of the processing chain is a complex decision-making problem that requires empirical knowledge and constraint rules. However, from the perspective of the workpiece itself, there are similarities in the processing features. If the material characteristics, precision characteristics, size characteristics and other conditions of the features to be processed are similar to the conditions of the historical processing features with a certain processing chain, then the historical processing chain can be reused, that is, the historical experience knowledge and constraint rules are reused. At the same time, if there is a larger scale of historical processing feature data, more accurate calculations can be performed. The large-scale knowledge triples of the knowledge graph just meet this demand.
[0090] Therefore, according to the vector representation trained by the TransD model, the similarity between the attributes of the processing features of the proposed processing chain and the attributes of the historical processing features in the knowledge graph can be calculated, so as to reuse the processing chain with the most similar historical processing features. Figure 4 As shown in the figure, the feature to be processed is regarded as the target processing feature, and the reusable historical processing feature is regarded as a similar processing feature. The similarity is calculated for the four attributes of feature type FT, size feature SF, material feature MC, and precision feature AF belonging to the processing feature, and then the weighted sum is given to obtain the similarity value between the final processing features.
[0091] Among them, the similarity between attributes is calculated using cosine similarity. For example, for attribute A, its vector is represented as [a1, a2…a n ], for attribute B, its vector is represented as [b1,b2…b n ], the cosine similarity calculation formula between two attributes is:
[0092]
[0093] In the formula, a i ∈A,b i ∈B, n is the vector dimension value, Sim(A,B)∈[0,1].
[0094] The attributes of feature MF are similarly measured by multi-attribute similarity calculation, and low-similar features are filtered out, so as to reuse the processing chain in historical data. The multi-attribute similarity calculation method is:
[0095]
[0096] In the formula, MF i With the characteristic MF j The multi-attribute similarity score of , FT, MC, AF, SF are the representation vectors of the corresponding attribute nodes, FT i ,MC i ,AF i ,SF i ∈MF i , FT j ,MC j ,AF j ,SF j ∈MF j , α, β, ω is the weight coefficient,
[0097] For α, β, The weights of the four types of indicators can be determined by subjective weighting or objective weighting. The subjective weighting method is difficult to implement and has subjectivity and uncertainty, while the objective weighting method is mainly determined by the characteristics of the data sample. In order to comprehensively consider the similarity scores determined by the four types of attributes for processing chain reuse, the present invention uses the coefficient of variation method for weight assignment. The calculation process is as follows:
[0098] (1) Generate the similarity matrix of each attribute. Since the similarity values of the four attributes are all within [0,1], there is no need to normalize them. The similarity matrix S can be obtained. e . S e It is a 4×n matrix containing 4 attribute similarity values and n pairs of similar features.
[0099]
[0100] In the matrix S e middle, Respectively represent the cosine similarity scores of the feature type, size feature, material feature, and precision feature of the i-th pair of similar features.
[0101] ⑵Calculate the mean and standard deviation of the similarity of each attribute.
[0102]
[0103]
[0104] Where D1, D2, D3, and D4 represent the standard deviations of the four attributes respectively.
[0105] ⑶ Calculate the coefficient of variation of each attribute similarity. The coefficient of variation reflects the relative degree of variation between indicators.
[0106]
[0107] (4) Normalize the coefficient of variation to obtain the weight of the similarity of each attribute.
[0108]
[0109] Thus, the final indicator weights α, β, ω. Use this weight to weight and sum the similarity scores of the four categories of attributes to obtain the multi-attribute similarity value between the processing features
[0110] ③ Use multi-attribute similarity to calculate scores for processing chain reuse
[0111] According to the obtained multi-attribute similarity value Sort and process the target feature MF i Select the similar machining feature MF with the highest score j , thus for the subordinate MF j The processing chain PC = {ME1, ME2, ME3…} is reused.
[0112] The present invention is described below in conjunction with embodiments.
[0113] Step ① Train vector representation based on TransD model
[0114] The knowledge graph used in this case is mainly constructed based on the part process information model. The knowledge triples of (entity, relationship, entity) are extracted from the process table or text data, and then the process planning knowledge graph is constructed. Figure 5 As shown in the figure, there are mainly two types of relationships: subordinate attribute relationship (attribute_of) and whole-part relationship (part_of). The relationship between the four types of attributes, namely, feature type FT, dimension feature SF, material feature MC, and precision feature AF, and the processing feature MF is attribute_of, and the relationship between the processing element ME in the processing chain PC and the processing feature MF is part_of. In actual implementation, the division of relationships can be adjusted according to the needs of the enterprise to formulate a process planning knowledge map that meets its own production environment.
[0115] Based on the TransD model, the triples of the process planning domain knowledge graph are trained. The entities and relations in the process planning knowledge graph are compiled into the files entity2id.txt and relation2id.txt respectively, and a unique ID is set for each entity and relationship. A new file triple.txt is created to store the triples, in which the entities and relations in the triples are replaced by IDs, and then used Figure 3 The training process of the TransD model described above is used to train the vector representation of each entity relationship. As shown in Table 1, there is a triple (10195, 10018, 10197), where the head entity is 10195, whose name is the outer circle class, and the trained vector representation is [0.7812, 0.0092, 0.0673, 0.0039...], where the vector dimension is determined by the training parameters, which is set to 100 dimensions in this case. Due to space limitations, the last 96 dimensions of the vector are omitted; the tail entity ID is 10196, whose name is feature F0025, and the trained vector representation is [0.7812, 0.0092, 0.0673, 0.0039...]; the relationship ID is 10018, whose name is attribute_of, and the trained vector representation is [0.1861, 0.0936, 0.0015, 0.0736...].
[0116] Table 1. Example of knowledge triple data
[0117]
[0118] Step ② Multi-attribute similarity calculation based on vector representation
[0119] According to the vector representation trained by the TransD model, the similarity calculation can be performed for each attribute of the processing feature of the proposed processing chain and each attribute of the historical processing feature in the knowledge graph, where the feature to be processed is regarded as the target processing feature, and the reusable historical processing feature is regarded as a similar processing feature. The similarity calculation of the four attributes of feature type FT, size feature SF, material feature MC, and precision feature AF belonging to the processing feature is performed using formula 10, and then the multi-attribute similarity calculation method corresponding to formula 11 is used to perform weighted summation on the similarity between the attributes. The weight is determined using the coefficient of variation method, i.e., formula 12-16, to finally obtain the similarity value between the processing features.
[0120] Calculation example: Figure 6 As shown in the figure, there is a part to be processed that contains a through-hole feature numbered F10895. The multi-attribute similarity is calculated using formula 11. Here, the weights obtained by the coefficient of variation method are α=0.39, β=0.25, ω=0.14, and the weighted sum of each attribute is used to obtain the multi-attribute similarity score between the target processing feature and the similar processing feature.
[0121] Step 3: Use multi-attribute similarity to calculate scores for processing chain reuse
[0122] By sorting the similarity scores, the historical processing features that are most similar to the target processing features can be obtained, such as Figure 6 As shown, after sorting, the historical processing feature F00931 that is most similar to F10895 is obtained, thereby realizing the reuse of the processing chain {drilling, reaming, boring}.
Claims
1. A method for reusing a processing chain based on knowledge graph representation learning, comprising the following steps: Step 1: Establish the process information model of the parts; Step 2: Train vector representation based on TransD model For a given knowledge triple (h, r, t), the TransD model is designed with a projection matrix M rh and M rt , After projection transformation, the vectors of the head entity h and the tail entity t are expressed as: h ⊥ =M rh h, t ⊥ =M rt t The TransD model is applied to the vector representation of the knowledge graph in the process planning field. The training process is as follows: (1) The entities and relationships in the process planning knowledge graph are compiled into different files, and a unique ID is set for each entity and relationship; a new file is created to store triples, in which the entities and relationships in the triples are replaced by IDs, completing the processing of the data set; (2) Enter the hyperparameters for TransD model training. The normalization term γ in the loss function is 1, and the loss function is: Where T represents positive samples, T′ represents negative samples, h represents the head entity, t represents the tail entity, γ represents the interval between positive samples and negative samples, and the larger the γ is, the larger the allowed error between triplets is; positive samples are obtained from the original data set, and negative samples are formed by randomly replacing the head entity or the tail entity in the original triplet; Its scoring function f r as follows: (3) Calculate the loss through the stochastic gradient descent method SGD and update the model parameters; if the convergence condition is not met, generate positive and negative examples in a loop to calculate the loss; if the convergence condition is met, obtain the final embedding vector; Step 3: Multi-attribute similarity calculation based on vector representation According to the vector representation trained by the TransD model, the features to be processed are regarded as target processing features, and the reusable historical processing features are regarded as similar processing features. The similarity of the four attributes of feature type FT, size feature SF, material feature MC, and precision feature AF belonging to the features to be processed is calculated respectively, and then the weighted sum is obtained to obtain the similarity value between the final processing features. The similarity calculation between attributes adopts cosine similarity; the attributes of feature MF are similarly measured through multi-attribute similarity calculation, and the processing chain in the historical data is reused; the multi-attribute similarity calculation method is as follows: In the formula, MF i With the characteristic MF j The multi-attribute similarity score of , FT, MC, AF, SF are the representation vectors of the corresponding attribute nodes, FT i , M.C. i , A.F. i , S.F. i ∈MF i , FT j , M.C. j , A.F. j , S.F. j ∈MF j , α, β, ω is the weight coefficient, For α, β, ω The weights of the four types of indicators are determined, and the coefficient of variation method is used to assign weights. The weighted sum of the similarity scores of the four types of attributes is obtained to obtain the multi-attribute similarity value between the processing features. Step 4: Use multi-attribute similarity to calculate scores for processing chain reuse According to the obtained multi-attribute similarity value Sort and process the target feature MF i Select the similar machining feature MF with the highest score j , thus for the subordinate MF j The processing chain PC = {ME1, ME2, ME3...} is reused.
2. The process chain reuse method according to claim 1, characterized in that: The first step is as follows: The parts to be processed are disassembled into several processing features, expressed as: Where PMF represents the feature set of the part to be processed PM, MF i The feature unit is the information description of the processing feature. All the feature units of a part constitute the feature information set of the part. According to the machining information description required by process manufacturing, the feature unit MF of the workpiece is expressed in the following seven-tuple form: MF={ID, FT, SF, MC, AF, PC, PFs} In the formula, ID represents the serial number of the feature unit, FT represents its processing feature type, SF represents its size feature, MC represents its material feature, AF represents its precision feature, PC represents the processing chain of the feature unit, and PFs represents the preceding feature set, that is, the processing order of the part to be processed must take precedence over the feature unit serial number set of the feature, which is determined by the constraint relationship between features. The constraint relationship mainly includes four categories: rough first and fine second type constraint, surface first and hole second type constraint, datum priority constraint, and primary and secondary priority constraint; The machining feature type FT is divided into 16 basic categories based on the geometric shape of the machining feature, namely FT = {boss, cavity, groove, protrusion, fillet, outer circle, step, plane, rotation feature, spherical cap, contour, thread, mark, knurl, general volume removal, rib top}; each category is further divided into subcategories; The dimensional feature SF includes the positioning dimension and the final dimension; the material feature MC includes the material type and hardness; the precision feature AF includes the dimensional tolerance and the surface roughness; The processing chain PC is a processing sequence composed of all processing elements ME under the feature unit MF, which can be expressed as: In the formula, MF represents the feature unit of the processing chain, ME i is the i-th processing element; Processing element ME can describe a single processing method: ME={ID,MN,MF,PM}#(4) In the formula, ID represents the serial number of the processing element, MN represents the name of the processing method, MF represents the number of its subordinate feature unit, and PM represents the process equipment that can be used.
