Manufacturing industry process text data-oriented standardization method and system
By combining unsupervised and supervised learning methods, using the BM25 algorithm and deep learning models, the standardization of process text data is achieved, solving the problems of process text data diversity and labeling data costs, and improving the accuracy and efficiency of standardization.
Patent Information
- Application Number
- CN202410688046.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-08-27
AI Technical Summary
In the standardization of process text data, existing unsupervised matching methods have low accuracy, while supervised learning methods require high cost of labeled data, making it difficult to standardize diverse process text data.
The unsupervised BM25 algorithm is used to perform rough matching between small batches of process text data and standard data. A verification data set is generated through expert review, and the data set is used to train a deep learning model for accurate matching of large batches of data to achieve accurate matching of process text data. standardization.
It effectively reduces the cost of manual annotation, achieves accurate standardization of process text data, reduces the workload of data annotation, and improves matching accuracy.
Smart Images

Figure CN118550908A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data standardization, and in particular relates to a method and system for standardizing process text data for manufacturing industry. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Standardizing process text data involves unifying the format, unit, and description method of product, resource, process, factory, and other data to promote information sharing, reduce data processing costs, and improve production efficiency. The standardization of process text data can promote internal collaboration within the enterprise, is the basis for digital transformation and intelligent production, and helps enterprises improve their competitiveness and achieve sustainable development. In terms of the description method of process text data, the standardization of process text data is essentially to achieve the mapping of existing process text data to standard process text data through text matching, and this mapping can be achieved with the help of text matching technology of short texts. Existing text matching technologies can be roughly divided into unsupervised methods and supervised methods.
[0004] (1) Unsupervised text matching technology
[0005] Unsupervised text matching technology refers to a method that does not rely on labeled training data for model training in text matching tasks. Unsupervised text matching technology is generally based on similarity metrics or clustering algorithms for matching between texts. This method does not require labeled training data, so it is suitable for situations where the amount of data is large and the labeling cost is high. It generally uses similarity metrics between texts, such as cosine similarity, Jaccard similarity, or clustering algorithms for matching. However, unsupervised text matching technology lacks corresponding labeled data for guidance and has low accuracy.
[0006] (2) Supervised Learning of Text Matching Technology
[0007] Supervised text matching technology refers to a method of using labeled training data to train models in text matching tasks to perform text matching. Supervised text matching technology uses classification or regression models to learn the matching relationship between texts. It requires a large amount of labeled training data for model training. It is suitable for scenarios where labeled data is available and high accuracy is required. It uses support vector machines, neural networks, and decision trees for classification. Supervised methods have higher accuracy, but require more time and labor costs to obtain labeled data.
[0008] In the research on the standardization of process text data, the widely used unsupervised data matching method can obtain better results when the text similarity is high. However, due to the diversity of process text data expression, the unsupervised data matching method cannot standardize the artificially defined process text data with special representation rules. The supervised learning-based method can fit the ideas of process personnel when defining process text data, but it requires a high cost to label the data.
[0009] The process text data has the problem of inconsistent content expression, which is specifically reflected in different expressions for the same process object, such as calling the "turning process" "lathe processing", "mechanical turning", "spinning processing", etc. This problem is caused by many reasons, such as inconsistent understanding of process compilers, errors in the process of process text data compilation, or untimely version synchronization between systems. Summary of the invention
[0010] In order to solve the above problems, the present invention proposes a standardization method and system for manufacturing process text data. The goal of the present invention is to use the original standard process text data to complete the replacement of the original process text data and minimize the labor cost. The basic idea of the method is to obtain the original process text data set by a process data management system such as a CAPP system or a process knowledge graph, and at the same time construct an original standard process text data set, and use an unsupervised data matching method to roughly match a small batch of process text data sets and a standard process text data set. After the rough matching is correctly adjusted, the adjusted data is used as the training data for supervised learning to achieve model training, and finally the trained model is used to achieve accurate matching of large batches of process text data sets and complete the standardization work.
[0011] According to some embodiments, a first solution of the present invention provides a method for standardizing manufacturing process text data, using the following technical solution:
[0012] A standardized approach to manufacturing process text data, including:
[0013] An original process text data set and an original standard process text data set are obtained and preprocessed to obtain a process text data set and a standard process text data set, and the process text data set is divided into a small batch process text data set and a large batch process text data set according to a ratio;
[0014] Calculate the BM25 score between the small batch process text dataset and the standard process text dataset to obtain a rough matching process text dataset, review the rough matching process text dataset, and obtain a verification process text dataset;
[0015] The pre-trained process text data accurate matching model is used to determine the most matching standard process text data corresponding to each batch of process text data, and obtain an accurate matching process text data set;
[0016] The matching relationship between the process text data set and the standard process text data set in the accurate process text data set and the verification process text data set is applied to the process of replacing the original process text data with the original standard process text data, thereby completing the standardization of the process text data.
[0017] Furthermore, the BM25 score between the small batch process text dataset and the standard process text dataset is calculated to obtain a coarse matching process text dataset, specifically:
[0018] Calculate the BM25 score of a small batch process text data and all data in the standard process text data set;
[0019] Sort by BM25 score, and the one with the largest score is the corresponding coarse matching process text data;
[0020] The above operation is performed on all small batch process text data to obtain the rough matching process text data of each small batch process text data, and obtain the rough matching process text data set.
[0021] Furthermore, the review of the coarse matching process text data set is performed through expert review to obtain a correct mapping of each small batch process text data to the standard process text data, thereby obtaining a verification process text data set.
[0022] Furthermore, the training of the process text data accurate matching model is performed using the verification process text data set. During the training process, the process text data accurate matching model is trained with the goal of maximizing the conditional probability of given standard process text data, that is, the loss function is minimized, as shown in the following formula:
[0023]
[0024] Among them, Λ is the parameter set of the deep learning network, DS e,a Indicates that the standard process text data corresponding to the a-th small batch process text data is DS e ,DRS a It is the text data of the a-th small batch process.
[0025] Furthermore, the pre-trained process text data accurate matching model is used to determine the most matching standard process text data corresponding to each pre-large batch process text data, specifically:
[0026] The input layer preprocesses the large batch process text data set and the standard process text data respectively;
[0027] The representation layer extracts the key information of the large batch process text data set and the key information of the standard process text data preprocessed by the input layer through the BiLSTM network module and the attention module;
[0028] The matching layer calculates the similarity between the key information of the large batch process text data set preprocessed by the input layer and the key information of the standard process text data preprocessed by the input layer;
[0029] The greater the similarity, the higher the matching degree between the bulk process text data set and the standard process text data;
[0030] Based on the maximum similarity value, the standard process text data corresponding to each large batch of process text data is obtained, thereby obtaining an accurate matching process text data set.
[0031] Furthermore, the representation layer extracts the key information of the large batch process text dataset preprocessed by the input layer through the BiLSTM network module and the attention module, specifically:
[0032] The BiLSTM network module is used to extract information from a large number of process text data preprocessed by a single input layer from two directions, and the information obtained from the two directions is combined to obtain a process text vector containing context information;
[0033] The attention module realizes the process text vector transformation through a linear layer learning function, calculates the process text attention weight of each word through softmax, multiplies the process text vector by the process text attention weight and sums them up to obtain the process text key vector representation.
[0034] Furthermore, the representation layer extracts key information of the standard process text data preprocessed by the input layer through the BiLSTM network module and the attention module, specifically:
[0035] The BiLSTM network module is used to extract information from a single piece of standard process text data preprocessed by the input layer from two directions, and the information obtained from the two directions is combined to obtain a standard process text vector containing context information;
[0036] The attention module realizes the standard process text vector transformation through a linear layer learning function, calculates the standard process text attention weight of each word through softmax, multiplies the standard process text vector by the standard process text attention weight and sums them up to obtain the standard process text key vector representation.
[0037] According to some embodiments, a second solution of the present invention provides a standardization system for manufacturing process text data, which adopts the following technical solutions:
[0038] A standardized system for manufacturing process text data, including:
[0039] A data acquisition processing module is configured to acquire and preprocess the original process text data set and the original standard process text data set to obtain a process text data set and a standard process text data set, and divide the process text data set into a small batch process text data set and a large batch process text data set according to a ratio;
[0040] A data rough matching module is configured to calculate the BM25 score between the small batch process text data set and the standard process text data set to obtain a rough matching process text data set, review the rough matching process text data set, and obtain a verification process text data set;
[0041] The data accurate matching module is configured to use the pre-trained process text data accurate matching model to determine the most matching standard process text data corresponding to each batch of process text data, and obtain an accurate matching process text data set;
[0042] The data standardization module is configured to apply the matching relationship in the accurate process text data set and the verification process text data set to the original standard process text data to replace the original process text data, so as to complete the standardization of the process text data.
[0043] According to some embodiments, a third aspect of the present invention provides a computer-readable storage medium.
[0044] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the method for standardizing manufacturing process text data as described in the first aspect above.
[0045] According to some embodiments, a fourth aspect of the present invention provides a computer device.
[0046] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the method for standardizing manufacturing process text data as described in the first aspect above are implemented.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] The present invention proposes a complete set of process data standardization methods to achieve the unification and standardization of different existing expression methods for the same process object. The core of the method uses an unsupervised data matching algorithm to achieve the matching of a small amount of data and standard data and provide data support for subsequent supervised learning, thereby minimizing the workload of the data annotation process, that is, achieving a rough match between a small batch of process text data and a standard process text data. After adjusting the rough matching process text data set, it is used as a training set for the subsequent supervised learning data matching algorithm. The supervised learning data matching algorithm is used to train the model through the annotated data set to effectively reflect the correlation between process texts; that is, the supervised learning data matching algorithm uses the rough matching process text data set verified by experts as training data, and inputs a large amount of process text data into the trained model to achieve accurate matching of process texts. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0050] Figure 1 is a flow chart of a method for standardizing manufacturing process text data in an embodiment of the present invention;
[0051] Figure 2 is a schematic diagram of a DSSM algorithm in an embodiment of the present invention;
[0052] Figure 3 It is a prototype diagram of a standardized system for manufacturing process text data in an embodiment of the present invention;
[0053] Figure 4 This is an example of some DSSM model training data in the embodiment of the present invention;
[0054] Figure 5 It is a schematic diagram of the change of the loss function of the DSSM algorithm in an embodiment of the present invention as the number of training steps changes. DETAILED DESCRIPTION
[0055] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0056] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0057] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0058] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0059] Embodiment 1
[0060] The present embodiment provides a method for standardizing process text data for the manufacturing industry. The present embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, and can also be applied to a terminal, a server, and a system, and is implemented through the interaction between the terminal and the server. The server can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communications, middleware services, domain name services, security services CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application. In the present embodiment, the method includes the following steps:
[0061] An original process text data set and an original standard process text data set are obtained and preprocessed to obtain a process text data set and a standard process text data set, and the process text data set is divided into a small batch process text data set and a large batch process text data set according to a ratio;
[0062] Calculate the BM25 score between the small batch process text dataset and the standard process text dataset to obtain a rough matching process text dataset, review the rough matching process text dataset, and obtain a verification process text dataset;
[0063] The pre-trained process text data accurate matching model is used to determine the most matching standard process text data corresponding to each batch of process text data, and obtain an accurate matching process text data set;
[0064] The matching relationship in the accurate matching process text data set and the verification process text data set is applied to the original standard process text data to replace the original process text data, thereby completing the standardization of the process text data.
[0065] like Figure 1 As shown, the method proposed in this embodiment can be specifically divided into three steps: process text data acquisition and preprocessing, unsupervised small batch process text data matching, and supervised learning large batch process text data matching.
[0066] (1) Process text data acquisition and preprocessing
[0067] Data acquisition requires two types of process text data sets, the original process text data set and the original standard process text data set. The original process text data is the data to be matched, and the original standard process text data is the matching benchmark. All data need to be preprocessed to improve data quality.
[0068] (2) Unsupervised small batch process text data matching
[0069] Unsupervised text matching is performed on the small batch process text dataset, and the BM25 algorithm is used to autonomously match the small batch process text dataset with the constructed standard process text dataset. The matching results are verified by experts, and a verification process text dataset is generated on the basis of ensuring the accuracy of the data, laying the foundation for the supervised learning model.
[0070] (3) Supervised learning for matching large quantities of process text data
[0071] The DSSM deep learning model is trained using the verification process text data training set as a precise matching model for process text data. A large number of process text data sets are input into the model to achieve precise matching of process text data.
[0072] (4) Standardization of process text data
[0073] The matching relationship between the precise process text data set and the verification process text data set is applied to the original standard process text data to replace the original process text data, thus completing the standardization of the process text data.
[0074] The acquisition of process text data requires the acquisition of two aspects of data: the original process text data DRF and the original standard process text data DSF. The original process text data set DRF comes from the constructed process knowledge graph data layer, and each standardization process is only for the instance E* corresponding to an entity type E in the process domain ontology model. For example, for the standardized operation of "process", it is necessary to extract the instance data of the entity type "process" in the process knowledge graph data layer. In discrete manufacturing enterprises, different names are used for objects of different entity types. Therefore, in order to achieve the standardization of process text data of various entity types, it is necessary to construct standard process text data DSF according to the current and most widely used name method of the entity type in the enterprise to support the completion of subsequent process text data matching tasks.
[0075] After obtaining the process text data, in order to improve the data quality and consistency as much as possible, the data needs to be preprocessed, including removing duplicate data, unifying the data format, removing abnormal values, removing irrelevant characters, etc. Data preprocessing is performed on DRF and DSF respectively. Preprocessing can improve the subsequent use efficiency of the data and will not affect the data content. The preprocessed DRF and DSF data are represented as process text data set DR and standard process text data set DS respectively. And the corresponding relationship between DRF, DSF to DR and DS is recorded.
[0076] When the amount of process text data is extremely large, the process text dataset DR needs to be divided into a small batch process text dataset DRS and a large batch process text dataset DRB in proportion. DRS is used for unsupervised small batch process text data matching, and the matched data is used as the training set of the supervised learning model. DRB uses the trained process text data accurate matching model for accurate matching. DR can be expressed as:
[0077] DR = αDRS + (1-α)DRB (1);
[0078] Where, DRS = {DRS a |a=1,2,...b} is a small batch of process text datasets, DRS a is one of the process text data, a represents the sequence number of the process text data, and b represents the total number of process text data in the set; DRB = {DRB c |c=1,2,...d} is a large number of process text datasets, DRB c is one of the process text data, c represents the process text data number of the set, d is the total number of process text data in the set; α is the distribution coefficient of the process text data, α∈[0,1].
[0079] The size of α needs to meet the training requirements of the supervised learning model to ensure a high model accuracy, but an excessively large α will increase the workload of expert review in unsupervised small-batch process text data matching. The process text data precise matching model can theoretically accurately match the complete DR, but considering that DRS has passed expert review and has a high accuracy, there is no need for precise matching. Therefore, the process text data precise matching model only processes DRB.
[0080] The goal of this method is to use the original standard process text dataset DSF to replace the original process text dataset DRF. Therefore, in the processing process, it is necessary to use the DS preprocessed by DSF as the benchmark data, DS = {DS e |e=1,2,...k},DS e is one of the standard process text data, e represents the standard process text data number, and k is the total number of standard process text data in the set.
[0081] 2. Unsupervised small batch process text data matching
[0082] The purpose of unsupervised small-batch process text data matching is to achieve coarse matching of DRS and DS by using the unsupervised BM25 algorithm, obtain a verification process text dataset after correcting the data, and use the verification process text dataset to support the training of subsequent supervised learning models.
[0083] The BM25 algorithm is a probability-based information retrieval method that is improved on the basis of the traditional TF-IDF algorithm. Its core idea is to consider a single standard process text data DS e Single small batch process text data to be queried in DRS a The frequency of DRS is calculated based on this. a = DRS a,g |g=1,2,...h} is a single small batch process text data, DRS a,g is the word in the process text data, g is the sequence number of the word, and h is the total number of words in a single data.
[0084] Compared with the TF-IDF method and the word vector-based method, the BM25 algorithm introduces a document length object with adjustable parameters. The algorithm can be applied to various types of text data, such as long text and short text. It has high computational efficiency and does not require training, and has a wide range of applications.
[0085] For the unsupervised small batch process text data matching process, it is necessary to calculate the DRS of a single process text data a With a single standard process text data DS eThe BM25 score between the two is calculated as follows:
[0086]
[0087] The analysis of each part in the above formula is as follows:
[0088] (1) DRS a,g .DRS a,g DRS for a single process text data a The characters in DRS are: g is the sequence number of the characters, and h is the total number of characters in a single data item. For process text data; a,g A single Chinese character, such as DRS a If it is "Turning", DRS a,1 To DRS a,4 They respectively represent "turning", "cutting", "processing" and "working".
[0089] (2)f(DRS a,g ,DS e ). f(DRS a,g ,DS e ) is DRS a,g In the standardized process text data DS e The more times it appears in the DRS, the greater the match. a,1 DS stands for "car" e If it is "lathe turning", then f(DRS a,1 ,DS e )=2.
[0090] (3) IDF(DRS) a,g ). IDF(DRS a,g ) is the inverse document frequency, which is used to measure the prevalence of a single word in DS. Its calculation formula is as follows:
[0091]
[0092] Among them, k is the total number of standard process text data in the standard process text dataset DS, num(DRS a,g ) includes DRS a,g The number of standard process text data. If the word to be matched DRS a,g It is relatively rare in the standard process text data set, so IDF (DRS a,g ) will be increased accordingly, and vice versa. For example, DS1 to DS3 in DS represent "lathe turning", "lathe threading" and "milling drilling" respectively, and DRS a,5 For "bed", DRS a,6For "drill", "bed" appears three times in DS1 to DS3, while "drill" only appears once, then IDF(DRS a,5 )=0.134,IDF(DRS a,6 )=0.539. It can be seen that words with lower frequency of occurrence can make the score higher and have greater influence.
[0093] (1) len(DS e ) is the standard process text data DS e The number of characters included. avglen(DS) is the total number of characters in the standard process text dataset DS. e The average length can be expressed as:
[0094]
[0095] for If len(DS e ) is larger or far exceeds avglen(DS), then for BM25(DRS a ,DS e ) has a smaller impact.
[0096] (2) Coefficients i and j. Coefficient i is used to control the frequency of occurrence of each word on BM25 (DRS a ,DS e ) score. If you need to judge whether a certain standard process text data is appropriate by the frequency of word appearance, you need to increase the coefficient, otherwise, decrease it. In existing research, the value is usually set to i = 1.2. The coefficient j is used to control the single process standard data DS e BM25(DRS a ,DS e ) score, a larger j value increases its influence, and a value of 0 will make BM25 (DRS a ,DS e ) score and DS e It has nothing to do with the length and is usually set as j=0.75 in existing studies.
[0097] For a process text data DRS a It is necessary to calculate the difference between the standard process text data set and all the standard process text data DS = {DS e |e=1,2,...k}, and according to BM25(DRS a ,DS e ) are sorted in order of scores, and the one with the largest score is the DRS a Then, all small batch process text data DRS = {DRS a|a=1,2,...b} Perform the above operation to obtain each DRS a The rough matching process text data set is obtained by reviewing and correcting the rough matching process text data set through experts in the enterprise or process field. a To DS e The correct mapping is performed to obtain the verification process text dataset.
[0098] 3. Supervised Learning for Large-Scale Process Text Data Matching
[0099] The supervised learning of large-scale process text data matching uses the DSSM algorithm, and the rough matching process text data set is compiled into a verification process text data training set DT, DT = {(DRS a ,DS e,a )} Verification process text data training set, DS e,a Indicates that the standard process text data corresponding to the process text data of item a is DS e , training is carried out on this basis to achieve accurate matching of the large-scale process text dataset DRB to the standardized process text dataset DS.
[0100] The DSSM algorithm is a deep learning model used to calculate similarity matching between texts. It can realize the semantic similarity determination between two process text data and is often used in fields such as engine search and recommendation systems. Its core idea is to map process text data to a shared semantic space so that similar data is closer in the space. In addition, the DSSM model data supervised learning model can discover the similarity of process text data at the semantic level with the help of existing data, thereby realizing accurate and standardized matching of process text data.
[0101] The DSSM model can be structurally divided into an input layer, a representation layer, and a matching layer in the learning and training stage, and also includes a loss function for optimizing model parameters. a ,DS e,a )} to train the DSSM model. The DSSM structure is as follows Figure 2 shown.
[0102] The following will discuss the input layer, representation layer, matching layer and loss function used in this method respectively:
[0103] (1) Input layer
[0104] The input layer processes the training data and converts it into a form that can be processed by the representation layer. a Or verify the DS in the process text data training set DT e,aAfter being input to the input layer, it is first preprocessed, including segmentation by Chinese characters. The segmented single characters are replaced with the constructed Chinese character table, which contains all Chinese characters and their corresponding codes. The replaced data is input to the word embedding module, which maps the characters to a high-dimensional vector space. a,g After being processed by the input layer, it is represented as DE a,g , which can be expressed as:
[0105] DE a,g =W E DRS a,g (5);
[0106] Among them, DE a,g DRS a,g The representation after processing by the input layer, W E is the learning coefficient matrix of the word embedding module.
[0107] (2) Presentation Layer
[0108] The representation layer consists of a BiLSTM network module and an attention module, which are used to extract key information from process text data. The BiLSTM network module has more parameters and can better complete the sequence modeling task. When processing longer process text data, it can effectively solve the long-distance forgetting problem. During the application process, the BiLSTM network module will receive DE from two directions. a,g Extract information and obtain information in two directions Combine them to get the process text vector K containing context information a,g , which can be expressed as:
[0109]
[0110] Among them, K a,g DE for BiLSTM output a,g The hidden layer parameters of , i.e., the process text vector containing context information; For the reverse BiLSTM layer to DE a,g Hidden layer parameters of the processed output; For the forward BiLSTM layer, DE a,g Hidden layer parameters of the processed output.
[0111] In the expression of process text data, the importance of words is inconsistent, and there are keywords and non-keywords. Therefore, the method in this paper introduces an attention mechanism to identify key information in process text data. In the application process, the attention mechanism can assign a coefficient to each word according to its importance. Its mechanism of action is to transform the BiLSTM output through a linear layer learning function, and then calculate the process text attention weight N of each word through softmax. a,g , and then the output state K of BiLSTM a,g Multiply by the craft text attention weight N a,g And sum them up to get the key vector representation of the process text data. a , the process can be expressed as:
[0112] L a,g =tanh(W A K a,g +M A ) (9);
[0113]
[0114] Among them, L a,g is a linear layer pair K a,g Processed output; W A , M A are the linear layer coefficients and biases; N a,g K a,g The craft text attention weight; a For DRS a The process text key vector representation of the process text data after attention adjustment;
[0115] Similarly, a single piece of standard process text data is processed in the input layer and the representation layer to obtain a standard process text key vector representation of the standard process text data. e .
[0116] (3) Matching layer
[0117] Get DRS respectively a DS e,a The vector representation O a and O e Then, calculate the cosine similarity R (DRS a ,DS e,a ), the calculation formula is as follows:
[0118]
[0119] R(DRS a ,DSe,a ) score is used to describe the process text data DRS a and standard process text data DS e,a The larger the number, the higher the matching degree.
[0120] (4) Loss Function
[0121] Use the softmax function to calculate the process text data DRS a Corresponding standard process text data DS e,a The posterior probability of the similarity score R(DRS a ,DS e,a ), which can be expressed as follows:
[0122]
[0123] Among them, γ is the smoothing factor of softmax, which is learned through the training process. a,q From the DRS to be sorted a Candidate Standard Process Text Dataset DSC a Ideally, DSC a All standard process text data in DS should be included. In order to save computing resources, DSC a The construction used and paper
[60] In the same way, both DS contains the correct matching standard process text data DS e,a At the same time, select DS to remove DS e,a The following four standard process text data are randomly generated to form DSC a ={DSC a,q |q∈[1,5]}, which is the candidate standard process text dataset randomly generated during the training process, DSC a,q is a randomly sampled candidate standard process text data, and q is the sequence number of the candidate standard process text data.
[0124] During the training process, the model is trained with the goal of maximizing the conditional probability of given standard process text data, which is equivalent to determining the model parameters by minimizing the following loss function:
[0125]
[0126] Among them, Λ is the parameter set of the deep learning network, DS e,a Indicates that the standard process text data corresponding to the a-th small batch process text data is DS e ,DRS a is the a-th small batch of process text data. The model is trained using the stochastic gradient descent method.
[0127] After completing the above training process, the process text data accurate matching model can be obtained, and DRB={DRB c |c=1,2,...d} is input into the model, and the model will determine the c The corresponding most matching standard process text data DS e , based on the maximum similarity value, the preprocessed standard process text data corresponding to each preprocessed bulk process text data is obtained, thereby obtaining an accurate matching process text data set.
[0128] 4. Standardization of process text data
[0129] The matching relationship in the accurate matching process text data set and the verification process text data set is applied to the original standard process text data to replace the original process text data, thereby completing the standardization of the original process text data.
[0130] Example verification
[0131] Based on the process text data of the "process" category of a household appliance manufacturer, the standardization method of process text data was verified. The original process text data DRF was obtained through the enterprise data management system, and a total of 6466 items were obtained after data preprocessing. The original standard process text data set DSF was constructed, which contained k=335 standard process text data after data preprocessing. The process text data allocation coefficient α was set to 0.25, that is, the small batch process text data DRS contained b=1616 process text data.
[0132] Use python to build the BM25 algorithm and DRS for each small batch of process text data a Calculate the score BM25 (DRS a ,DS e ), the program will sort by BM25 score, for DRS a Match similar DS. Some of the rough matching process text datasets after matching by the BM25 algorithm are shown in Table 1, where each DRS a Match 3 DS e , it can be seen that the BM25 algorithm can basically obtain standard process text data that is more matched with the process text data.
[0133] After expert verification, the verification process text data set is obtained, and the verification process text data training set is generated based on it, such as Figure 3 As shown in the figure, the number of process text data in the training set is 1616, of which 80% is used as training data and 20% is used as test data. In the data set, each line is a piece of data. According to the "DRS a -Tab-DSe,a " format.
[0134] Table 1 Rough matching process text dataset (part)
[0135]
[0136]
[0137] Use Python to build the DSSM model. This model is built on the basis of the tensorflow platform. The computer platform used is Intel Core i5-12490F CPU, NVIDIA GeForce RTX 2080Ti GPU and 32GB memory. Figure 4 The model is trained using the training set shown in . The training hyperparameters are shown in Table 2 and the training results are shown in Figure 5 As shown in the figure, the training accuracy is 85.14% and the test accuracy is 82.41%.
[0138] Table 2 DSSM model training hyperparameters
[0139] Hyperparameter Name Numeric Training steps 10000 Batch size 512 Learning Rate 0.001 Word embedding size 200 LSTM hidden layer size 128 Maximum length of process text data 50 Maximum length of standard process text data 50 Vocabulary size 18672
[0140] By calling the trained model, the process text data in DRB is matched with the data in DS for similarity, and the matching score R (DRS a ,DS e,a ) Highest DS e As the DRB c Standardized process text data, some process text data R (DRS a ,DS e,a )The top three matching results are shown in Table 3.
[0141] Table 3 Process text data matching (partial)
[0142]
[0143] It can be seen from the above examples that this method basically realizes the matching mapping method of process text data to standard process text data. At the same time, process experts only need to intervene in the matching process during the data review stage, and there is no need to compile a process text data training set from scratch, which greatly reduces the intensity of process text data standardization work.
[0144] This embodiment combines an unsupervised data matching algorithm with a supervised learning data matching algorithm, with the goal of reducing the workload of data annotation and improving the accuracy of process text data matching, and proposes a method that combines unsupervised data matching and supervised learning data matching to achieve process text data standardization. In the study of standardization of process text data, the widely used unsupervised data matching method can obtain better results when the text similarity is high, but due to the diversity of process text data expression, the unsupervised data matching method cannot standardize the artificially defined process text data with special characterization rules, while the supervised learning-based method can fit the ideas of process personnel when defining process text data, but it requires a high cost to mark the data. The present invention combines the unsupervised data matching method and the supervised learning data matching method, effectively overcoming the above shortcomings.
[0145] Embodiment 2
[0146] This embodiment provides a standardization system for manufacturing process text data, including:
[0147] A data acquisition processing module is configured to acquire an original process text data set and an original standard process text data set for preprocessing to obtain a process text data set and a standard process text data set, and divide the process text data set into a small batch process text data set and a large batch process text data set according to a ratio;
[0148] A data rough matching module is configured to calculate the BM25 score between the small batch process text data set and the standard process text data set to obtain a rough matching process text data set, review the rough matching process text data set, and obtain a verification process text data set;
[0149] The data accurate matching module is configured to use the pre-trained process text data accurate matching model to determine the most matching standard process text data corresponding to each batch of process text data, and obtain an accurate matching process text data set;
[0150] The data standardization module is configured to apply the matching relationship in the accurate process text data set and the verification process text data set to the original standard process text data to replace the original process text data, so as to complete the standardization of the process text data.
[0151] The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment 1. It should be noted that the above modules as part of the system can be executed in a computer system such as a set of computer executable instructions.
[0152] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0153] The proposed system can be implemented in other ways. For example, the system embodiment described above is only illustrative, and the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0154] A prototype system is constructed based on the method proposed in this invention. The system includes a process text data acquisition and preprocessing module, an unsupervised small batch process text data matching module, and a supervised learning large batch process text data matching module. The system prototype is shown in the figure Figure 3 shown.
[0155] (1) Data acquisition and processing module
[0156] This module is used for data acquisition and preprocessing, and mainly includes CAPP data interface function, knowledge graph data interface function, standard process text data set upload function, data cleaning function, and data batching function. The functions of each function are as follows:
[0157] 1) CAPP data interface function: This function can extract a type of original process text data from the CAPP database according to the text data type.
[0158] 2) Process knowledge graph data interface function: This function can extract a class of original process text data in the process knowledge graph according to entity type or text data type.
[0159] 3) Standard process text data set upload function: upload the constructed standard process text data set to this system according to a certain data arrangement format.
[0160] 4) Data cleaning function: Clean the extracted raw process data, including removing duplicate values, removing illegal characters, etc.
[0161] 5) Data batching function: Set the ratio of small batch process text data sets and large batch process text data sets, and divide the process text data.
[0162] (2) Data Rough Matching Module
[0163] This module is used to match small batches of process text data, output the matched process text data for expert verification, and can directly replace the original process text data. This module includes the BM25 algorithm function and the matching data verification function. The functions of each function are as follows:
[0164] 1) BM25 algorithm function: Use the BM25 algorithm to match small batch process text data and standard process text data sets.
[0165] 2) Matching data verification function: Output the matching results of the BM25 algorithm. Experts can open the rough matching process text dataset locally and verify it through the download function, and upload the verified process text dataset to the system.
[0166] (3) Data Accurate Matching Module
[0167] This module converts the verification process text data set after expert verification into a training set for DSSM model training, and implements the training of the DSSM model to generate an accurate matching process data set and replace the original process data. This model includes the verification process text data training set generation function, DSSM algorithm training function, and process text data accurate matching function. The functions of each function are as follows:
[0168] 1) Verification process text data training set generation function: Arrange the verification process text data set in a certain format to generate a verification process text data training set.
[0169] 2) DSSM algorithm training function: Use the verification process text data training set to train the DSSM algorithm model and be able to adjust the hyperparameters of the algorithm model.
[0170] 3) Process text data precise matching function: call the trained DSSM algorithm model, input large quantities of process text data one by one, output the most matching standard process text data, and obtain a precise matching process text data set.
[0171] 4) Matching data verification function: Experts can use this function to download DSSM matching data and verify it. The verification results can be uploaded to the system to replace the exact matching process text data.
[0172] (4) Data Standardization Module
[0173] Replace the data output after rough matching and precise matching to CAPP or process knowledge graph system,
[0174] Contains coarse matching data output replacement function and exact matching data output replacement function.
[0175] 1) Rough matching data output replacement function: For data with a small batch process text data set ratio of 1, the verification process text data set can be directly used to replace the original process text data in CAPP or process knowledge graph.
[0176] 2) Exactly matching data output replacement function: Use exactly matching process text data or verified exactly matching process text data to replace process text data in CAPP or process knowledge graph.
[0177] Embodiment 3
[0178] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the standardization method for manufacturing process text data as described in the above-mentioned embodiment 1 are implemented.
[0179] Embodiment 4
[0180] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the method for standardizing manufacturing process text data as described in the first embodiment are implemented.
[0181] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0182] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0183] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0184] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0185] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0186] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A standardized approach to manufacturing process text data. It is characterized in that include: An original process text data set and a standard process text data set are obtained and preprocessed to obtain a process text data set and a standard process text data set, and the process text data set is divided into a small batch process text data set and a large batch process text data set according to a ratio; Calculate the BM25 score between the small batch process text dataset and the standard process text dataset to obtain a rough matching process text dataset, review the rough matching process text dataset, and obtain a verification process text dataset; The pre-trained process text data accurate matching model is used to determine the most matching standard process text data corresponding to each batch of process text data, and obtain an accurate matching process text data set; The matching relationship in the precise process text data set and the verification process text data set is applied to the original standard process text data to replace the original process text data, thereby completing the standardization of the process text data.
2. The method for standardizing manufacturing process text data according to claim 1, It is characterized in that The BM25 score between the small batch process text dataset and the standard process text dataset is calculated to obtain a rough matching process text dataset, specifically: Calculate the BM25 score of a small batch of process text data and all data in the preprocessed standard process text dataset; Sort by BM25 score, and the one with the largest score is the corresponding coarse matching process text data; The above operation is performed on all small batch process text data to obtain the rough matching process text data of each small batch process text data, and obtain the rough matching process text data set.
3. The method for standardizing manufacturing process text data according to claim 1, It is characterized in that The review of the coarse matching process text data set is performed through expert review to obtain a correct mapping of each small batch process text data to the standard process text data, thereby obtaining a verification process text data set.
4. The method for standardizing manufacturing process text data according to claim 1, It is characterized in that The training of the process text data accurate matching model is performed using the verification process text data set. During the training process, the process text data accurate matching model is trained with the goal of maximizing the conditional probability of given standard process text data, that is, the loss function is minimized, as shown in the following formula: Among them, Λ is the parameter set of the deep learning network, DS e,a Indicates that the standard process text data corresponding to the a-th small batch process text data is DS e ,DRS a It is the text data of the a-th small batch process.
5. The method for standardizing manufacturing process text data according to claim 1, It is characterized in that The method of using the pre-trained process text data accurate matching model to determine the most matching standard process text data corresponding to each batch of process text data is specifically: The input layer preprocesses the large batch process text data set and the standard process text data respectively; The representation layer extracts the key information of the large batch process text data set and the key information of the standard process text data preprocessed by the input layer through the BiLSTM network module and the attention module; The matching layer calculates the similarity between the key information of the large batch process text data set preprocessed by the input layer and the key information of the standard process text data preprocessed by the input layer; The greater the similarity, the higher the matching degree between the pre-batch process text data set and the standard process text data; Based on the maximum similarity value, the standard process text data corresponding to each large batch of process text data is obtained, thereby obtaining an accurate matching process text data set.
6. The method for standardizing manufacturing process text data as claimed in claim 5, It is characterized in that The representation layer extracts the key information of the large batch process text dataset after preprocessing by the input layer through the BiLSTM network module and the attention module, specifically: The BiLSTM network module is used to extract information from a large number of process text data preprocessed by a single input layer from two directions, and the information obtained from the two directions is combined to obtain a process text vector containing context information; The attention module realizes the process text vector transformation through a linear layer learning function, calculates the process text attention weight of each word through softmax, multiplies the process text vector by the process text attention weight and sums them up to obtain the process text key vector representation.
7. The method for standardizing manufacturing process text data according to claim 5, It is characterized in that The representation layer extracts the key information of the standard process text data preprocessed by the input layer through the BiLSTM network module and the attention module, specifically: The BiLSTM network module is used to extract information from a single piece of standard process text data preprocessed by the input layer from two directions, and the information obtained from the two directions is combined to obtain a standard process text vector containing context information; The attention module realizes the standard process text vector transformation through a linear layer learning function, calculates the standard process text attention weight of each word through softmax, multiplies the standard process text vector by the standard process text attention weight and sums them up to obtain the standard process text key vector representation.
8. Standardization system for manufacturing process text data, It is characterized in that include: A data acquisition processing module is configured to acquire and preprocess the original process text data set and the original standard process text data set to obtain a process text data set and a standard process text data set, and divide the process text data set into a small batch process text data set and a large batch process text data set according to a ratio; A data rough matching module is configured to calculate the BM25 score between the small batch process text data set and the standard process text data set to obtain a rough matching process text data set, review the rough matching process text data set, and obtain a verification process text data set; The data accurate matching module is configured to use the pre-trained process text data accurate matching model to determine the most matching standard process text data corresponding to each batch of process text data, and obtain an accurate matching process text data set; The data standardization module is configured to apply the matching relationship in the accurate process text data set and the verification process text data set to the original standard process text data to replace the original process text data, so as to complete the standardization of the process text data.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps in the method for standardizing manufacturing process text data as described in any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps in the method for standardizing manufacturing process text data as described in any one of claims 1 to 7 are implemented.
