Process recommendation model training, process recommendation method and electronic equipment

Through the knowledge graph and graph similarity measurement algorithm combined with the sample processing feature subgraph to calculate the similarity of the attribute types, the problems of low efficiency and difficult semantic text similarity measurement in the existing process recommendation methods are solved, and efficient and accurate process recommendations are achieved.

CN114880457BActive Publication Date: 2025-08-29SHANG HAI QING YI GONG YE RUAN JIAN YOU XIAN GONG SI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210501295.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-09
Publication Date
2025-08-29
Estimated Expiration
2042-05-09

AI Technical Summary

Technical Problem

The existing process recommendation methods are inefficient, especially in large-scale instance libraries, and the search speed is significantly reduced, and it is difficult to measure the similarity of semantic text data.

Method used

The knowledge graph method is used to describe the process data examples, and the graph similarity measurement algorithm is used to combine the sample processing feature subgraph to calculate the similarity of the attribute types of each node in it, and the accuracy and efficiency of similarity calculation are improved through vectorization processing and weighted fusion.

Benefits of technology

It improves the accuracy and efficiency of the process recommendation model, reduces data processing volume, enhances the scalability and flexibility of the instance library, and realizes rapid process recommendation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114880457B_ABST
    Figure CN114880457B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of process recommendation technology, and specifically to the training of a process recommendation model, a process recommendation method, and an electronic device. The training method includes obtaining a sample processing feature subgraph pair and a target similarity between the sample processing feature subgraph pairs, wherein the target similarity is determined based on a similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph pair, and the attribute type includes a quantitative attribute and a semantic attribute; the sample processing feature subgraph pair is input into a preset process recommendation model to obtain a predicted similarity; based on the difference between the predicted similarity and the target similarity, the parameters of the preset process recommendation model are adjusted to determine a trained target process recommendation model. The proposed process recommendation model makes recommendations based on a process knowledge graph, and by converting graph structure data of different node attribute types into vector form and performing calculations between vectors, the accuracy and recommendation efficiency of the target process recommendation model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of process recommendation, and in particular to training of a process recommendation model, a process recommendation method and electronic equipment. Background Art

[0002] With the continuous development and widespread application of CAD / CAM systems, a large number of digital 3D CAD models and associated process data / knowledge are constantly being generated and stored in enterprise data / knowledge bases. For enterprises, manufactured products are not completely independent. Even with upgrades, the structural design and CNC processes of old and new products still have certain similarities and inheritances. Based on this, various process recommendation methods have emerged.

[0003] Case-based reasoning (CBR) is a key branch of artificial intelligence in process recommendation. It primarily uses analogical reasoning based on past examples or experience, simulating the thinking and methods of human problem-solving. When making process recommendations, CBR first searches the case library for the most similar instance. Then, based on certain rules, it chooses to directly adopt the result of that instance or modify it before adopting it. The instance is saved, enabling dynamic learning of the case library. Currently, the most commonly used retrieval algorithm in CBR is the nearest neighbor method, which calculates the similarity between the current instance and instances in the case library according to certain rules and then determines the retrieval result based on the similarity. The greatest difficulty with this method lies in properly evaluating the difference distance between different instances. In particular, similarity measurement is difficult for semantic text data. Furthermore, the nearest neighbor method is essentially a brute-force search method, and its retrieval speed decreases significantly as the case library expands. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a process recommendation model training, a process recommendation method, and an electronic device to solve the problem of low efficiency of process recommendation.

[0005] According to a first aspect, an embodiment of the present invention provides a method for training a process recommendation model, comprising:

[0006] Obtaining a sample processing feature subgraph pair and a target similarity between the sample processing feature subgraph pairs, wherein the target similarity is determined according to a similarity metric corresponding to an attribute type of each node in the sample processing feature subgraph pair, wherein the attribute type includes a quantitative attribute and a semantic attribute;

[0007] Inputting the sample processing feature subgraph into a preset process recommendation model to obtain a predicted similarity;

[0008] Based on the difference between the predicted similarity and the target similarity, the parameters of the preset process recommendation model are adjusted to determine a trained target process recommendation model.

[0009] The training method of the process recommendation model provided by the embodiment of the present invention utilizes the knowledge graph method to realize the instance description of the process data, and then uses it for actual retrieval based on the graph similarity measurement algorithm. In the actual retrieval process, the similarity is calculated by combining the similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph. That is, by converting the graph structure data of different node attribute types into vector form and performing calculations between vectors, the calculation of the similarity between nodes of various types is guaranteed, and the accuracy and recommendation efficiency of the trained target process recommendation model are improved. Accordingly, the efficiency of subsequent process recommendation using the target process recommendation model is improved.

[0010] In combination with the first aspect, in a first implementation of the first aspect, obtaining the target similarity between the sample processing feature subgraph pairs includes:

[0011] Determining the corresponding attribute type based on the data type of each node in the sample processing feature subgraph;

[0012] Determining the similarity between corresponding nodes in the sample processing feature subgraph pair using a similarity measurement method corresponding to the attribute type;

[0013] The similarities between corresponding nodes in the sample processing feature subgraphs are fused to determine the target similarity.

[0014] The training method of the process recommendation model provided by the embodiment of the present invention obtains the corresponding attribute type through the data type of each node in the sample processing feature subgraph, thereby determining an accurate similarity measurement method, and then fuses the similarities between the nodes, thereby improving the accuracy of the determined target similarity.

