Generator set typical equipment operation and maintenance knowledge intelligent extraction method based on contrast example learning framework
By combining the comparative example learning framework and the PRGC model, the problem of error propagation and overlapping triples in entity-relationship extraction in typical equipment operation and maintenance of power generation units is solved, and more accurate and efficient knowledge extraction is achieved.
Patent Information
- Application Number
- CN202410432659.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2024-08-27
AI Technical Summary
In the existing technology, in the operation and maintenance of typical equipment of generating units, the entity-relationship extraction method can easily lead to error propagation, and it is difficult to deal with the problem of overlapping triples, affecting the accuracy and reliability of knowledge extraction.
A method based on the comparative example learning framework is used to generate positive and negative samples of operation and maintenance text through data enhancement strategies. Combined with PRGC and Bert encoder, a CL-PRGC model is constructed to extract joint relationship triples of potential relationships and global correspondences. , optimize the entity-relationship extraction model.
It improves the accuracy of matching entities and relationships, increases the speed of entity and relationship extraction, effectively reduces error propagation, and improves the reliability of knowledge extraction.
Smart Images

Figure BDA0004786151650000111 
Figure BDA0004786151650000122 
Figure BDA0004786151650000113
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of equipment operation and maintenance and artificial intelligence technology, and specifically relates to a method for intelligently extracting typical equipment operation and maintenance knowledge of a generator set based on a comparative example learning framework. Background Art
[0002] With the continuous growth of energy demand and the expansion of the scale of power systems, the operation and maintenance of traditional typical equipment of generator sets are facing increasing challenges. In order to meet these challenges, the intelligent operation and maintenance of typical equipment of generator sets has gradually attracted people's attention. Intelligent operation and maintenance refers to the use of advanced information technology and artificial intelligence to automate, intelligentize and efficiently manage and control the operation and maintenance process of power systems. Its goal is to achieve comprehensive perception, analysis and management of the status of typical equipment and systems of generator sets through real-time online monitoring of equipment, data preprocessing, fault diagnosis and prediction technology, and further improve the reliability, safety and economy of the power system.
[0003] As a basic technology of artificial intelligence, knowledge graph has strong data expression ability and modeling flexibility, and is particularly good at processing relationship-intensive data. By modeling the relationship between data, fragmented data can be effectively organized and scattered data can be more fully utilized. The acquisition of knowledge will directly determine the accuracy of the output, and the named entity recognition technology determines the reliability of knowledge acquisition. By integrating the key information, historical data and professional knowledge of typical equipment of the generator set in the form of triplets, the operation and maintenance intelligent decision-making model is more context-aware, improving the accuracy and applicability of the decision.
[0004] From the original domain data to the formation of high-quality knowledge graphs, multiple steps such as knowledge extraction, knowledge fusion and knowledge processing are required, among which knowledge extraction is the key link in the whole process. At present, entity-relationship extraction methods are divided into two categories: pipeline method and joint extraction method. The pipeline method decomposes entity relationship extraction into two independent subtasks: entity recognition and relationship extraction. This method is easy to implement and highly flexible, but it is easy to ignore the connection between entity recognition and relationship extraction by processing them separately. In addition, the errors generated by entity recognition will be passed to the relationship classification model, thereby affecting the performance of relationship extraction. The joint extraction method can effectively integrate entity and relationship information, thereby improving the performance of knowledge extraction, but it cannot effectively deal with the problem of overlapping triples.
[0005] Therefore, how to effectively extract entity-relationships plays an important role in the development of intelligent operation and maintenance of typical equipment of generator sets. In order to fully mine the entity relationship knowledge contained in large-scale operation and maintenance texts and reduce the errors caused by traditional entity-relationship joint extraction methods, this paper designs an intelligent extraction method for operation and maintenance knowledge of typical equipment of generator sets based on a contrastive example learning framework, which is used to automatically and synchronously extract entities and relationships from unstructured data of power systems, accurately identify entities, extract relationships from maintenance-related documents with limited training sets, and reduce the propagation of errors. Summary of the invention
[0006] In view of the above technical problems, the present invention provides an intelligent extraction method for operation and maintenance knowledge of typical equipment of generator sets based on a comparative example learning framework, which can quickly and accurately extract the entity knowledge and potential relationships contained in the large-scale operation and maintenance text data of typical equipment of generator sets.
[0007] In order to solve the above technical problems, the present invention adopts the following technical solutions.
[0008] A method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework comprises the following steps:
[0009] S1. Based on the large-scale operation and maintenance texts of typical equipment of power generation units, the data enhancement strategy is used to process the operation and maintenance texts, and the generation strategy of positive and negative samples of the operation and maintenance texts is designed to improve the accuracy and speed of information extraction of the entity relationship extraction model;
[0010] S2, based on the positive and negative samples of the operation and maintenance text generated in S1, an encoder is used to extract text feature vectors from the sample data;
[0011] S3, combining the feature vector extracted in step S2, PRGC (Potential Relation and GlobalCorrespondence Based Joint Relational Triple Extraction) and contrastive learning, mapping the features of the operation and maintenance text to the contrastive loss space, and constructing a knowledge extraction model for the operation and maintenance of typical equipment of the generator set;
[0012] S4, based on the typical equipment operation and maintenance knowledge extraction model of the generator set constructed in S3, set the corresponding loss function, use positive samples to train the typical equipment operation and maintenance knowledge extraction model of the generator set, so that it can learn the feature vectors contained in the positive samples and separate the negative sample data into the latent space;
[0013] S5. Use the model trained in S4 to perform entity-relationship joint extraction on the operation and maintenance knowledge of typical equipment of the generator set to obtain the entity pairs and corresponding relationships contained in the operation and maintenance knowledge.
[0014] Furthermore, step S1 includes the following sub-steps:
[0015] S11. Use translation tools to translate large-scale operation and maintenance texts of typical equipment of power generators into English, and then translate English into Chinese, so as to express the original operation and maintenance texts into new sentences, and expand positive samples based on the original operation and maintenance texts;
[0016] S12. Based on large-scale operation and maintenance texts, two nouns in a single sentence are randomly replaced with synonyms to expand the text in form;
[0017] S13, using the idea of random masking, randomly mask one-fifth of the words in the operation and maintenance text, and crop the content to generate new positive samples;
[0018] S14. Design a negative sample generation strategy related to entities in large-scale operation and maintenance texts of typical equipment of generator sets, and generate negative samples based on the safety report of typical equipment of generator sets.
[0019] Further, step S2 includes the following sub-steps:
[0020] S21. Use the PRGC Bert encoder to process the text. Use Bert to convert the input text into a word vector consisting of Token embedding, Segment embedding and Position embedding.
[0021] S22, Segment embedding part recognizes different symbols and distinguishes sentences in the text;
[0022] S23, initialize a Position embedding module and train it to identify the position of entities in the text;
[0023] S24. Use the three modules of Bert to extract word feature vectors in the equipment operation and maintenance samples for subsequent extraction of triples and optimization of the entity relationship extraction model.
[0024] Further, step S3 includes the following sub-steps:
[0025] S31, according to the text feature vector extracted by S2, the output of the Bert encoder is transmitted to the PRGC model and the contrast loss space;
[0026] S32, where the feature vector output by Bert is used to calculate the h[cls] contrast loss value, and the Bert encoder is embedded into the PRGC model to provide a theoretical basis for the entity-relationship joint extraction of the subsequent model;
[0027] S33, the feature vector output by Bert, on the other hand, uses the contrast loss function value as a standard to adjust the hyperparameters of the Bert encoder to affect the extraction of triples;
[0028] S34. Based on the PRGC model of step S32, the model is optimized in combination with the contrastive learning part of step S33 to establish a CL-PRGC (Contrastive Learning-PRGC) model to complete the construction of the knowledge extraction model for the operation and maintenance of typical equipment of the generator set.
[0029] Furthermore, step S34 includes the following sub-steps:
[0030] S341, input the text feature vector obtained in S2 into the potential relationship prediction part of PRGC, extract all possible existing relationships and perform weight analysis, and select the relationship greater than the threshold as the candidate relationship;
[0031] S342, at the same time, the text feature vector is input into the subject-object alignment matrix in the framework, probability prediction is performed on different candidate relationships, the entire entity is determined, and the matching of the first word of the head and tail entities is completed;
[0032] S343, inputting the text feature vector extracted by S2 and the candidate relationship generated by S321 into the entity extraction part of the framework, which uses the sequence label components of two specific relationships to extract the subject and the object respectively to deal with the subject-object overlap problem;
[0033] S3444. List all predicted entity pairs, use the global correspondence matrix and optimize the combined objective function, share the PRGC encoder parameters, and build a CL-PRGC model for entity-relationship joint extraction.
[0034] Further, step S4 includes the following sub-steps:
[0035] S41, construct a contrast loss function and apply it to train the parameters of the Bert encoder to further expand the difference between positive samples and negative samples;
[0036] S42. Construct a triple extraction loss function, train the parameters of the Bert encoder and PRGC model, and further improve the ability to extract typical equipment operation and maintenance knowledge of generator sets.
[0037] The present invention has the following beneficial effects: This design method aims to solve the problems that the scale of operation and maintenance knowledge of typical equipment of generator sets is large and the reliability of entity and relationship extraction is difficult to ensure. Based on the operation and maintenance text of typical equipment of large-scale generator sets, it combines contrastive learning with the entity-relationship joint extraction model, and on the basis of expanding the positive and negative samples of operation and maintenance text, improves the accuracy of entity and relationship matching, effectively improves the entity and relationship extraction rate, and provides an effective method for the efficient extraction of entity-relationships. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The present invention is a flowchart of a method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] like Figure 1 As shown, the embodiment of this specification provides a flow chart of a method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework. Figure 1 It can be seen that in one or more embodiments of this specification, a method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework specifically includes the following steps:
[0041] S1. Based on the large-scale operation and maintenance texts of typical equipment of power generation units, the data enhancement strategy is used to process the operation and maintenance texts, and the generation strategy of positive and negative samples of the operation and maintenance texts is designed to improve the accuracy and speed of information extraction of the entity relationship extraction model.
[0042] The present invention combines large-scale operation and maintenance texts of typical equipment of generator sets, and on this basis adopts a data enhancement strategy to generate texts with different characteristics required for comparative learning, mainly including positive samples and negative samples. Positive samples are conducive to the information extraction model to more accurately identify the entities and relationships contained in the text, and negative samples are helpful to reduce the adverse effects of irregular texts of large-scale texts on model information extraction.
[0043] Step S1 includes the following sub-steps:
[0044] S11. Use translation tools to translate large-scale operation and maintenance texts of typical equipment of power generator sets into English, and then translate English into Chinese, so as to express the original operation and maintenance texts into new sentences, and expand positive samples based on the original operation and maintenance texts.
[0045] The Google translation tool was used to translate the large-scale operation and maintenance text of typical power generation equipment into Chinese and English twice, and the result of the second translation was used as a new positive sample.
[0046] S12. Based on large-scale operation and maintenance texts, two nouns in a single sentence are randomly replaced with synonyms to expand the text in form.
[0047] Considering that the workload and cost of manual replacement are too high, an open source text synonym replacement tool can be used to expand the positive samples.
[0048] S13. Adopt the idea of random masking to randomly mask one-fifth of the words in the operation and maintenance text, and crop the content to generate new positive samples.
[0049] S14. Design a negative sample generation strategy related to entities in large-scale operation and maintenance texts of typical equipment of generator sets, and generate negative samples based on the safety report of typical equipment of generator sets.
[0050] Large-scale power operation and maintenance texts are mainly composed of equipment failure maintenance records and maintenance procedures. Negative samples should focus on the entities involved in the positive samples to expand the text, mainly including typical equipment safety reports of generator sets that are opposite to the positive samples, to generate negative samples and expand the data.
[0051] S2. Based on the positive and negative samples of operation and maintenance text generated by S1, an encoder is used to extract text feature vectors from the sample data.
[0052] The encoder part selects the encoder of the neural network, the purpose of which is to extract text feature vectors from the positive samples and negative samples generated by S1. The present invention adopts the Bert encoder in PRGC to implement this function.
[0053] S21. Use the Bert encoder of PRGC to process the text, and use Bert to convert the input text into a word vector consisting of three parts: Token embedding, Segment embedding and Position embedding.
[0054] S22, Segment embedding part recognizes different symbols and distinguishes sentences in the text.
[0055] Since the model input is intermittent, with multiple sentences of text being input into the model together, the [CLS] identifier can be used to classify whether the two input sentences have a contextual relationship, and the [SEP] identifier can be used to separate the two sentences.
[0056] S23. Initialize a Position embedding module and train it to identify the position of entities in the text.
[0057] Since the input word vector sequence does not include position information, the position of the Chinese text entity is also an important influencing factor of the text; therefore, this module can be used to incorporate the position factor into the extracted text feature vector.
[0058] S24. Use the three modules of Bert to extract word feature vectors in the equipment operation and maintenance samples for subsequent extraction of triples and optimization of the entity relationship extraction model.
[0059] The core part of the Bert encoder is a stack of n identical Transformer modules. The operation on the input vector x after processing by S21-S23 can be expressed as: h o =SW s +W p h a =Trans(h a-1 ),α∈[1,N]
[0060] The Transformer module is represented as Trans(x), S is the one-hot vector matrix, and W s is the Tokenembedding matrix, W p is the Position embedding matrix, h a is the hidden state vector.
[0061] S3. Combine the feature vector extracted in step S2 with PRGC (Potential Relation and Global Correspondence Based Joint Relational Triple Extraction) and contrastive learning to map the features of the operation and maintenance text to the contrastive loss space and build a knowledge extraction model for the operation and maintenance of typical equipment of generator sets.
[0062] Entity relationship extraction of text data can be achieved based on the PRGC framework, but there is a problem of low accuracy; therefore, the contrastive learning framework is integrated, and the output of the Bert encoder is used as two branch tasks to optimize the Bert encoder and PRGC model respectively, and to construct a CL-PRGC generator set typical equipment operation and maintenance knowledge extraction model.
[0063] Step S3 includes the following sub-steps:
[0064] S31, according to the text feature vector extracted by S2, the output of the Bert encoder is transmitted to the PRGC model and the contrast loss space;
[0065] S32, where the feature vector output by Bert is used to calculate the h[cls] contrast loss value, and the Bert encoder is embedded into the PRGC model to provide a theoretical basis for the entity-relationship joint extraction of the subsequent model;
[0066] S33, the feature vector output by Bert, on the other hand, uses the contrast loss function value as a standard to adjust the hyperparameters of the Bert encoder to affect the extraction of triples;
[0067] S34. Based on the PRGC model of step S32, the model is optimized in combination with the contrastive learning part of step S33 to establish a CL-PRGC (Contrastive Learning-PRGC) model to complete the construction of the knowledge extraction model for the operation and maintenance of typical equipment of the generator set.
[0068] Furthermore, step S34 includes the following sub-steps:
[0069] S341. Input the text feature vector obtained in S2 into the potential relationship prediction part of PRGC, extract all possible relationships and perform weight analysis, and select the relationships greater than the threshold as candidate relationships.
[0070] This component predicts all possible relation subsets. The input of this component is the feature vector h of the sentence, and the output is P rel A one-dimensional vector of .
[0071] Given an embedding vector h∈R of a sentence with n tokens n×d , This part mainly includes average pooling operation, fully connected layer and activation function. Each character of this component can be expressed as: P rel =σ(W r h avg +b r )
[0072] Among them, Avgpool refers to the average pooling operation, W r and b r are all trainable weight parameters, and σ represents the sigmoid activation function.
[0073] When the relationship R i The activation function output is greater than the threshold λ1, indicating that there is a candidate relationship R i , otherwise vice versa. Therefore, we only need to apply sequence labeling to predict relations instead of all relations.
[0074] S342. At the same time, the text feature vector is input into the subject-object alignment matrix in the framework, and probability prediction is performed on different candidate relationships to determine the entire entity and complete the matching of the first word of the head and tail entities.
[0075] While predicting potential relations, a global correspondence matrix is constructed to determine the subject and object, ensuring that specific subjects and objects are valid in triples.
[0076] The correspondence between the subject and the object is calculated by constructing a two-dimensional matrix. Each element P in the matrix i,j Indicates the confidence that the entity at the i-th starting coordinate and the entity at the j-th starting coordinate are the subject and object relationship.
[0077] For each candidate relation R i Construct a matrix M, which stores the sigmoid calculation probability that the first word of the head entity is the i-th token and the last word is the j-th token. If the probability is greater than the threshold λ2, it means that the model believes that (tokeni xxx ,R i ,tokenj xxx ) is a correct triple. That is, first enumerate all possible subject-object pairs in the matrix, then check the corresponding scores of each pair in the global matrix, and retain the object pair if the value exceeds a certain threshold λ2. The value calculation formula of each element in the matrix is as follows:
[0078] in, is the encoded representation of the i-th and j-th tokens in the input sentence, forming a potential subject and object pair, W g is a trainable weight parameter, and σ represents the sigmoid activation function.
[0079] S343, the text feature vector extracted by S2 and the candidate relationship generated by S341 are input into the entity extraction part of the framework, which uses two sequence label components of specific relationships to extract the subject and object respectively to deal with the subject-object overlap problem.
[0080] This part realizes entity extraction from text data through two three-classification tasks, and uses two sequence label components with specific relationships to extract the subject and object respectively to deal with the problem of subject and object overlap.
[0081] The input of this component includes the feature vector h of the sentence and the potential relation P rel , for each candidate relation R i, perform two three-class classifications (softmax) to distinguish BIOs. The first one determines the BIO label of the head entity, and the second one determines the BIO label of the tail entity. When predicting the entities of the corresponding relationship, the relationship vector is taken out through the characteristics of the relationship (a trainable matrix U), and the relationship vector is added to the corresponding token vector. After passing through the fully connected layer and softmax, the classification probability is obtained. The detailed operations of this component on each part are as follows:
[0082] in, is a trainable matrix The jth relation representation in n r is the size of the complete set of relations, is the encoded representation of the ith token, W sub , W obj are trainable weights, where the size of the label set {B,I,O} is 3.
[0083] S344. List all predicted entity pairs, use the global correspondence matrix and optimize the combined objective function, share the PRGC encoder parameters, and build a CL-PRGC model for entity-relationship joint extraction.
[0084] List all predicted entity pairs, use the global correspondence matrix and optimize the combined objective function, share the PRGC encoder parameters, calculate the cross entropy loss, and construct the loss function by weighted summation. The total loss can be divided into three parts as follows:
[0085] in, is the size of the potential relation subset of the sentence, and the total loss is the sum of these three parts, calculated as follows:
[0086] S4, based on the typical equipment operation and maintenance knowledge extraction model of the generator set constructed in S3, set the corresponding loss function, use positive samples to train the typical equipment operation and maintenance knowledge extraction model of the generator set, so that it can learn the feature vectors contained in the positive samples and separate the negative sample data into the latent space.
[0087] By setting the contrast loss function and the triple extraction loss function, combining remote supervised learning and unsupervised learning to train the model, and integrating contrastive learning into the PRGC model, the reliability of information extracted by the PRGC model is effectively guaranteed while improving the difference between positive and negative samples.
[0088] Step S4 includes the following sub-steps:
[0089] S41. Construct a contrast loss function and apply it to train the parameters of the Bert encoder to further expand the difference between positive samples and negative samples.
[0090] The Bert model is trained unsupervisedly by using the normalized temperature scale cross entropy loss function, making it easier for the model to extract entities and relationships in positive sample data, and more difficult for the model to extract data in negative sample data, thereby improving the accuracy of information extraction. The calculation formula of the normalized temperature scale cross entropy loss function is as follows:
[0091] Among them, I [k≠i] ∈{0, 1} is an indicator function that is calculated as 1 if k≠i, zj and z i is the projection standard and τ represents the temperature parameter.
[0092] S42. Construct a triple extraction loss function, train the parameters of the Bert encoder and PRGC model, and further improve the ability to extract typical equipment operation and maintenance knowledge of generator sets.
[0093] The PRGC model is trained by a triple extraction loss function to optimize the model's ability to extract entities and relationships on operation and maintenance positive samples. The loss function calculation formula is as follows:
[0094] S5. Use the model trained in S4 to perform entity-relationship joint extraction on the operation and maintenance knowledge of typical equipment of the generator set to obtain the entity pairs and corresponding relationships contained in the operation and maintenance knowledge. This design method aims to solve the problems that the scale of operation and maintenance knowledge of typical equipment of power generators is large and the reliability of entity and relationship extraction is difficult to ensure. By combining contrastive learning with the entity-relationship joint extraction model, it provides an effective method to improve the reliability of entity-relationship extraction based on positive and negative samples of operation and maintenance text.
[0095] It should be understood that the exemplary embodiments described herein are illustrative rather than restrictive. Although one or more embodiments of the present invention have been described in conjunction with the accompanying drawings, it should be understood by those skilled in the art that various changes in form and detail may be made without departing from the spirit and scope of the present invention as defined by the appended claims.
Claims
1. A method for intelligently extracting operation and maintenance knowledge of typical equipment of generator sets based on a comparative example learning framework, characterized in that: The following steps are involved: S1. Based on the large-scale operation and maintenance texts of typical equipment of power generation units, the data enhancement strategy is used to process the operation and maintenance texts, and the generation strategy of positive and negative samples of the operation and maintenance texts is designed to improve the accuracy and speed of information extraction of the entity relationship extraction model; S2, based on the positive and negative samples of the operation and maintenance text generated in S1, an encoder is used to extract text feature vectors from the sample data; S3, combining the feature vector extracted in step S2, PRGC (Potential Relation and GlobalCorrespondence Based Joint Relational Triple Extraction) and contrastive learning, mapping the features of the operation and maintenance text to the contrastive loss space, and constructing a knowledge extraction model for the operation and maintenance of typical equipment of the generator set; S4, based on the typical equipment operation and maintenance knowledge extraction model of the generator set constructed in S3, set the corresponding loss function, use positive samples to train the typical equipment operation and maintenance knowledge extraction model of the generator set, so that it can learn the feature vectors contained in the positive samples and separate the negative sample data into the latent space; S5. Use the model trained in S4 to perform entity-relationship joint extraction on the operation and maintenance knowledge of typical equipment of the generator set to obtain the entity pairs and corresponding relationships contained in the operation and maintenance knowledge.
2. According to claim 1, a method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework is characterized in that: Step S1 includes the following sub-steps: S11. Use translation tools to translate large-scale operation and maintenance texts of typical equipment of power generators into English, and then translate English into Chinese, so as to express the original operation and maintenance texts into new sentences, and expand positive samples based on the original operation and maintenance texts; S12. Based on large-scale operation and maintenance texts, two nouns in a single sentence are randomly replaced with synonyms to expand the text in form; S13, using the idea of random masking, randomly mask one-fifth of the words in the operation and maintenance text, and crop the content to generate new positive samples; S14. Design a negative sample generation strategy related to entities in large-scale operation and maintenance texts of typical equipment of generator sets, and generate negative samples based on the safety report of typical equipment of generator sets.
3. According to claim 1, a method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework is characterized in that: Step S2 includes the following sub-steps: S21. Use the PRGC Bert encoder to process the text. Use Bert to convert the input text into a word vector consisting of Token embedding, Segment embedding and Position embedding. S22, Segment embedding part recognizes different signs and distinguishes sentences in the text; S23, initialize a Position embedding module, and train it to identify the position of the entity in the text; S24. Using the three modules of Bert, extract the word feature vectors in the equipment operation and maintenance samples for subsequent extraction of triples and optimization of the entity relationship extraction model.
4. According to claim 1, a method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework is characterized in that: Step S3 includes the following sub-steps: S31, according to the text feature vector extracted by S2, the output of the Bert encoder is transmitted to the PRGC model and the contrast loss space; S32, where the feature vector output by Bert is used to calculate the h[cls] contrast loss value, and the Bert encoder is embedded into the PRGC model to provide a theoretical basis for the entity-relationship joint extraction of the subsequent model; S33, the feature vector output by Bert, on the other hand, uses the contrast loss function value as a standard to adjust the hyperparameters of the Bert encoder to affect the extraction of triples; S34. Based on the PRGC model of step S32, the model is optimized in combination with the contrastive learning part of step S33 to establish a CL-PRGC (Contrastive Learning-PRGC) model to complete the construction of the knowledge extraction model for the operation and maintenance of typical equipment of the generator set.
5. The method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework according to claim 4 is characterized in that: Step S34 includes the following sub-steps: S341, input the text feature vector obtained in S2 into the potential relationship prediction part of PRGC, extract all possible existing relationships and perform weight analysis, and select the relationship greater than the threshold as the candidate relationship; S342, at the same time, the text feature vector is input into the subject-object alignment matrix in the framework, probability prediction is performed on different candidate relationships, the entire entity is determined, and the matching of the first word of the head and tail entities is completed; S343, inputting the text feature vector extracted by S2 and the candidate relationship generated by S321 into the entity extraction part of the framework, which uses the sequence label components of two specific relationships to extract the subject and the object respectively to deal with the subject-object overlap problem; S3444. List all predicted entity pairs, use the global correspondence matrix and optimize the combined objective function, share the PRGC encoder parameters, and build a CL-PRGC model for entity-relationship joint extraction.
6. The method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework according to claim 5 is characterized in that: In sub-step S34, the Bert model hyperparameters are trained by fusion contrast learning and embedded into the entity-relationship joint extraction model. The feature vector output by the encoder is used as two subtasks. One task is to calculate the h[cls] contrast loss value and embed the encoder into the PRGC model. The other task is to adjust the hyperparameters of the encoder based on the contrast loss function value, thereby affecting the extraction of triples.
7. The method for intelligently extracting operation and maintenance knowledge of typical equipment of a generator set based on a comparative example learning framework according to claim 1 is characterized in that: Step S4 includes the following sub-steps: S41, construct a contrast loss function and apply it to train the parameters of the Bert encoder to further expand the difference between positive samples and negative samples; S42. Construct a triple extraction loss function, train the parameters of the Bert encoder and PRGC model, and further improve the ability to extract typical equipment operation and maintenance knowledge of generator sets.
Citation Information
Patent Citations
Knowledge graph completion method and device based on semantic alignment and symmetric structure coding
CN114117075A
Small sample knowledge reinforcement learning method based on comparative learning and joint loss function
CN117436543A
Cited By
Keyword extraction method and device for vertical field text, equipment and medium
CN118966207A
