A knowledge reasoning and fault diagnosis method based on knowledge graph
By constructing a CBRDA-KG decision model based on knowledge graph in industrial production, combining convolutional encoder, BiLSTM network and ATT model for fault diagnosis, the problem of low accuracy of fault diagnosis in the existing technology is solved, and fast and accurate fault diagnosis and case library updates are achieved.
Patent Information
- Application Number
- CN202210328887.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2042-03-30
AI Technical Summary
In the fault diagnosis process of industrial production, the simple knowledge reasoning method is not very applicable, the fault diagnosis method is poorly displayed, and the professional knowledge of modern artificial intelligence technology and technicians is ignored, resulting in low accuracy of recommendation results.
A knowledge inference and fault diagnosis method based on knowledge graph is proposed. By obtaining fault case information, a CBRDA-KG decision model is constructed, and data processing and reasoning is used to use convolutional encoder, BiLSTM network and ATT model to perform data processing and inference. Combining the weight and similarity of RBF neural network computing attributes, fault diagnosis and case library update are achieved.
Real-time, fast and accurate diagnosis of faults in industrial production process is achieved, the accuracy and application prospects of diagnosis results are improved, and case database is built, which promotes the improvement of information management efficiency.
Smart Images

Figure CN114756686B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of knowledge graph processing, and in particular to a knowledge reasoning and fault diagnosis method based on a knowledge graph. Background Art
[0002] Since its introduction, knowledge graphs have been widely used in fields such as knowledge extraction and business query. Knowledge graphs can display complex domain knowledge through data mining and information processing, explain the development laws of domain knowledge, and provide valuable information for subject research. Considering the actual characteristics and development of knowledge graphs, how to use production process data to construct, reason and make decisions in the field of industrial production under complex environments is an important research issue in the future industrial big data environment. By extracting existing production knowledge and constructing knowledge graphs, and then using knowledge graphs for subsequent knowledge reasoning, intelligent decision-making and optimization, effective knowledge integration can be achieved, helping enterprises solve the challenges faced by decision-making and optimization in complex manufacturing environments, and promoting enterprises to achieve comprehensive decision-making and intelligent production mode transformation.
[0003] There are many methods for fault diagnosis of installed equipment at present, but most of them use machine learning algorithms for parameter prediction and fault classification. Combining knowledge graphs for fault diagnosis can ensure the accuracy of the recommended results while giving full play to the professional ability of technicians, making the diagnosis results both subjective and objective. Pancho et al. proposed a Fingrams method that uses reasoning graphs to visualize the fuzzy reasoning process. It describes the interaction between fuzzy rules at the reasoning level through a reasoning graph composed of multiple nodes and links. However, the Fingrams method cannot model complex fuzzy rule bases in complex fuzzy interference systems, which in some cases requires a good reasoning process and limited rules in training data. Lan et al. proposed a method for complex fuzzy reasoning decision-making using knowledge graphs. In the training stage, the rule base is represented as a fuzzy knowledge graph according to the language labels of the rule set and their relationships, and reasoning is performed by generating an adjacent fuzzy knowledge graph matrix (FKG). When a record in the test data set is given, it will be fuzzified and labeled. Each component in the record is checked by FKG using the reasoning mechanism in approximate reasoning. The label of the new record is then derived by the maximum and minimum operator. This mechanism not only helps speed up the checking process, but also enables inference using new records that were not inferred by the rule base.
[0004] Although there have been related fault diagnosis and reasoning methods before, there are still some problems. First, the pure knowledge reasoning method is not very applicable, and the fault diagnosis method is not very demonstrative. In addition, the diagnosis ignores the combination of modern artificial intelligence technology and the professional knowledge of technicians, which leads to the low accuracy of the final recommendation results. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a knowledge reasoning and fault diagnosis method based on knowledge graph, so as to perform real-time, rapid and accurate diagnosis and update of fault cases in industrial production processes.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] A knowledge reasoning and fault diagnosis method based on knowledge graph, comprising: obtaining actual fault case information and loading it into a pre-built and trained CBRDA-KG decision model to obtain a fault diagnosis result;
[0008] The data processing process of the CBRDA-KG decision model includes the following steps:
[0009] S1: Obtain fault record information and data knowledge, mark the entities of fault information and the relationships between entities;
[0010] S2: After cleaning the acquired data, all relationship paths between entities and entity relationship triples are obtained to build a case resource knowledge graph;
[0011] S3: embed the acquired relationship path information into the convolution encoder to obtain the path feature vector, input the path feature vector into the BiLSTM network to obtain the relationship path representation vector, input the relationship path representation vector into the ATT model, obtain the hidden triple path reasoning result through multi-step reasoning, and complete the case resource knowledge graph;
[0012] S4: extracting attribute feature information of the fault in the case resource knowledge graph;
[0013] S5: Calculate the weight value of each attribute in the attribute feature information, and calculate the overall similarity between the case corresponding to the current data and the preset historical case through a neural network to complete the construction of the CBRDA-KG decision model.
[0014] Furthermore, in step S3, the expression of the ATT model is:
[0015] s(p i ,r)=tanh(p i W s )r
[0016]
[0017]
[0018] P(r|e s ,et )=f(W P (c+r))
[0019] In the formula, s(p i ,r) is the semantic relevance score, p i is the output value of the i-th hidden layer, W s is the weight matrix, r is the probability score, α i is the independent weight of path i, n is the number of words, is the softmax function, c is the candidate relationship state vector obtained after weighted calculation, P(r|e s ,e t ) is the probability score of the head and tail entities, e s is the head entity, e t is the tail entity, W P (c+r) is the probability weight, and f is the activation function;
[0020] The ATT model aggregates basic information of paths after weighted calculation, discarding paths with low relevance to candidate relationships while retaining paths with high relevance;
[0021] The loss function of the ATT model is:
[0022]
[0023] Where L(θ) is the loss function of the ATT model, N is the number of experiments, is the objective function, λ is the regularization rate, and θ is the regularization parameter;
[0024] The ATT model is trained using the Adam optimizer. When the training error is the lowest, higher and lower values are assigned to the positive triples and negative triples, respectively. After adjusting the parameters, L2 norm regularization is used to prevent overfitting, and the hidden triple path reasoning result is obtained.
[0025] Furthermore, step S4 specifically includes the following steps:
[0026] S41: Segmenting the text in the case resource knowledge graph using a word segmentation method;
[0027] S42: Use the Word2vec method to extract fault attribute features from the text after word segmentation, and establish a fault information table according to the category.
[0028] Furthermore, step S41 specifically includes the following steps:
[0029] S411: Use the Jieba word segmentation method to segment the fault location and fault phenomenon in the case resource knowledge graph, classify different types of features, and perform word segmentation screening;
[0030] S412: Creating a case library in the form of a data table for the segmented data.
[0031] Further, step S42 specifically includes the following steps:
[0032] S421: extracting fault features from the fault location, fault phenomenon and fault elements in the fault case information, and storing them in a fault feature table;
[0033] S422: constructing a fault feature word library and a stop word library;
[0034] S423: Use the Wordvec algorithm to remove stop words from the segmented data and extract keywords that can represent the case.
[0035] Furthermore, step S5 specifically includes the following steps:
[0036] S51: Determine the subjective weight of attributes based on fuzzy preference relations;
[0037] S52: Determine the objective weight of the attribute based on the case resource knowledge graph;
[0038] S53: Calculating a comprehensive weight of the attribute according to the subjective weight and the objective weight;
[0039] S54: Calculate the overall similarity between the case corresponding to the current data and the preset historical case through a neural network according to the comprehensive weight;
[0040] S55: Complete the construction of the CBRDA-KG decision model.
[0041] Furthermore, step S51 specifically includes the following steps:
[0042] S511: Establish a fuzzy preference relationship matrix Y=(y ij ) n×n , where y ij Represents attribute C i Compared to attribute C j The importance of y ij satisfy:
[0043] 1)y ij ≥0;
[0044] 2)y ij +y ji =1,
[0045] 3)y ii =0.5,
[0046] 4)yij +y ji +y ki =1.5,
[0047] 5)
[0048] In the formula, i and j are subscripts of attribute C, and n is the total number of attributes;
[0049] S512: Determine an optimization model for the subjective weight of the attribute according to the fuzzy preference relationship matrix. The expression of the optimization model is:
[0050]
[0051]
[0052] In the formula, ω′ j is the subjective weight;
[0053] S513: Solving the optimization model, the calculation expression of the solution process is:
[0054]
[0055]
[0056] Where λ is the Lagrange coefficient.
[0057] Further, step S52 specifically includes:
[0058] The weight value of each attribute is determined according to the similarity calculation result in the case resource knowledge graph, and the similarity between all attributes in the case library and the corresponding attribute is calculated respectively. The average of the similarity calculation results is taken, and then all attributes are normalized to obtain the objective weight value corresponding to each attribute. The calculation expression of the objective weight value is:
[0059]
[0060] In the formula, ω″ j is the objective weight value of attribute j, s ij is the similarity between attribute i and attribute j.
[0061] Further, step S54 specifically includes:
[0062] S541: X=[x1,x2,…,x n ] T As input samples, load them into the RBF neural network, using Y=[y1,y2,…,y n ] TAs output, the hidden layer of the RBF neural network uses a radially symmetric Gaussian function;
[0063]
[0064] where r i (x) represents the output of the i-th layer node, c i represents the central value of the i-th hidden layer node, σ represents the variance of the i-th hidden layer node, and l is the number of hidden layer nodes;
[0065] S542: The output of the RBF neural network is:
[0066]
[0067] Where ω is the output layer weight;
[0068] S543: Select l centers for clustering. For the radial basis of the Gaussian kernel function, we have:
[0069]
[0070]
[0071] where c max is the maximum distance between the center points;
[0072] The overall similarity is calculated through the RBF neural network.
[0073] Furthermore, when a source feature with a similarity value of 1 is retrieved in the fault diagnosis result, the fault cause and solution of the case are directly obtained from the fault database corresponding to the source feature, and the current case is not saved;
[0074] When the similarity value retrieved in the fault diagnosis result is less than 1, the solution of the similar source case is used as the suggested solution for the current case, and the solution is revised according to the actual situation. The revised solution is used as the final solution, and the case is saved as a new case in the case library to update the case library.
[0075] Compared with the prior art, the present invention has the following advantages:
[0076] The present invention proposes a new fault diagnosis method combining knowledge reasoning and decision-making algorithm, and improves information management efficiency by building a fault case knowledge base. Secondly, a knowledge reasoning model is built in combination with Neo4j using machine learning algorithms (CNN, BiLSTM) as the main tools. Then, similarity analysis is performed using the fault case information base and RBF technology. In addition, the case attribute information is comprehensively analyzed, the similarity is determined by combining subjective and objective weights, and the most matching case is inferred. This model not only has high accuracy and fast speed, but also has good application prospects and practical significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 A schematic diagram of a flow chart of a knowledge reasoning and fault diagnosis method based on a knowledge graph provided in an embodiment of the present invention;
[0078] Figure 2 A knowledge reasoning model structure diagram provided in an embodiment of the present invention;
[0079] Figure 3 A structural diagram of a fault case decision model provided in an embodiment of the present invention;
[0080] Figure 4 A CBRDA-KG model flow chart provided in an embodiment of the present invention;
[0081] Figure 5 This is a diagram showing the results of an experimental case provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the 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. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0083] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0084] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0085] Example 1
[0086] This embodiment provides a knowledge reasoning and fault diagnosis method based on a knowledge graph, including: obtaining actual fault case information and loading it into a pre-built and trained CBRDA-KG decision model to obtain a fault diagnosis result;
[0087] The data processing process of the CBRDA-KG decision model includes the following steps:
[0088] S1: Obtain fault record information and data knowledge, mark the entities of fault information and the relationships between entities;
[0089] S2: After cleaning the acquired data, all relationship paths between entities and entity relationship triples are obtained to build a case resource knowledge graph;
[0090] S3: embed the acquired relationship path information into the convolution encoder to obtain the path feature vector, input the path feature vector into the BiLSTM network to obtain the relationship path representation vector, input the relationship path representation vector into the ATT model, and obtain the hidden triple path reasoning result through multi-step reasoning to complete the case resource knowledge graph;
[0091] S4: Extract attribute feature information of faults in the case resource knowledge graph;
[0092] S5: Calculate the weight value of each attribute in the attribute feature information, and calculate the overall similarity between the case corresponding to the current data and the preset historical case through the neural network to complete the construction of the CBRDA-KG decision model.
[0093] The following is a detailed description of each step:
[0094] 1. Step S1 specifically includes the following contents:
[0095] Perform part-of-speech tagging on the obtained text records to determine the entities related to the fault information and the relationships between the entities.
[0096] 2. Step S2 specifically includes the following contents:
[0097] According to the obtained entity-relationship triples (h, r, t), duplicate and unreasonable information is deleted, and the remaining entity and relationship paths are sorted out. At the same time, the integrity of the path information obtained is ensured. The selected entities and relationships are used to build a domain knowledge graph using Neo4j software.
[0098] 3. If Figure 2 As shown, step S3 specifically includes the following contents:
[0099] S31, the head and tail entities and the corresponding relationship are represented by vectors and used as the input of the convolution encoder. The activation function selects the PReLU function. The i-th feature vector u extracted from the convolution kernel is obtained. i =[u i1 ,u i2 ,…,u ir ],in
[0100] u ir =f(ω r [e i-1 ,r i ,e i ]+b) (1)
[0101] Where f is the PReLU function and b is the bias.
[0102] S32. The output feature vector of the convolutional coding layer is used as the input vector of the BiLSTM, which represents a time step of the BiLSTM network. The forward and backward outputs of the LSTM network are and That is, from left to right and from right to left respectively. Two sets of state sequences can be obtained through bidirectional transmission and The path vector is The number of hidden unit states is k / 2 and is rounded. From this, we can derive the encoding path vector representation set P = [p1, p2, ..., p n ],P∈R k*n .
[0103] S33. Let the output of BiLSTM be used as the input of ATT for path integration representation, and calculate the semantic relevance score of each path, thereby assigning independent weights to each path. The ATT model formula is as follows:
[0104] s(p i ,r)=tanh(p i W s )r (2)
[0105]
[0106]
[0107] P(r|e s ,e t )=f(W P (c+r)) (5)
[0108] In the formula, s(p i ,r) is,p i For W s is, r is, α iis the independent weight of path i, n is, is, c is the candidate relationship state vector obtained after weighted calculation, P(r|e s ,e t ) is the probability score of the head and tail entities, e s For t For W P (c+r) is, f is the activation function;
[0109] The ATT model aggregates the basic information of the paths after weighted operations, discarding the paths with low relevance to the candidate relationships while retaining the paths with strong relevance;
[0110] The loss function of the ATT model is:
[0111]
[0112] Where L(θ) is the loss function of the ATT model, and N is is, λ is, θ is;
[0113] Formula (2) represents the path semantic relevance score, formula (3) represents the independent weight of each path, formula (4) represents the candidate relationship state vector obtained after weighted calculation, formula (5) represents the probability score of the head and tail entities, and sigmoid is selected as the activation function. After weighted operation, the basic information of the path can be collected, and the paths with low relevance to the candidate relationship are discarded while the paths with strong relevance are retained. The inference model is trained using the Adam optimizer, and the loss function can be expressed as formula (6). When the training error is the lowest, higher and lower values are assigned to the positive triples and negative triples respectively. After adjusting the parameters, the L2 norm regularization method is used to prevent overfitting, and the hidden triple path reasoning result is obtained, thereby realizing the reasoning of implicit relations in the knowledge graph and the completion of the graph.
[0114] 4. If Figure 3 As shown, step S4 specifically includes the following contents:
[0115] S41. Use the Jieba word segmentation method to segment the text.
[0116] S42. Use the Word2vec method to extract fault attribute features and establish a fault information table according to the category.
[0117] The specific contents of step S41 are as follows:
[0118] S411. Use Jieba word segmentation to segment the fault location and fault phenomenon of the case, and classify different types of features. Remove worthless words in the stop word library from the word segmentation results.
[0119] S412. The case library is created in the form of a data table. Taking fault characteristics as an example, the fault characteristic number, fault characteristic name and case number are listed one by one and stored in the table, and a fault phenomenon storage table and a solution table are established in sequence.
[0120] The specific contents of step S42 are as follows:
[0121] S421. The extraction of fault features is mainly aimed at the fault location and fault phenomenon fault elements in the fault case information. After the feature extraction is completed, it is stored in the fault feature table.
[0122] S422, construct a fault feature word library and a stop word library. The feature word library is used to store some proprietary names of equipment, special action vocabulary, etc.; the stop word library mainly stores some worthless words such as conjunctions and modifiers.
[0123] S423. Use the Wordvec algorithm to extract keywords that can represent the case after removing stop words.
[0124] 5. If Figure 4 As shown, step S5 specifically includes the following steps:
[0125] S51: Determine the subjective weight of attributes based on fuzzy preference relations;
[0126] S52: Determine the objective weight of the attribute based on the case resource knowledge graph;
[0127] S53: Calculate the comprehensive weight of the attribute based on the subjective weight and the objective weight;
[0128] S54: Calculate the overall similarity between the case corresponding to the current data and the preset historical case through a neural network according to the comprehensive weight;
[0129] S55: Complete the construction of the CBRDA-KG decision model.
[0130] Step S51 specifically includes the following steps:
[0131] S511: Establish a fuzzy preference relationship matrix Y=(y ij ) n×n , where y ij Represents attribute C i Compared to attribute C j The importance of y ij satisfy:
[0132] 1)y ij ≥0;
[0133] 2)y ij +y ji =1,
[0134] 3)y ii =0.5,
[0135] 4)y ij +y ji +y ki =1.5,
[0136] 5)
[0137] In the formula, i and j are subscripts of attribute C, and n is the total number of attributes;
[0138] y ij Represents attribute C i Compared to attribute C j The importance of can be given by experts in related fields.
[0139]
[0140] S512: Determine an optimization model for the subjective weight of the attribute according to the fuzzy preference relationship matrix. The expression of the optimization model is:
[0141]
[0142]
[0143] In the formula, ω′ j is the subjective weight;
[0144] S513: Solve the optimization model. The calculation expression of the solution process is:
[0145]
[0146]
[0147] Where λ is the Lagrange coefficient.
[0148] Step S52 specifically includes:
[0149] S521: Determine the weight value of each attribute according to the similarity calculation result in the case library, calculate the similarity between all attributes in the case library and the corresponding attribute respectively, take the average of the results, and then normalize all attributes to obtain the objective weight value corresponding to each attribute.
[0150] S522: The similarity of each attribute is recorded as s ij , the similarity of all the i-th attributes is calculated comprehensively as m represents the total number of samples in the case library, and n represents the total number of attributes. Then, normalization is performed according to the attribute similarity to obtain the objective weight value ω″ of each attribute. j :
[0151]
[0152] The specific contents of step S53 are as follows:
[0153] After determining the subjective weight and objective weight of the attribute respectively, the two are weighted. Considering the importance of subjective and objective, the coefficients of the two are set to 0.5 respectively. Of course, non-equivalent values can also be assigned according to actual conditions. For this reason, the comprehensive weight is:
[0154]
[0155] Step S54 specifically includes:
[0156] S541: X=[x1,x2,…,x n ] T As input samples, load them into the RBF neural network, using Y=[y1,y2,…,y n ] T As output, the hidden layer of the RBF neural network uses a radially symmetric Gaussian function;
[0157]
[0158] where r i (x) represents the output of the i-th layer node, c i represents the central value of the i-th hidden layer node, σ represents the variance of the i-th hidden layer node, and l is the number of hidden layer nodes;
[0159] S542: The output of the RBF neural network is:
[0160]
[0161] Where ω is the weight of the output layer;
[0162] S543: Select l centers for clustering. For the radial basis of the Gaussian kernel function, we have:
[0163]
[0164]
[0165] where c max is the maximum distance between the center points;
[0166] The overall similarity is calculated through the RBF neural network.
[0167] 6. Usage process:
[0168] After weight calculation, the comprehensive similarity of the case is obtained. When a source feature with a similarity value of 1 is retrieved, the fault cause and solution of the case are directly obtained from the fault database, and the target case is not saved. When the retrieved similarity is less than 1, the solution of the similar source case is used as the recommended solution for the target case, and the solution is revised according to the actual situation. The revised solution is used as the final solution, and the case is saved as a new case in the case library to update the case library.
[0169] Specifically, the specific process of this embodiment includes the following steps:
[0170] S1. Obtain fault records and data knowledge, and organize the collected fault record information.
[0171] S2. After data cleaning, all relationship paths between entities and entity relationship triples are obtained to build a case resource knowledge graph.
[0172] S3. Based on the CNN-BiLSTM-ATT model, a knowledge reasoning model is constructed to obtain the hidden relationship path representation.
[0173] S4. Extract attribute feature information in the resource library based on Jieba word segmentation and Word2vec-RBF.
[0174] S5. Calculate the weight values of the attributes comprehensively, apply RBF neural network for training, obtain the overall similarity between the current case and the historical case, and complete the construction of the CBRDA-KG method model.
[0175] S6. Input the actual fault case information into the constructed CBRDA-KG decision model to obtain the fault diagnosis results and realize the construction and update of the case library.
[0176] In this embodiment, the fault information data set comes from the Baowu Intelligent Maintenance Equipment Fault Diagnosis Log. There are 183 fault information tables, 6 fault elements, and 24 features.
[0177] First, the fault knowledge of long paragraphs of Chinese text is identified, and words and sentences irrelevant to fault diagnosis information are removed. Figure 1 As shown, specifically:
[0178] S1. Extract features from the remaining words and sentences, select the required fault elements, fault descriptions, case numbers, fault features, feature numbers, fault phenomena, solutions and numbers, take them as entities, and determine the relationship between entities. And organize the collected fault record information.
[0179] S2. After data sorting, all relationship paths between entities and entity relationship triples are extracted to build a fault case resource library.
[0180] S3. Build a knowledge reasoning model based on the CNN-BiLSTM-ATT model.
[0181] S31. Represent the head and tail entities and their corresponding relationships as vectors, and use them as inputs of a convolutional encoder to output a feature vector.
[0182] S32. Use the output feature vector as the input of BiLSTM, obtain the state sequence through bidirectional transmission, output the encoded path vector representation set and use it as the input of ATT for path integration representation.
[0183] S33. Calculate the semantic relevance score of each path, thereby assigning an independent weight to each path.
[0184] S34. Output the triples completed after reasoning, and complete and update the knowledge graph.
[0185] S4. Extract attribute feature information from the resource library based on Jieba word segmentation and Word2vec-RBF, and apply RBF neural network for training.
[0186] S41. Use Jieba word segmentation to segment the fault location and fault phenomenon of the case. Then remove the worthless words in the stop word library from the word segmentation results.
[0187] S42. Use Word2vec to extract key attribute feature words of case information.
[0188] S5. Calculate the weight values of the attributes comprehensively, obtain the overall similarity between the current case and the historical cases, and construct the CBRDA-KG method model.
[0189] S51. Calculate the weight of the attribute feature words extracted based on a combination of subjective and objective calculations.
[0190] S52, inputting it into the RBF neural network for training, and calculating the overall similarity.
[0191] S6. Obtain the final fault diagnosis result and build and update the case library.
[0192] like Figure 5 As shown, this embodiment calculates the similarity of historical cases according to the fault attributes, completes the matching with Case 1, and obtains the corresponding fault phenomenon and fault cause.
[0193] The decision algorithm proposed in this embodiment, which combines decision optimization and the reasoning algorithm based on the knowledge graph, can effectively exert the reasoning function of the knowledge graph while fully considering the similarity of case attributes, making the decision recommendation results more accurate. At the same time, the comprehensive consideration of the weight value of the attribute will also ensure the accuracy of the recommendation results. At the same time, the combination of convolutional neural network, BiLSTM network, attention mechanism and RBF neural network to achieve comprehensive decision-making can determine the path more accurately, and the construction of a case library for historical cases can also lay a good foundation for the recycling and enrichment of subsequent information.
[0194] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A knowledge reasoning and fault diagnosis method based on knowledge graph, characterized in that: include: Obtain actual fault case information and load it into the pre-built and trained CBRDA-KG decision model to obtain fault diagnosis results; The data processing process of the CBRDA-KG decision model includes the following steps: S1: Obtain fault record information and data knowledge, mark the entities of fault information and the relationships between entities; S2: After cleaning the acquired data, all relationship paths between entities and entity relationship triples are obtained to build a case resource knowledge graph; S3: embed the acquired relationship path information into the convolution encoder to obtain the path feature vector, input the path feature vector into the BiLSTM network to obtain the relationship path representation vector, input the relationship path representation vector into the ATT model, obtain the hidden triple path reasoning result through multi-step reasoning, and complete the case resource knowledge graph; S4: extracting attribute feature information of the fault in the case resource knowledge graph; S5: Calculate the weight value of each attribute in the attribute feature information, and calculate the overall similarity between the case corresponding to the current data and the preset historical case through a neural network to complete the construction of the CBRDA-KG decision model; Step S5 specifically includes the following steps: S51: Determine the subjective weight of attributes based on fuzzy preference relations; S52: Determine the objective weight of the attribute based on the case resource knowledge graph; S53: Calculating a comprehensive weight of the attribute according to the subjective weight and the objective weight; S54: Calculate the overall similarity between the case corresponding to the current data and the preset historical case through a neural network according to the comprehensive weight; S55: Complete the construction of CBRDA-KG decision model; Step S51 specifically includes the following steps: S511: Establish a fuzzy preference relationship matrix Y=(y ij ) n×n , where y ij Represents attribute C i Compared to attribute C j The importance of y ij satisfy: 1)y ij ≥0; 2) 3) 4) 5) In the formula, i and j are subscripts of attribute C, and n is the total number of attributes; S512: Determine an optimization model for the subjective weight of the attribute according to the fuzzy preference relationship matrix. The expression of the optimization model is: In the formula, ω′ j is the subjective weight; S513: Solving the optimization model, the calculation expression of the solution process is: Where λ is the Lagrange coefficient; Step S52 specifically includes: The weight value of each attribute is determined according to the similarity calculation result in the case resource knowledge graph, and the similarity between all attributes in the case library and the corresponding attribute is calculated respectively. The average of the similarity calculation results is taken, and then all attributes are normalized to obtain the objective weight value corresponding to each attribute. The calculation expression of the objective weight value is: In the formula, ω″ j is the objective weight value of attribute j, s ij is the similarity between attribute i and attribute j; Step S54 specifically includes: S541: X=[x1, x2, ..., x n ] T As input samples, load them into the RBF neural network, using Y = [y1, y2, ..., y n ] T As output, the hidden layer of the RBF neural network uses a radially symmetric Gaussian function; where r i (x) represents the output of the i-th layer node, c i represents the central value of the i-th hidden layer node, σ represents the variance of the i-th hidden layer node, and l is the number of hidden layer nodes; S542: The output of the RBF neural network is: In the formula, ω is the weight of the output layer, h is the number of hidden layers, and m is the total number of nodes in the j layer; S543: Select, centers for clustering, for the radial basis of the Gaussian kernel function, there are: where c max is the maximum distance between the center points; The overall similarity is calculated through the RBF neural network.
2. According to claim 1, a knowledge reasoning and fault diagnosis method based on knowledge graph is characterized in that: In step S3, the expression of the ATT model is: s(p i ,r)=tanh(p i W s )r P(r|e s ,e t )=f(W P (c+r)) In the formula, s(p i , r) is the semantic relevance score, p i is the output value of the i-th hidden layer, W s is the weight matrix, r is the probability score, α i is the independent weight of path i, n is the number of words, is the softmax function, c is the candidate relationship state vector obtained after weighted calculation, P(r|e s , e t ) is the probability score of the head and tail entities, e s is the head entity, e t is the tail entity, W P (c+r) is the probability weight, and f is the activation function; The ATT model aggregates basic information of paths after weighted calculation, discarding paths with low relevance to candidate relationships while retaining paths with high relevance; The loss function of the ATT model is: In the formula, l(θ) is the loss function of the ATT model, N is the number of experiments, is the objective function, λ is the regularization rate, and θ is the regularization parameter; The ATT model is trained using the Adam optimizer. When the training error is the lowest, higher and lower values are assigned to the positive triples and negative triples, respectively. After adjusting the parameters, L2 norm regularization is used to prevent overfitting, and the hidden triple path reasoning result is obtained.
3. The knowledge reasoning and fault diagnosis method based on knowledge graph according to claim 1 is characterized in that: Step S4 specifically includes the following steps: S41: Segmenting the text in the case resource knowledge graph using a word segmentation method; S42: Use the Word2vec method to extract fault attribute features from the text after word segmentation, and establish a fault information table according to the category.
4. A knowledge reasoning and fault diagnosis method based on knowledge graph according to claim 3, characterized in that: Step S41 specifically includes the following steps: S411: Use the Jieba word segmentation method to segment the fault location and fault phenomenon in the case resource knowledge graph, classify different types of features, and perform word segmentation screening; S412: Creating a case library in the form of a data table for the segmented data.
5. A knowledge reasoning and fault diagnosis method based on knowledge graph according to claim 4, characterized in that: Step S42 specifically includes the following steps: S421: extracting fault features from the fault location, fault phenomenon and fault elements in the fault case information, and storing them in a fault feature table; S422: constructing a fault feature word library and a stop word library; S423: Use the Wordvec algorithm to remove stop words from the segmented data and extract keywords that can represent the case.
6. The knowledge reasoning and fault diagnosis method based on knowledge graph according to claim 1 is characterized in that: When a source feature with a similarity value of 1 is retrieved in the fault diagnosis result, the fault cause and solution of the case are directly obtained from the fault database corresponding to the source feature, and the current case is not saved; When the similarity value retrieved in the fault diagnosis result is less than 1, the solution of the similar source case is used as the suggested solution for the current case, and the solution is revised according to the actual situation. The revised solution is used as the final solution, and the case is saved as a new case in the case library to update the case library.
Citation Information
Patent Citations
Fault discrimination reasoning method based on knowledge graph
CN112269901A
Knowledge reasoning method based on industrial mechinery fault diagnosis knowledge graph
CN113961718A
Cited By
Phased-array antenna excitation inversion method based on design and fault knowledge graph
CN115828756A
Phased Array Antenna Excitation Inversion Method Based on Design and Fault Knowledge Graphs
CN115828756B
Fault case recommendation method based on knowledge graph
CN116541510A