[0015] In combination with the first implementation of the first aspect, in the second implementation of the first aspect, determining the similarity between corresponding nodes in the sample processing feature subgraph pair by using the similarity measurement method corresponding to the attribute type includes:

[0016] When the attribute type is the quantitative attribute, similarity calculation is performed based on the values ​​of corresponding nodes in the sample processing feature subgraph to obtain the similarity;

[0017] When the attribute type is the semantic attribute, similarity is calculated based on the edit distance between the character strings of corresponding nodes in the sample processing feature subgraph to obtain the similarity.

[0018] The training method of the process recommendation model provided by the embodiment of the present invention directly uses the corresponding data to perform similarity calculation when the attribute type is a quantitative attribute, so as to reduce the data processing amount caused by data conversion; when the attribute type is a semantic attribute, the similarity is calculated using the edit distance between character strings. Since the edit distance is used to measure the similarity between different words and describes the degree of similarity between two character strings, the similarity between the nodes of the semantic attribute is described using the edit distance, thereby improving the accuracy of the similarity calculation of the semantic attribute.

[0019] In combination with the first implementation of the first aspect, in the third implementation of the first aspect, fusing the similarities between corresponding nodes in the sample processing feature subgraphs to determine the target similarity includes:

[0020] Get the weight corresponding to each similarity;

[0021] A weighted calculation is performed based on the weight and the corresponding similarity to determine the target similarity.

[0022] The training method of the process recommendation model provided by the embodiment of the present invention utilizes a weighted approach to fuse various similarities, thereby achieving determination of target similarities with reduced computational effort, thereby improving data processing efficiency.

[0023] In combination with the first aspect or any one of the first to third embodiments, in a fourth embodiment of the first aspect, inputting the sample processing feature subgraphs into a preset process recommendation model to obtain a predicted similarity includes:

[0024] Vectorizing the sample processing feature subgraph pair using the vector module in the preset process recommendation model to obtain a sample processing feature vector pair with the same dimension;

[0025] The similarity of the sample processing feature vector pairs is calculated using the similarity module in the preset process recommendation model and the similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph to determine the predicted similarity.

[0026] The training method of the process recommendation model provided by the embodiment of the present invention first processes the input sample processing feature subgraph pairs into sample processing feature vector pairs of the same dimension before performing processing by the similarity module to ensure that subsequent similarity calculation can be performed.

[0027] In combination with the fourth embodiment of the first aspect, in the fifth embodiment of the first aspect, vectorizing the sample processing feature subgraph pair using the vector module in the preset process recommendation model to obtain the sample processing feature vector pair with the same dimension includes:

[0028] Vectorizing the nodes of the sample processing feature subgraph pair using the graph convolution network module in the vector module to obtain a node vector pair;

[0029] The node vector pairs are graph-vectorized using the attention network module in the vector module to obtain sample processing feature subgraph vector pairs with the same dimension.

[0030] The training method of the process recommendation model provided by the embodiment of the present invention vectorizes the nodes of the sample processing feature subgraph pair, that is, node embedding; then, graph-level vectorization, that is, graph embedding, is performed to obtain the sample processing feature vector pair. By vectorizing the sample processing feature subgraph pair in sequence according to the hierarchical relationship, it is ensured that the obtained sample processing feature relative retains the information of each node and integrates the overall information of the sample processing feature subgraph, thereby improving the accuracy of the obtained sample processing feature vector pair.

[0031] According to the second aspect, an embodiment of the present invention further provides a process recommendation method, comprising:

[0032] Obtaining processing features to be recommended;

[0033] Constructing a processing feature subgraph to be recommended based on the relationship between the processing features;

[0034] Inputting the to-be-recommended processing feature subgraph and each processing feature subgraph in the process knowledge graph into a target process recommendation model, obtaining at least one target processing feature subgraph in the process knowledge graph having the highest similarity to the to-be-recommended processing feature subgraph, the process knowledge graph including processing feature subgraphs and processing technology subgraphs, the processing feature subgraphs and the processing technology subgraphs having a corresponding relationship, and the target process recommendation model being trained according to the process recommendation model training method described in the first aspect of the present invention or any one of the embodiments of the first aspect;

[0035] A search is performed in the process knowledge graph based on the target processing feature subgraph, and a target processing technology subgraph corresponding to the target processing feature subgraph is determined to determine a recommended processing technology.

[0036] The process recommendation method provided by an embodiment of the present invention uses the above-mentioned method to train a target process recommendation model to determine at least one target processing feature subgraph. Since the target process recommendation model is processed based on graph data and the similarity calculation is based on the attribute type of the node for differentiation calculation, the efficiency of determining the target processing feature subgraph is improved. On this basis, the process knowledge graph is retrieved to ensure the retrieval efficiency of the target processing process subgraph.

[0037] In conjunction with the second aspect, in a first implementation of the second aspect, constructing a processing feature subgraph to be recommended based on the relationship between the processing features includes:

[0038] Based on the relationship between the processing features, determining the parent node corresponding to the processing feature;

[0039] The processing feature subgraph to be recommended is constructed based on the parent node and the processing feature.

[0040] The process recommendation method provided by the embodiment of the present invention utilizes the relationship between processing features to determine the parent node, and then determines the child nodes based on the relationship, thereby improving the accuracy of the processing feature subgraph to be recommended.

[0041] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the computer instructions to execute the training method of the process recommendation model described in the first aspect or any one embodiment of the first aspect, or executes the process recommendation method described in the second aspect or any one embodiment of the second aspect.

[0042] According to the fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the training method of the process recommendation model described in the first aspect or any one embodiment of the first aspect, or execute the process recommendation method described in the second aspect or any one embodiment of the second aspect.

[0043] It should be noted that, for the corresponding effects of the electronic device or computer-readable storage medium provided by the embodiments of the present invention, please refer to the description of the corresponding beneficial effects of the training method of the process recommendation model or the process recommendation method above, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 is a flowchart of a method for training a process recommendation model according to an embodiment of the present invention;

[0046] Figure 2 is a schematic diagram of a sample processing feature subgraph according to an embodiment of the present invention;

[0047] Figure 3 is a flowchart of a method for training a process recommendation model according to an embodiment of the present invention;

[0048] Figure 4 is a flowchart of a method for training a process recommendation model according to an embodiment of the present invention;

[0049] Figure 5 is a schematic diagram of training a process recommendation model according to an embodiment of the present invention;

[0050] Figure 6 is a schematic diagram of training a process recommendation model according to an embodiment of the present invention;

[0051] Figure 7 is a schematic diagram of a process recommendation method according to an embodiment of the present invention;

[0052] Figure 8 is a schematic diagram of a process knowledge graph according to an embodiment of the present invention;

[0053] Figure 9 is a structural block diagram of a training device for a process recommendation model according to an embodiment of the present invention;

[0054] Figure 10 is a structural block diagram of a process recommendation device according to an embodiment of the present invention;

[0055] Figure 11 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0057] The training method of the process recommendation model and the process recommendation method provided by the embodiments of the present invention are based on instance reasoning and introduce a graph similarity measurement method to solve the problems existing in the existing CBR method for process recommendation, namely: knowledge representation cannot be effectively and uniformly represented, lacks scalability and flexibility, resulting in difficulty in reusing and sharing process knowledge; the existing instance retrieval method is inefficient and time-consuming to recommend process knowledge, and the nearest neighbor method has problems in text similarity measurement and measurement efficiency, so as to realize rapid process recommendation.

[0058] Furthermore, in an embodiment of the present invention, a graph similarity metric is used to perform process recommendations, with the input data being graph-structured data. This approach avoids the tedious steps of prior classification followed by a brute-force search for similarity measurement. This embodiment directly utilizes a target process recommendation model for process recommendations, avoiding a brute-force search and improving process recommendation efficiency.

[0059] As an optional application scenario of the process recommendation method in this embodiment, the process recommendation method is applied to electronic devices, such as computers or servers. When parts processing is required, the processing characteristics of the target product are input into the electronic device, and the recommended process is determined based on the processing characteristics and the target process recommendation model; the recommended process is then sent to the parts processing equipment to achieve the processing of the parts. Alternatively, the input of the processing characteristics of the target product is input on the parts processing equipment, and sent by the parts processing equipment to the electronic device, and accordingly, the electronic device obtains the processing characteristics of the target product. When the electronic device is a server, the server can make process recommendations for multiple parts processing equipment.

[0060] As another optional application scenario for the process recommendation method in this embodiment, the process recommendation method is applied to parts processing equipment, such as CNC machine tools. The parts processing equipment has a built-in target process recommendation model. When a target product needs to be processed, the user inputs the processing characteristics of the target product on the parts processing equipment. The parts processing equipment then executes the process recommendation method described in this embodiment of the present invention to determine a recommended process, which the parts processing equipment then uses to process the target product.

[0061] It should be noted that the processing technology determined by the target process recommendation model can be used as a reference, and users can make adjustments based on this to better suit the processing of the product. For example, the processing technology determined by the target process recommendation model is displayed on the interface of an electronic device, and the user can adjust the processing technology by interacting with the electronic device to determine the processing technology used to process the target product. Of course, the processing technology determined by the target process recommendation model can also be directly used to process the target product.

[0062] The process recommendation method provided in the embodiment of the present invention can also be applied in other scenarios. The above is only an example and does not limit the scope of protection of the present invention. The specific application scenario is set according to actual needs.

[0063] According to an embodiment of the present invention, a training method for a process recommendation model and an embodiment of a process recommendation method are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0064] In this embodiment, a training method for a process recommendation model is provided, which can be used in electronic devices such as computers, CNC machine tools, servers, etc. Figure 1 FIG. 1 is a flow chart of a method for training a process recommendation model according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0065] S11, obtaining sample processing feature sub-graph pairs and target similarities between sample processing feature sub-graph pairs.

[0066] The target similarity is determined based on a similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph, and the attribute type includes quantitative attributes and semantic attributes.

[0067] A sample processing feature subgraph pair is a combination of two sample processing feature subgraphs. For example, two sample processing feature subgraphs corresponding to hole features constitute a sample processing feature subgraph pair, and two sample processing feature subgraphs corresponding to slot features constitute a sample processing feature subgraph pair. The sample processing feature subgraphs are constructed using the process data of the processed product. For example, CAM process files are obtained from the factory. Processing features and processing process data can then be extracted using a process feature extraction algorithm, which is specifically implemented using graph matching. Of course, the process feature extraction algorithm is not limited to the graph matching method described above and can also be implemented using other methods.

[0068] Specifically, machining features include hole features and slot features. Hole features can be further categorized into: precision through holes, simple through holes, precision blind holes, simple pointed-bottom blind holes, threaded holes, etc. Slots can be further categorized into: through-waist slots, non-through-waist slots, etc. Machining processes include various steps, such as machining steps, tool types, tool selection criteria, machining depth, and machining methods.

[0069] It should be noted that the scope of processing features and processing techniques is not limited to the above, and other processing features or processing techniques may also be set according to actual needs, which depends on the design requirements of the parts processing equipment, etc.

[0070] For example, Figure 2An example of a sample machining feature subgraph is shown. This subgraph is attribute features of a fine-sized through-hole feature under the hole feature. The attribute features include aperture, aspect ratio, precision, and roughness. The sample machining feature subgraph is determined based on the relationship between machining features.

[0071] The target similarity between pairs of sample processing feature subgraphs is the label for subsequent training of the preset process recommendation model. It is determined by the similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph pair. In other words, different similarity measurement methods are used for different attribute types. Specifically, quantitative attributes, i.e., nodes in the sample processing feature subgraph, are represented by numerical values; semantic attributes, i.e., nodes in the sample processing feature subgraph, are represented by character strings. For example, Figure 2 Node Ra0.8 in.

[0072] For similarity between nodes with quantitative attributes, the difference calculation can be performed directly using the corresponding numerical values ​​of the nodes. For similarity between nodes with semantic attributes, the distance between the corresponding character strings can be used, and so on. After obtaining the similarity between each node, the electronic device integrates all similarities, for example, using a weighted sum or mean, to determine the target similarity.

[0073] This step will be described in detail below.

[0074] S12, inputting the sample processing feature subgraph into the preset process recommendation model to obtain the predicted similarity.

[0075] The input of the preset process recommendation model is a pair of processing feature graphs, and the output is the predicted similarity between these pairs of processing feature graphs. For this preset process recommendation model, the sample processing feature subgraph pairs are vectorized and then similarity is calculated to obtain the predicted similarity. The similarity calculation is the same as the target similarity calculation in S11 above, that is, different similarity metrics are used for different attribute types.

[0076] There is no limitation on the specific structural details of the preset process recommendation model herein. It is only necessary to ensure that the preset process recommendation model can determine the corresponding predicted similarity for the two input sample processing feature subgraphs.

[0077] This step will be described in detail below.

[0078] S13: Based on the difference between the predicted similarity and the target similarity, the parameters of the preset process recommendation model are adjusted to determine a trained target process recommendation model.

[0079] The electronic device uses the predicted similarity and target similarity to calculate a loss function, determining the loss. Based on this loss, the electronic device adjusts the parameters of the pre-set process recommendation model. After multiple iterations of minimizing the model's loss function, the trained target process recommendation model is determined. The loss function is set based on actual needs and is not subject to any restrictions.

[0080] The training method of the process recommendation model provided in this embodiment uses the knowledge graph method to realize the instance description of process data, and then uses it for actual retrieval based on the graph similarity measurement algorithm. In the actual retrieval process, the similarity is calculated by combining the similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph. That is, by converting the graph structure data of different node attribute types into vector form and performing calculations between vectors, the calculation of the similarity between nodes of various types is guaranteed, and the accuracy and recommendation efficiency of the trained target process recommendation model are improved. Accordingly, the efficiency of subsequent process recommendation using the target process recommendation model is improved.

[0081] In this embodiment, a training method for a process recommendation model is provided, which can be used in electronic devices such as computers, CNC machine tools, servers, etc. Figure 3 FIG. 1 is a flow chart of a method for training a process recommendation model according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0082] S21 , obtaining sample processing feature subgraph pairs and target similarities between the sample processing feature subgraph pairs.

[0083] The target similarity is determined based on a similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph, and the attribute type includes quantitative attributes and semantic attributes.

[0084] Specifically, the above S21 includes:

[0085] S211, obtaining a sample processing feature subgraph pair.

[0086] For information on how to obtain sample processing feature sub-graph pairs, see Figure 1 The corresponding description of the illustrated embodiment S11 is omitted here.

[0087] S212: Determine the corresponding attribute type based on the data type of each node in the sample processing feature subgraph.

[0088] After acquiring the sample processing feature subgraph pair, the electronic device analyzes the data type of each node, such as integer, floating point, character, etc., and determines the corresponding attribute type. If the data type is numeric, the attribute type is determined to be quantitative; if the data type is character, the attribute type is determined to be semantic.

[0089] S213 , using a similarity measurement method corresponding to the attribute type, determining the similarity between corresponding nodes in the sample processing feature subgraph pair.

[0090] After determining the attribute type, the electronic device calculates the similarity between corresponding nodes using a similarity measurement method corresponding to the attribute type.

[0091] In some optional implementations, the above S213 includes:

[0092] (1) When the attribute type is a quantitative attribute, similarity is calculated based on the numerical values ​​of the corresponding nodes in the sample processing feature subgraph to obtain the similarity.

[0093] (2) When the attribute type is a semantic attribute, the similarity is calculated based on the edit distance between the character strings of the corresponding nodes in the sample processing feature subgraph to obtain the similarity.

[0094] For quantitative attributes, they can be described by value expressions, including aperture, diameter ratio, precision, roughness, slot length, slot width, etc. Specifically, the following formula is used to calculate the similarity between nodes belonging to quantitative attributes:

[0095]

[0096] Among them, X and Y are two sample processing feature subgraphs, Represents the i-th feature attribute of X and Y respectively, max(C i ) is the maximum value of the i-th feature attribute in all sample processing feature subgraphs, min(C i ) is the minimum value of the i-th feature attribute in all sample processing feature subgraphs.

[0097] During model design, semantic attributes are primarily described using strings or sets of strings, which cannot be quantified. Examples include feature types and feature names. The similarity between the strings "simple conical bottom blind hole" and "precision-sized conical bottom blind hole" is greater than the similarity between the strings "simple conical bottom blind hole" and "waist-shaped groove." Because semantic attributes are primarily represented by strings, these descriptions cannot be quantified. Traditional semantic attribute measurement formulas directly use 0 and 1 to determine semantic attributes. For example, the following formula is inaccurate for semantic attribute determination:

[0098]

[0099] Based on this, in this embodiment, the edit distance is used to measure the similarity between two character strings. The edit distance refers to the shortest distance between one character string and another character string, which describes the similarity between the two character strings.

[0100] The calculation method of the edit distance is set according to actual needs. It only needs to ensure that it can calculate the distance between two strings and use the distance between the strings to represent the similarity.

[0101] When the attribute type is quantitative, the corresponding data is directly used for similarity calculation to reduce the amount of data processing caused by data conversion. When the attribute type is semantic, the edit distance between strings is used for similarity calculation. Since the edit distance is used to measure the similarity between different words and describes the degree of similarity between two strings, the use of edit distance to describe the similarity between nodes of semantic attributes improves the accuracy of similarity calculation of semantic attributes.

[0102] S214 , fusing the similarities between corresponding nodes in the sample processing feature subgraphs to determine the target similarity.

[0103] As described above, the fusion may adopt weighted sum, mean, etc., that is, all similarities calculated in the above S213 are fused to determine the target similarity.

[0104] In some optional implementations, the above S214 includes:

[0105] (1) Obtain the weights corresponding to each similarity.

[0106] (2) Perform weighted calculation based on the weight and the corresponding similarity to determine the target similarity.

[0107] The weights corresponding to each similarity are set according to actual needs and are not limited here. Alternatively, to reduce the complexity of data processing, different weights can be set for different attribute types, that is, the weights of the same attribute types are the same. After the weights are determined, the electronic device can calculate the target similarity based on the following formula:

[0108]

[0109] By using a weighted method to fuse the various similarities, the target similarity can be determined by reducing the amount of calculation, thereby improving data processing efficiency.

[0110] S22, inputting the sample processing feature subgraph into the preset process recommendation model to obtain the predicted similarity.

[0111] For details, please see Figure 1 S12 of the illustrated embodiment will not be described in detail here.

[0112] S23 , based on the difference between the predicted similarity and the target similarity, adjusting the parameters of the preset process recommendation model to determine a trained target process recommendation model.

[0113] For details, please see Figure 1 S13 of the illustrated embodiment will not be described in detail here.

[0114] The training method of the process recommendation model provided in this embodiment obtains the corresponding attribute type through the data type of each node in the sample processing feature subgraph, thereby determining an accurate similarity measurement method, and then fuses the similarities between the nodes, thereby improving the accuracy of the determined target similarity.

[0115] In this embodiment, a training method for a process recommendation model is provided, which can be used in electronic devices such as computers, CNC machine tools, servers, etc. Figure 4 FIG. 1 is a flow chart of a method for training a process recommendation model according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0116] S31, obtaining sample processing feature subgraph pairs and target similarities between the sample processing feature subgraph pairs.

[0117] The target similarity is determined based on a similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph, and the attribute type includes quantitative attributes and semantic attributes.

[0118] For details, please see Figure 3 S21 of the illustrated embodiment will not be described in detail here.

[0119] S32: Input the sample processing feature subgraph into a preset process recommendation model to obtain a predicted similarity.

[0120] Specifically, the above S32 includes:

[0121] S321, using the vector module in the preset process recommendation model to vectorize the sample processing feature sub-graph pair to obtain the sample processing feature vector pair with the same dimension.

[0122] The preset process recommendation model includes a vector module and a similarity module. The vector module is used to vectorize the input sample processing feature subgraph to obtain a pair of sample processing feature vectors with the same dimension. In other words, subsequent similarity calculations can only be performed on the basis of the same dimension. For example, if the vector dimensions of the hole feature and the slot feature are different, then the similarity calculation cannot be performed using vectorization, resulting in failure of the similarity calculation. Therefore, before performing the similarity calculation, the graph data is first vectorized into vectors of the same dimension.

[0123] The working principle of the vector module is to vectorize each sample processing feature subgraph separately, for example, encode each node in the subgraph separately and then fuse them; or encode each sample processing feature subgraph as a whole, and so on.

[0124] In some optional implementations, the above S321 includes:

[0125] (1) Use the graph convolutional network module in the vector module to vectorize the nodes of the sample processing feature subgraph pair to obtain the node vector pair.

[0126] (2) Use the attention network module in the vector module to perform graph vectorization on the node vector pairs to obtain sample processing feature subgraph vector pairs with the same dimension.

[0127] like Figure 5 As shown in the figure, the graph convolutional network module is first used to vectorize the nodes of the sample processing feature subgraph pair, i.e., node embedding, to obtain node vector pairs. Then, the attention network module is used to vectorize the node vector pairs at the graph level, i.e., graph embedding, to obtain sample processing feature subgraph vector pairs. Subsequently, similarity is calculated based on the sample processing feature vector pairs to obtain the predicted similarity.

[0128] The nodes of the sample processing feature subgraph pair are vectorized, i.e., node embedding; then, graph-level vectorization, i.e., graph embedding, is performed to obtain the sample processing feature subgraph vector pairs. By vectorizing the sample processing feature subgraph pairs in sequence according to the hierarchical relationship, it is ensured that the obtained sample processing feature pairs retain the information of each node and integrate the overall information of the sample processing feature subgraph, thereby improving the accuracy of the obtained sample processing feature vector pairs.

[0129] S322 , using the similarity module in the preset process recommendation model and the similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph to calculate the similarity of the sample processing feature vector pairs, and determine the predicted similarity.

[0130] The working principle of the similarity module is similar to Figure 3 The calculation method of target similarity in S21 of the embodiment shown is the same, please refer to Figure 3 The corresponding description of S21 in the illustrated embodiment will not be repeated here.

[0131] S33 , based on the difference between the predicted similarity and the target similarity, adjusting the parameters of the preset process recommendation model to determine a trained target process recommendation model.

[0132] For details, please see Figure 1 S13 of the illustrated embodiment will not be described in detail here.

[0133] The training method of the process recommendation model provided in this embodiment processes the input sample processing feature subgraph pairs into sample processing feature vector pairs of the same dimension before performing processing by the similarity module to ensure that the similarity can be calculated subsequently.

[0134] As a specific application example of the training method of the process recommendation model in this embodiment, Figure 6 As shown, the method includes:

[0135] (1) First, use the process data of historical products to construct a sample data set to obtain a process knowledge graph;

[0136] (2) Sampling the process knowledge graph to obtain pairwise sample processing feature subgraphs and determining sample processing feature subgraph pairs;

[0137] (3) Calculate the target similarity for each sample processing feature subgraph;

[0138] (4) Model training is performed using the sample processing feature subgraph and its corresponding target similarity to obtain the target process recommendation model. The training process mainly includes Figure 5 The process shown.

[0139] After obtaining the target process recommendation model, when determining the subsequent processing technology, the processing feature subgraph can be obtained first. Then, the target process recommendation model is used to calculate the similarity between this processing feature subgraph and each processing subgraph in the process knowledge graph, thereby determining the top N processing feature subgraphs with the highest similarity. By using the correspondence between the processing feature subgraphs and the processing technology subgraphs in the process knowledge graph, the target processing technology subgraph is determined, and thus the recommended processing technology is determined.

[0140] In this embodiment, a process recommendation method is provided, which can be used in electronic equipment such as computers, CNC machine tools, servers, etc. Figure 7 FIG. 1 is a flow chart of a method for training a process recommendation model according to an embodiment of the present invention. Figure 7 As shown, the process includes the following steps:

[0141] S41, obtaining the processing features to be recommended.

[0142] The processing features to be recommended may be input by a user on the electronic device or obtained by the electronic device from other devices, and there is no restriction on their source. The processing features to be recommended are processing features of the target product.

[0143] For example, an input interface for processing features is displayed on the interface of an electronic device, which is divided into levels. The first level includes hole features, slot features, etc.; the second level includes hole features and subdivisions under slot features; and the third level includes attribute features under subdivision features.

[0144] S42, constructing a processing feature subgraph to be recommended based on the relationship between the processing features.

[0145] After the electronic device obtains the processing features, the relationship between the processing features is determined accordingly. For example, the user can input the processing features under the corresponding tab of the interface to determine the relationship between the processing features.

[0146] In some optional implementations, the above S44 includes:

[0147] (1) Based on the relationship between processing features, determine the parent node corresponding to the processing feature.

[0148] (2) Constructing a processing feature subgraph to be recommended based on the parent node and the processing features.

[0149] The parent node corresponding to the machining feature corresponds to the first level of the input interface described above. Child nodes are then identified sequentially, thereby constructing a subgraph of the machining feature to be recommended. By leveraging the relationships between machining features to determine the parent node and, based on this, the child nodes are determined, improving the accuracy of the subgraph of the machining feature to be recommended.

[0150] S43, inputting the processing feature subgraph to be recommended and each processing feature subgraph in the process knowledge graph into the target process recommendation model, and obtaining at least one target processing feature subgraph in the process knowledge graph having the highest similarity with the processing feature subgraph to be recommended.

[0151] Among them, the process knowledge graph includes a processing feature subgraph and a processing technology subgraph. There is a corresponding relationship between the processing feature subgraph and the processing technology subgraph. The target process recommendation model is trained according to the above-mentioned process recommendation model training method, which will not be repeated here.

[0152] like Figure 8As shown in the figure, the subgraph enclosed by the rectangular frame represents the processing feature subgraph. There is an association between the processing feature subgraph and the processing technology subgraph. That is, in the process knowledge graph, the relationship between the processing feature subgraph and the processing technology subgraph can be many-to-many, one-to-one, many-to-one, and so on. There is no restriction on the correspondence between the processing feature subgraph and the processing technology subgraph. It can be set according to actual needs.

[0153] It should be noted that Figure 8 It only represents the form of process knowledge graph and does not limit the content of each node; Figure 8 There is no limitation on the specific display content of each node.

[0154] The electronic device uses the target process recommendation model to determine the top N target processing feature subgraphs with the highest similarity, wherein the number of target processing feature subgraphs can be 1, 2, or more, and there is no limitation thereto.

[0155] S44, searching the process knowledge graph based on the target processing feature subgraph, determining the target processing technology subgraph corresponding to the target processing feature subgraph, and determining the recommended processing technology.

[0156] After obtaining the target processing feature subgraph, the electronic device searches the process knowledge graph, for example, using the Cypher search language in the Neo4j graph database, the knowledge graph data layer. By searching for nodes that match the processing feature subgraph, the target processing subgraph corresponding to the target processing feature subgraph is found.

[0157] The electronic device can display the searched target processing technology sub-graph, that is, visually display the target processing technology sub-graph; the user can adjust the target processing technology sub-graph based on actual needs to determine the recommended processing technology.

[0158] The process recommendation method provided in this embodiment utilizes the aforementioned method to train a target process recommendation model to determine at least one target processing feature subgraph. Because the target process recommendation model processes graph data and calculates similarity based on node attribute types, the efficiency of determining the target processing feature subgraph is improved. Based on this, the process knowledge graph is searched, ensuring efficient retrieval of the target processing subgraph. The knowledge graph-based process recommendation method is highly generalizable; as new industries emerge, the knowledge graph can be continuously modified and adjusted to meet the needs of different industries.

[0159] Combine Figure 6As shown in the figure, as a training method of the process recommendation model and a specific application example of the process recommendation method, the process recommendation model is divided into two stages: one is the training stage, and the other is the recommendation stage. The model input and output of the two stages are different, specifically:

[0160] (1) Model training stage

[0161] The training method's input consists of pairs of machining feature subgraphs. For example, a dataset contains machining feature data for 11 different types of holes and slots, with 2,000 machining feature subgraphs. From these pairs, 60,000 pairs of subgraphs are sampled. The training subgraphs are divided into a training set and a test set with a ratio of 70% and 30%.

[0162] Output from the training phase: After the model is trained on the training set data, it outputs the subgraph similarity scores on the test set. Evaluation metrics are calculated using the predicted and actual similarity scores, using MSE (mean squared error) and p@k (previous k accuracy). If the evaluation results meet the requirements, model training is complete; if not, the model parameters need to be further adjusted until they meet the evaluation requirements.

[0163] (2) Model recommendation stage

[0164] The input to the recommendation method is processing features such as aperture, aspect ratio, and roughness. The electronic device converts the input processing features into processing feature subgraphs to be recommended. These subgraphs are then fed into the target process recommendation model. These subgraphs are paired with all 2,000 processing feature subgraphs, and the model quickly predicts similarity scores and selects the N most similar subgraphs for recommendation.

[0165] Algorithm output: N processing feature subgraphs with the highest similarity.

[0166] In this embodiment, a training device for a process recommendation model and a process recommendation device are also provided. The device is used to implement the above-mentioned embodiments and preferred embodiments, and the details that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0167] This embodiment provides a training device for a process recommendation model, such as Figure 9 Shown, including:

[0168] A first acquisition module 51 is configured to acquire a sample processing feature subgraph pair and a target similarity between the sample processing feature subgraph pairs, wherein the target similarity is determined based on a similarity measurement method corresponding to an attribute type of each node in the sample processing feature subgraph pair, wherein the attribute type includes a quantitative attribute and a semantic attribute;

[0169] An input module 52 is configured to input the sample processing feature subgraph into a preset process recommendation model to obtain a predicted similarity;

[0170] The adjustment module 53 is configured to adjust the parameters of the preset process recommendation model based on the difference between the predicted similarity and the target similarity, so as to determine a trained target process recommendation model.

[0171] This embodiment provides a process recommendation device, such as Figure 10 Shown, including:

[0172] A second acquisition module 61 is used to acquire processing features to be recommended;

[0173] A construction module 62, configured to construct a processing feature subgraph to be recommended based on the relationship between the processing features;

[0174] a recommendation module 63, configured to input the processing feature subgraph to be recommended and each processing feature subgraph in the process knowledge graph into a target process recommendation model, to obtain at least one target processing feature subgraph in the process knowledge graph having the highest similarity to the processing feature subgraph to be recommended, wherein the process knowledge graph includes processing feature subgraphs and processing technology subgraphs, and there is a corresponding relationship between the processing feature subgraphs and the processing technology subgraphs, and the target process recommendation model is trained according to the process recommendation model training method described in the first aspect of the present invention or any one of the embodiments of the first aspect;

[0175] The retrieval module 64 is configured to search the process knowledge graph based on the target processing feature subgraph, determine the target processing technology subgraph corresponding to the target processing feature subgraph, and determine a recommended processing technology.

[0176] The training device of the process recommendation model, or the process recommendation device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0177] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0178] An embodiment of the present invention further provides an electronic device having the above Figure 9The training device of the process recommendation model shown, or the above Figure 10 The process shown is recommended for the device.

[0179] See also Figure 11 , Figure 11 is a structural diagram of an electronic device provided by an optional embodiment of the present invention, such as Figure 11 As shown, the electronic device may include: at least one processor 71, such as a CPU (Central Processing Unit), at least one communication interface 73, a memory 74, and at least one communication bus 72. The communication bus 72 is used to realize the connection and communication between these components. The communication interface 73 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 73 may also include a standard wired interface and a wireless interface. The memory 74 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 74 may optionally be at least one storage device located away from the aforementioned processor 71. The processor 71 may be combined with Figure 9 or Figure 10 In the described apparatus, the memory 74 stores an application program, and the processor 71 calls the program code stored in the memory 74 to execute any of the above method steps.

[0180] The communication bus 72 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 72 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 11 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0181] Among them, the memory 74 may include a volatile memory (English: volatile memory), such as a random-access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 74 may also include a combination of the above types of memory.

[0182] The processor 71 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0183] The processor 71 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0184] Optionally, the memory 74 is further configured to store program instructions. The processor 71 may call the program instructions to implement the training method of the process recommendation model as shown in any embodiment of the present application, or the process recommendation method as shown in any embodiment.

[0185] An embodiment of the present invention further provides a non-transitory computer storage medium, wherein the computer storage medium stores computer-executable instructions, which can execute the training method of the process recommendation model or the process recommendation method in any of the above method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.

[0186] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A training method for a process recommendation model, characterized in that: include: Obtaining a sample processing feature subgraph pair and a target similarity between the sample processing feature subgraph pairs, wherein the target similarity is determined according to a similarity metric corresponding to an attribute type of each node in the sample processing feature subgraph pair, wherein the attribute type includes a quantitative attribute and a semantic attribute; Inputting the sample processing feature subgraph into a preset process recommendation model to obtain a predicted similarity; adjusting parameters of the preset process recommendation model based on a difference between the predicted similarity and the target similarity to determine a trained target process recommendation model; The acquisition of sample processing feature subgraph pairs includes: Extract sample processing feature subgraph pairs from CAM process files through process feature extraction algorithm; Obtaining target similarity between the sample processing feature subgraph pairs includes: Determining the corresponding attribute type based on the data type of each node in the sample processing feature subgraph; Determining the similarity between corresponding nodes in the sample processing feature subgraph pair using a similarity measurement method corresponding to the attribute type; The similarities between corresponding nodes in the sample processing feature subgraphs are fused to determine the target similarity.

2. The training method according to claim 1, characterized in that Determining the similarity between corresponding nodes in the sample processing feature subgraph pair by using the similarity measurement method corresponding to the attribute type includes: When the attribute type is the quantitative attribute, similarity calculation is performed based on the values ​​of corresponding nodes in the sample processing feature subgraph to obtain the similarity; When the attribute type is the semantic attribute, similarity is calculated based on the edit distance between the character strings of corresponding nodes in the sample processing feature subgraph to obtain the similarity.

3. The training method according to claim 1, characterized in that The fusing the similarities between corresponding nodes in the sample processing feature subgraphs to determine the target similarity includes: Get the weight corresponding to each similarity; A weighted calculation is performed based on the weight and the corresponding similarity to determine the target similarity.

4. The training method according to any one of claims 1 to 3, characterized in that: Inputting the sample processing feature subgraph pair into a preset process recommendation model to obtain a predicted similarity includes: vectorizing the sample processing feature subgraph pair using a vector module in the preset process recommendation model to obtain a sample processing feature vector pair with the same dimension; The similarity of the sample processing feature vector pairs is calculated using the similarity module in the preset process recommendation model and the similarity measurement method corresponding to the attribute type of each node in the sample processing feature subgraph to determine the predicted similarity.

5. The training method according to claim 4, characterized in that The vectorization of the sample processing feature subgraph pair by using the vector module in the preset process recommendation model to obtain the sample processing feature vector pair with the same dimension includes: Vectorizing the nodes of the sample processing feature subgraph pair using the graph convolution network module in the vector module to obtain a node vector pair; The node vector pairs are graph-vectorized using the attention network module in the vector module to obtain sample processing feature subgraph vector pairs with the same dimension.

6. A process recommendation method, characterized in that: include: Obtaining processing features to be recommended; Constructing a processing feature subgraph to be recommended based on the relationship between the processing features; Inputting the to-be-recommended processing feature subgraph and each processing feature subgraph in the process knowledge graph into a target process recommendation model, obtaining at least one target processing feature subgraph in the process knowledge graph having the highest similarity to the to-be-recommended processing feature subgraph, wherein the process knowledge graph includes processing feature subgraphs and processing technology subgraphs, and there is a corresponding relationship between the processing feature subgraphs and the processing technology subgraphs, and the target process recommendation model is trained according to the training method for the process recommendation model according to any one of claims 1-5; A search is performed in the process knowledge graph based on the target processing feature subgraph, and a target processing technology subgraph corresponding to the target processing feature subgraph is determined to determine a recommended processing technology.

7. The process recommendation method according to claim 6, characterized in that: The constructing of a processing feature subgraph to be recommended based on the relationship between the processing features includes: Based on the relationship between the processing features, determining the parent node corresponding to the processing feature; The processing feature subgraph to be recommended is constructed based on the parent node and the processing feature.

8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the training method of the process recommendation model according to any one of claims 1 to 5, or executes the process recommendation method according to claim 6 or 7 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the training method of the process recommendation model according to any one of claims 1 to 5, or to execute the process recommendation method according to claim 6 or 7.

Citation Information

Patent Citations

  • Material process flow matching method based on embedding attribute similarity

    CN112116965A