Elevator fault knowledge graph construction method based on large model prompt instruction
By combining large models and prompt engineering technology, prompt instructions suitable for the field of elevator failures are designed, and the problems of low efficiency and poor results in the existing fault knowledge graph construction methods are solved, and the accurate and efficient construction of the elevator fault knowledge graph is achieved.
Patent Information
- Application Number
- CN202510424862.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing fault knowledge graph construction methods have problems such as data dispersion, complex association of fault information and a large amount of professional knowledge, resulting in low construction efficiency and poor results.
Using a method of combining large-scale models and prompt engineering technology, elevator fault body prompt instructions, fault knowledge extraction prompt instructions and fault knowledge verification prompt instructions are designed to generate elevator fault knowledge graphs through large-scale models.
It realizes the accurate and efficient construction of the elevator fault knowledge graph, improves the intelligence level of fault analysis, and solves the problems of poor long text dependence and low construction efficiency.
Smart Images

Figure CN119917702A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of large models, prompt engineering, and fault knowledge graph construction, and in particular to a method for constructing an elevator fault knowledge graph based on large model prompt instructions. Background Art
[0002] With the development of computer technology, knowledge graph construction has gradually emerged in various fields and has been applied to the field of artificial intelligence. In the field of equipment failure, fault handling faces challenges such as information fragmentation, complexity, and diversity. Therefore, many corresponding fault knowledge graphs are constructed to analyze and explain the causes of faults, which improves the level of intelligence of fault analysis. Fault knowledge graphs have become an important tool for fault handling. At present, there are still many problems in the construction of fault knowledge graphs, such as data dispersion, complex fault information association, and the need for a lot of professional knowledge. How to accurately and efficiently complete the construction of fault knowledge graphs has become an important direction of current research.
[0003] Traditional knowledge graph construction methods mainly include rule-based and dictionary-based methods, traditional machine learning-based methods, and deep learning-based methods. Rule-based and dictionary-based entity recognition methods mainly use syntax, grammar, vocabulary, and some professional knowledge in specific fields to formulate corresponding recognition rules, and perform entity recognition by building a dictionary composed of domain feature words for matching. Collins (VLC-EMNLP, 1999) and others use the natural redundancy in the data to reduce a large number of rules to a small number of "seed rules" for entity recognition. Ruan Guangce (Journal of the China Society for Information Science, 2017) and others start from the perspective of word co-occurrence in the literature, design association rules by analyzing the association and dependency between knowledge, and combine the rules to perform text subject word co-occurrence analysis for entity recognition. Methods based on traditional machine learning treat entity recognition as a sequence labeling task, such as hidden Markov models and conditional random fields. Hidden Markov models can directly model the state transition probability and output probability of sequence labels at the time of transition to obtain the final sequence prediction probability of sequence labeling. Conditional random fields can calculate the joint probability distribution of the observation sequence to be labeled to achieve entity recognition. Bikel (Machine Learning, 1999) et al. proposed a hidden Markov model for identifying names, dates, times and numbers. The model mainly uses HMM to calculate the probability of a word being a certain entity type for entity recognition. Krishnan (COLING-ACL, 2006) et al. proposed an entity recognition method based on two layers of CRF, using local features for prediction in the first layer, and then combining local information with features extracted from the output of the first CRF layer in the second layer to improve the entity recognition effect of long-distance structured text. The method based on deep learning is to vectorize the text sequence through word embedding technology, then input the vector sequence of the sentence into the encoder, use the neural network to automatically extract features, and then use the decoder to predict the corresponding label of each in the sequence. Collobert (Journal of machine learning research, 2011) et al. proposed two methods, one based on window and one based on sentence, to perform entity recognition tasks. The former uses the context window of the current predicted word as the model input to obtain local features, and the latter uses the entire sentence as the model input, uses a layer of CNN structure, and constructs a global feature vector through convolution operations. Chiu (TACL, 2016) et al. proposed an LSTM-CNN model, which concatenates character-level features through CNN and word-level features and then performs entity recognition through a bidirectional long short-term memory network, so that character-level features such as prefixes and suffixes can be better utilized.
[0004] The big model is an important technology in the field of natural language processing. Thanks to the rich language representation learned during the pre-training process, the big model has powerful language understanding and generation capabilities, as well as strong general capabilities. Prompt engineering is a method that guides the big model to generate output that meets the requirements by designing and optimizing input prompts. With the help of elevator fault text and by designing prompt templates, the big model can be adapted to the fault knowledge graph construction task, thereby realizing the efficient construction of the elevator fault knowledge graph.
[0005] Some of the existing traditional fault knowledge graph construction methods rely on manually formulated rules, resulting in a lack of scalability, while others require a large amount of labeled data and complex feature engineering, resulting in poor results when processing long texts and non-local dependency problems. To this end, the present invention combines the Large Language Model (LLM) with the Prompt Engineering technology, and proposes a method for constructing an elevator fault knowledge graph based on large model prompt instructions. Summary of the invention
[0006] In view of the problems of poor long text dependence and low construction efficiency in existing fault knowledge graph construction methods, the present invention proposes an elevator fault knowledge graph construction method based on large model prompt instructions. The method includes three main stages and combines the large model with prompt engineering technology to provide an accurate and efficient construction solution for fault knowledge graph construction.
[0007] The technical solution of the present invention is as follows: A method for constructing an elevator fault knowledge graph based on a large model prompt instruction comprises the following steps: Step 1) Design the elevator fault ontology prompt instruction and use the large model to generate the elevator fault ontology and its association relationship; Step 2) Collect elevator fault texts related to elevator structure and fault knowledge, design elevator fault knowledge extraction prompt instructions, and combine the elevator fault ontology to use the big model to automatically extract fault entities and associations from the elevator fault texts, and output the fault knowledge graph triples; Step 3) Design fault knowledge verification prompt instructions, use the large model to detect errors in the fault knowledge graph triples, correct the wrong triples, and finally generate the fault knowledge graph.
[0008] Furthermore, the process of step 1) is as follows: The elevator fault ontology (elevator fault knowledge graph ontology) is a model that describes entities and their relationships in the field of elevator faults in a structured form. The entity types include elevator component names, component functions, fault modes, fault causes, results, solutions, evaluation indicators, evaluation levels, and evaluation meanings. The relationship types include component relationships, component functions, component failures, fault triggering conditions, fault impacts, fault repair measures, evaluation basis, fault levels, and level meanings. Each node represents a type of entity, and the edges between nodes represent the relationships between entities. 1.1) Design and construct the elevator fault ontology prompt instructions to guide the large model to complete the construction of the elevator fault ontology. The prompt instruction text includes pre-information, task description and extraction format; 1.2) Designing pre-information: enabling the large model to understand the task context and obtain auxiliary knowledge, including entity sets and relationship sets; 1.3) Design task description: Make the big model understand the design goals and requirements of the elevator fault entity, including the entities and composition relationships of the elevator component names, component functions, failure modes, failure causes, consequences, solutions, evaluation indicators, evaluation levels, and evaluation meanings, component functions, component failures, failure triggering conditions, failure impacts, failure repair measures, evaluation basis, failure levels, and level meanings; 1.4) Design extraction format: Make the elevator fault ontology designed by the large model presented in triple format; 1.5) Generate the elevator fault ontology through the big model, which will serve as the elevator fault ontology definition part of the elevator fault knowledge extraction prompt instruction in step 2), and guide the big model to realize the subsequent extraction of entities and relationships of the elevator fault ontology according to the requirements of the elevator fault ontology.
[0009] Furthermore, the process of step 2) is as follows: Through step 1), the elevator fault ontology is obtained, the elevator fault knowledge extraction prompt instruction is designed, the knowledge extraction task goal is set, the defined elevator fault ontology entity and relationship rules are introduced, the output format is standardized, examples are provided, and the large model is prompted to automatically extract the entities and relationships in the elevator fault text to obtain the fault triple output; 2.1) Preprocess the current elevator dataset to remove irrelevant content and invalid data, and retain elevator fault text related to elevator structure and fault knowledge; 2.2) Design fault knowledge extraction prompt instructions to complete the extraction of elevator fault entities and relationships through the large model; the fault knowledge extraction prompt instructions include task description, elevator fault ontology definition, extraction format and data examples; 2.3) Design the task description of the fault knowledge extraction prompt instruction to guide the large model to extract corresponding entities and relationships from the input text according to the defined elevator fault knowledge graph ontology; 2.4) The elevator fault knowledge graph ontology generated by the large model in step 1) is used as the elevator fault ontology definition in the fault knowledge extraction prompt instruction; 2.5) Design the extraction format, present the entities and relations extracted from the elevator fault text in triple format; 2.6) Provide data sample part so that the big model can extract entity relationships according to the output format; 2.7) Integrate the task description, elevator fault ontology definition, extraction format and data examples to finally form a complete elevator fault knowledge extraction prompt instruction; the elevator fault knowledge extraction prompt instruction will serve as a prompt for the next step of elevator fault text knowledge extraction to ensure that the information extracted from the text by the large model is consistent with the structural requirements of the elevator fault ontology; 2.8) Combine the elevator fault knowledge extraction prompt instruction completed in the previous step with the preprocessed elevator fault text and provide it as input to the large model; 2.9) The large model extracts entities and relationships from the elevator fault text according to the task description of the elevator fault knowledge extraction prompt instructions, the elevator fault ontology definition, the extraction format and the prompt information of the data example, and outputs them in triple format according to the extraction format requirements, and the output results are used for elevator fault knowledge verification.
[0010] Furthermore, the step 3) includes the following specific steps: 3.1) Design error detection rules: Combine the elevator fault ontology and elevator domain knowledge to establish error detection rules. The error detection rules include entity error detection, relationship error detection and format error detection; 3.2) Construct an error detection prompt template: Based on the designed error detection rules, construct a fault knowledge verification prompt instruction for the large model. The prompt instruction includes: task description, error detection rules, and detection examples. The goal of the task description is to check the error type in the triple. The error detection rule is the rule designed in 3.1). The detection example provides several input triples and corresponding error analysis examples. 3.3) Error detection execution: The triples generated in step 2) are combined with the error detection prompt template and provided as input to the large model. The large model analyzes whether each triple has an error based on the prompt template and marks the error type. 3.4) According to the different error types output by the large model and combined with the elevator fault ontology definition information, the erroneous triples are corrected to obtain the corrected new triples; 3.5) Obtain all corrected new triples, thus completing the construction of the elevator fault knowledge graph.
[0011] The beneficial effects of the present invention are as follows: In view of the problems of poor long text dependency and low construction efficiency in the existing elevator fault knowledge graph construction, the present invention proposes a method for constructing an elevator fault knowledge graph based on a large model prompt instruction, which fully combines the large model and prompt instruction technology to improve the large model's ability to extract elevator fault entity relationships, and realize accurate and efficient construction of the elevator fault knowledge graph by the large model. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a framework for building a knowledge graph of elevator faults based on large model prompt instructions; Figure 2 This is an example of building a knowledge graph for an elevator door opening and closing system based on large model prompt instructions. DETAILED DESCRIPTION
[0013] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0014] like Figure 1 As shown, a method for constructing an elevator fault knowledge graph based on a large model prompt instruction comprises the following steps: (1) Elevator fault ontology construction:
[0015] Design the elevator fault ontology prompt instruction to enable the large model to generate various elevator fault ontologies and their associated relationships. The elevator fault ontology is a model that describes the entities and their relationships in the elevator fault field in a structured form, including entities such as elevator components, fault types, and solutions, and their relationships. Each node represents a type of entity, and the edges between nodes represent the relationship between entities. The construction of the elevator fault ontology provides a clear structured framework for the subsequent extraction of fault entities and relationships.
[0016] 1.1) Design and construct the ontology prompt instructions to guide the large model to complete the construction of the elevator fault ontology, and design the prompt text into three parts: "pre-information", "task description" and "extraction format"; Build the ontology prompt command: #Pre-Information# Your goal is to build a complete knowledge graph of elevator faults, which covers elevator component information, various fault phenomena encountered in actual operation, their causes, solutions to various fault phenomena, and an operating status evaluation system based on evaluation indicators. This knowledge graph aims to provide knowledge base support for elevator operation and maintenance, fault diagnosis, and fault prediction.
[0017] #Task Description# Design an ontology structure for the elevator fault knowledge graph. The entities in the ontology involve specific component names, component functions, fault modes, causes, solutions, evaluation indicators and other information. The relationships in the ontology mainly involve the composition information between entities, component functions, component failures, fault solutions, indicator evaluation levels, and the meaning of evaluation levels. There are more entities and relationships than the above, and they still need to be supplemented to improve the graph ontology structure.
[0018] #Extraction format# Based on the above ontology design requirements, the given elevator fault knowledge graph ontology design is listed, and the elevator fault knowledge graph ontology design of entities and relationships is given in tabular form.
[0019] 1.2) Implement “pre-information” text design to help the big model understand the task background and obtain auxiliary knowledge, such as entity sets and relationship sets, to enable the big model to carry out tasks more efficiently.
[0020] 1.3) Complete the design of the "task description" part, and use clear descriptions to help the big model understand the design goals and requirements of the elevator fault entity, including entities and relationships such as elevator component names and fault modes.
[0021] 1.4) Design the description of the “extraction format” part so that the knowledge graph ontology of the elevator failure domain designed by the large model can be presented in a specific format.
[0022] 1.5) The elevator fault knowledge graph ontology is generated through the big model, which will serve as an important part of the second-stage fault knowledge extraction prompt instructions, guiding the big model to extract subsequent elevator fault text entities and relationships according to the ontology requirements.
[0023] (2) Elevator fault knowledge extraction:
[0024] Through step (1), the elevator fault ontology is obtained, the fault knowledge extraction prompt instruction is designed, the knowledge extraction task objectives are clarified, the entity and relationship rules defined in the elevator fault ontology are introduced, the output format is standardized, and examples are provided. The large model is prompted to automatically extract the entities and relationships in the elevator fault text and obtain the fault triple output.
[0025] 2.1) Preprocess the current elevator dataset to remove irrelevant content and low-quality data, such as irrelevant tables and non-technical descriptions, and retain elevator fault texts that are highly relevant to elevator structure and fault knowledge.
[0026] 2.2) Design fault knowledge extraction prompt instructions, and complete the extraction of elevator fault entities and relationships through the big model. The fault knowledge extraction prompt instructions are divided into task description, elevator fault ontology definition, extraction format and data examples; Fault knowledge extraction prompt command: #Task Description# Your goal is to extract entities and relationships that conform to the fault knowledge graph ontology definition from the elevator fault text, including entities and relationships such as common elevator components, fault modes, and fault impacts, and output them in the specified format.
[0027] #Elevator fault ontology definition# Graph entity: component name, component function, failure mode, failure cause, result, solution, evaluation index, evaluation level, and evaluation meaning. Graph relationship: composition relationship, function, component failure, failure cause, failure impact, failure solution, evaluation basis, evaluation level, and level meaning.
[0028] #Extraction format#The extracted entities and relations are output in triple format in the following form: (entity, relation, entity).
[0029] #Data Example# Input: Door lock devices include lever door lock devices for manual door opening and closing mechanisms and automatic door lock devices for automatic door opening and closing mechanisms. Output: (Door lock device, including lever door lock device), (Door lock device, including automatic door lock device).
[0030] 2.3) Design the task description of fault knowledge extraction prompt instructions to guide the large model to extract corresponding entities and relationships from the input text according to the defined graph ontology.
[0031] 2.4) The elevator fault knowledge graph ontology generated by the large model in the first stage is used as the fault knowledge graph ontology definition in the fault knowledge extraction prompt instruction.
[0032] 2.5) Design the extraction format to present the entities and relations extracted from the elevator fault text in a specific format, which is designed as a triple format.
[0033] 2.6) Provide data examples to enable the large model to extract entity relationships according to the output format, which is used to improve the accuracy of fault information extraction by the large model.
[0034] 2.7) Through the above steps, the task description, elevator fault ontology definition, extraction format and data examples are integrated to finally form a complete fault knowledge extraction prompt instruction. The instruction will serve as an important prompt for the next step of elevator fault text knowledge extraction to ensure that the information extracted from the text by the large model is consistent with the structural requirements of the elevator fault ontology.
[0035] 2.8) Combine the fault knowledge extraction prompt instruction completed in the previous step with the preprocessed elevator fault text and provide it as input to the large model.
[0036] 2.9) The large model extracts entities and relationships from the elevator fault text according to the task description of the fault knowledge extraction prompt instructions and the fault ontology definition and other prompt information, outputs them in triple format according to the extraction format requirements, and passes the output results to the third stage for elevator fault knowledge verification.
[0037] (3) Elevator fault knowledge verification: After the elevator fault text knowledge extraction is realized in the second stage, the fault knowledge verification prompt instruction is designed to enable the large model to detect errors in the fault knowledge graph triples, correct the wrong triples, and finally generate the fault knowledge graph. The specific steps are as follows: 3.1) Design error detection rules. Combine the elevator fault ontology and elevator domain knowledge to establish error detection rules. Error types mainly include three categories: entity errors, relationship errors and format errors.
[0038] 3.2) Construct an error detection prompt template. Based on the designed error detection rule set, construct a fault indication verification prompt instruction for the large model. The prompt instruction consists of three parts: task description, error detection rule definition, and detection example. The task description clearly states that the task goal is to check the error type in the triple. The error detection rule is the rule designed in 3.1, which enables the large model to understand the error detection standard. The detection example provides several input triples and corresponding error analysis examples to improve the accuracy of large model detection. The error detection prompt template is as follows: Fault knowledge verification prompt command: #Task Description# Your task is to perform error detection on the input triple data set. According to the provided error detection rules, analyze each triple one by one to determine whether it has the following three types of errors: Entity error: whether the entity type in the triple conforms to the definition of the elevator ontology. Relationship error: whether the relationship in the triple conforms to the legal relationship set between entities defined in the elevator ontology. Format error: whether the triple conforms to the standard structure of "entity-relationship-entity", such as missing fields or wrong field order. Please mark the detected error type and output the detection result.
[0039] #Error detection rules#Entity error detection: Check whether the entity type in the triple conforms to the entity type defined in the elevator fault ontology. Relationship error detection: Verify whether the relationship conforms to the legal entity relationship set in the elevator fault ontology, whether there are illegal relationship types or relationships that do not match the entity. Format error detection: Check the structural integrity of the triple, whether it contains three fields (entity, relationship, entity). Verify whether the field order is correct.
[0040] #Detection Example# The following are examples of input data and expected output: Input: (wire rope, connection, collision wheel); Output: No errors found. Input: (door lock, attribute, safety protection device); Output: Relationship error, exceeds the relationship set in the ontology definition. Input: (, fault, top punch); Output: Format error, head entity does not exist.
[0041] 3.3) Error detection execution. The triples generated in step (2) are combined with the error detection prompt template and provided as input to the large model. The large model analyzes whether each triple has an error based on the prompt template and marks the error type.
[0042] 3.4) According to the different error types output by the large model and combined with the elevator fault ontology definition information, the erroneous triples are corrected to obtain the corrected new triples.
[0043] 3.5) After the above steps, all correct fault triplets are obtained, thus completing the construction of the elevator fault knowledge graph.
[0044] Taking the elevator door opening and closing system as an example, the fault knowledge graph is constructed by combining the big model and prompt instruction technology, and referring to Figure 2 The present invention is further described, and specifically comprises the following steps: (1) Phase 1: Elevator fault ontology construction The elevator fault ontology describes the key entities and their relationships in the field of elevator faults in a structured form. It is an abstract model for domain knowledge. The ontology construction prompt instruction designed in the first stage enables the GPT-4 large model to generate the elevator fault ontology definition, where the entity types include elevator component names, component functions, failure modes, failure causes, results, solutions, evaluation indicators, evaluation levels, and evaluation meanings. The relationship types include component relationships, component functions, component failures, failure triggering conditions, failure impacts, failure repair measures, evaluation basis, failure levels, and level meanings. By constructing the elevator fault ontology, a comprehensive and structured knowledge framework covering the field of elevator faults is formed, providing clear standards for subsequent knowledge extraction; Graph ontology construction prompt template: #Pre-Information# Your goal is to build a complete knowledge graph of elevator faults, which covers elevator component information, various fault phenomena encountered in actual operation, their causes, solutions to various fault phenomena, and an operating status evaluation system based on evaluation indicators. This knowledge graph aims to provide knowledge base support for elevator operation and maintenance, fault diagnosis, and fault prediction.
[0045] #Task Description# Design an ontology structure for the elevator fault knowledge graph. The entities in the ontology involve specific component names, component functions, fault modes, causes, solutions, evaluation indicators and other information. The relationships in the ontology mainly involve the composition information between entities, component functions, component failures, fault solutions, indicator evaluation levels, and the meaning of evaluation levels. There are more entities and relationships than the above, and they still need to be supplemented to improve the graph ontology structure.
[0046] #Extraction format#There are more entities and relationships than the above ones, and they still need to be supplemented to improve the graph ontology structure. According to the above ontology design requirements, the elevator fault knowledge graph ontology design is listed, and the elevator fault knowledge graph ontology design of entities and relationships is given in table form.
[0047] Output fault ontology: Graph entity: component name, component function, failure mode, failure cause, result, solution, evaluation index, evaluation level, and evaluation meaning. Graph relationship: composition relationship, function, component failure, failure cause, failure impact, failure solution, evaluation basis, evaluation level, and level meaning.
[0048] (2) Phase 2: Elevator Fault Knowledge Extraction Complete the design of the fault knowledge extraction prompt instruction, in which the elevator fault ontology definition generated in the first stage is used as part of the fault knowledge extraction prompt instruction. The fault knowledge extraction instruction and the elevator door opening and closing system fault text in the example are input into the GPT-4 large model. The GPT-4 large model extracts the entity types defined by the fault ontology such as car door, floor door, door opening and closing mechanism and door opening and closing system according to the fault knowledge extraction instruction. At the same time, the constituent relations are extracted according to the relationship type defined in the fault ontology. Finally, the extraction of entities and relations is completed, the extraction results are generated, and the elevator fault knowledge is verified in the next stage. The input and output examples are as follows. The input includes the designed fault knowledge extraction prompt instruction and the related fault text of the elevator door opening and closing system, and the output is the output of the large model; Knowledge extraction prompt template: #Task Description# Your goal is to extract entities and relationships that conform to the fault knowledge graph ontology definition from the elevator fault text, including entities and relationships such as common elevator components, fault modes, and fault impacts, and output them in the specified format.
[0049] #Elevator fault ontology definition# Graph entity: component name, component function, failure mode, failure cause, result, solution, evaluation index, evaluation level, and evaluation meaning. Graph relationship: composition relationship, function, component failure, failure cause, failure impact, failure solution, evaluation basis, evaluation level, and level meaning.
[0050] #Extraction format#The extracted entities and relations are output in triple format in the following form: (entity, relation, entity).
[0051] #Data example#Input: {fault knowledge extraction prompt command}#Elevator door opening and closing system fault text#The mechanical part of the elevator door opening and closing system consists of car door, floor door and door opening and closing mechanism, which is one of the important safety facilities of elevator equipment. Output: (car door, composition, door opening and closing system), (floor door, composition, door opening and closing system, mechanical part), (door opening and closing mechanism, composition, door opening and closing system), (door opening and closing system, including functions, elevator safety facilities).
[0052] (3) Stage 3: Elevator Fault Knowledge Verification Design a fault knowledge verification prompt instruction. The instruction is divided into three parts: task description, error detection rules, and detection examples. The error detection rules are entity error detection, relationship error detection, and format error detection. The prompt instruction and the triples extracted in stage two are input to the large model. The large model performs error detection on the triples according to the task description and error detection rules of the prompt instruction. In the following example, it is detected that there are format errors and relationship errors in the triples, and then the errors are corrected through the prompt information of these two types of errors. Finally, a set of all correct triples is obtained to realize the construction of the elevator fault knowledge graph. The example is as follows. The input is the fault knowledge verification prompt instruction designed for this stage and the triples extracted in stage two. The output is the verification result of the large model; Input: {fault knowledge verification prompt command} 1. (car door, composition, door opening and closing system); 2. (floor door, composition, door opening and closing system, mechanical part); 3. (door opening and closing mechanism, composition, door opening and closing system); 4. (door opening and closing system, including functions, elevator safety facilities). Output: 2. Format error, does not conform to the specified triple format. 4. Relation error, exceeds the relationship set in the ontology definition.
[0053] An example of a corrected triple is as follows: The correct set of triples: 1. (car door, composition, door opening and closing system); 2. (floor door, composition, door opening and closing system); 3. (door opening and closing mechanism, composition, door opening and closing system); 4. (door opening and closing system, function, elevator safety facilities).
[0054] The contents described in the embodiments of this specification are merely enumerations of implementation forms of the inventive concept and are for illustrative purposes only. The protection scope of the present invention should not be considered to be limited to the specific forms described in this embodiment, and the protection scope of the present invention also extends to equivalent technical means that can be thought of by ordinary technicians in this field based on the inventive concept.
Claims
1. A method for constructing an elevator fault knowledge graph based on a large model prompt instruction, characterized in that: The following steps are involved: Step 1) Design the elevator fault ontology prompt instruction and use the large model to generate the elevator fault ontology and its association relationship; Step 2) Collect elevator fault texts related to elevator structure and fault knowledge, design elevator fault knowledge extraction prompt instructions, and combine the elevator fault ontology to use the big model to automatically extract fault entities and associations from the elevator fault texts, and output the fault knowledge graph triples; Step 3) Design fault knowledge verification prompt instructions, use the large model to detect errors in the fault knowledge graph triples, correct the wrong triples, and finally generate the fault knowledge graph.
2. A method for constructing an elevator fault knowledge graph based on a large model prompt instruction according to claim 1, characterized in that The process of step 1) is as follows: The elevator fault ontology is a model that describes the entities and their relationships in the elevator fault field in a structured form. The entity types include elevator component names, component functions, fault modes, fault causes, results, solutions, evaluation indicators, evaluation levels, and evaluation meanings. The relationship types include component relationships, component functions, component failures, fault triggering conditions, fault impacts, fault repair measures, evaluation basis, fault levels, and level meanings. Each node represents a type of entity, and the edges between nodes represent the relationships between entities. 1.1) Design and construct the elevator fault ontology prompt instructions to guide the large model to complete the construction of the elevator fault ontology. The elevator fault ontology prompt instruction text includes pre-information, task description and extraction format; 1.2) Designing pre-information: enabling the large model to obtain auxiliary knowledge, including entity sets and relationship sets, based on the task context; 1.3) Design task description: Make the big model clear about the design purpose and functional requirements of the elevator fault entity, including the entities and composition relationships of the elevator component names, component functions, failure modes, failure causes, consequences, solutions, evaluation indicators, evaluation levels, and evaluation meanings, component functions, component failures, failure triggering conditions, failure impacts, failure repair measures, evaluation basis, failure levels, and level meanings; 1.4) Design extraction format: Make the elevator fault ontology designed by the large model presented in triple format; 1.5) Generate the elevator fault ontology through the big model, which will serve as the elevator fault ontology definition part of the elevator fault knowledge extraction prompt instruction in step 2), prompting the big model to realize the extraction of entities and relationships of the subsequent elevator fault ontology according to the requirements of the elevator fault ontology.
3. A method for constructing an elevator fault knowledge graph based on a large model prompt instruction according to claim 1, characterized in that The process of step 2) is as follows: Through step 1), the elevator fault ontology is obtained, the elevator fault knowledge extraction prompt instruction is designed, the knowledge extraction task goal is set, the defined elevator fault ontology is introduced, the output format is standardized, and examples are provided to prompt the large model to automatically extract entities and relationships in the elevator fault text and obtain the fault triple output; 2.1) Preprocess the current elevator dataset to remove irrelevant content and invalid data, and retain elevator fault text related to elevator structure and fault knowledge; 2.2) Design fault knowledge extraction prompt instructions and complete the extraction of elevator fault entities and relationships through the large model; The prompt instructions for fault knowledge extraction include task description, elevator fault ontology definition, extraction format and data examples; 2.3) Design the task description of the fault knowledge extraction prompt instruction to guide the large model to extract corresponding entities and relationships from the input text according to the defined elevator fault knowledge graph ontology; 2.4) The elevator fault knowledge graph ontology generated by the large model in step 1) is used as the elevator fault ontology definition in the fault knowledge extraction prompt instruction; 2.5) Design the extraction format, present the entities and relations extracted from the elevator fault text in triple format; 2.6) Provide data sample part so that the big model can extract entity relationships according to the output format; 2.7) Integrate the task description, elevator fault ontology definition, extraction format and data examples to finally form a complete elevator fault knowledge extraction prompt instruction; The elevator fault knowledge extraction prompt instruction will serve as a prompt for the next step of elevator fault text knowledge extraction to ensure that the information extracted from the text by the large model is consistent with the structural requirements of the elevator fault ontology; 2.8) Combine the elevator fault knowledge extraction prompt instruction completed in the previous step with the preprocessed elevator fault text and provide it as input to the large model; 2.9) The large model extracts entities and relationships from the elevator fault text according to the task description of the elevator fault knowledge extraction prompt instructions, the elevator fault ontology definition, the extraction format and the prompt information of the data example, and outputs them in triple format according to the extraction format requirements, and the output results are used for elevator fault knowledge verification.
4. The method for constructing an elevator fault knowledge graph based on a large model prompt instruction according to claim 1 is characterized in that The step 3) includes the following specific steps: 3.1) Design error detection rules: Combine the elevator fault ontology and elevator domain knowledge to establish error detection rules. The error detection rules include entity error detection, relationship error detection and format error detection; 3.2) Construct an error detection prompt template: Based on the designed error detection rules, construct a fault knowledge verification prompt instruction for the large model. The fault knowledge verification prompt instruction includes: task description, error detection rules, and detection examples. The goal of the task description is to check the error type in the triple. The error detection rule is the rule designed in 3.1). The detection example provides several input triples and corresponding error analysis examples. 3.3) Error detection execution: The triples generated in step 2) are combined with the error detection prompt template and provided as input to the large model. The large model analyzes whether each triple has an error based on the prompt template and marks the error type. 3.4) According to the different error types output by the large model and combined with the elevator fault ontology definition information, the erroneous triples are corrected to obtain the corrected new triples; 3.5) Obtain all corrected new triples, thus completing the construction of the elevator fault knowledge graph.
Citation Information
Patent Citations
Method and system for constructing knowledge graph by extracting triples from large model, and medium
CN117273132A
Legal knowledge graph construction method and device, equipment and storage medium
CN118036736A
Domain knowledge graph construction method and device based on large language model and medium
CN118939812A
High-quality motor train unit maintenance knowledge graph construction method and system based on large model
CN119005317A
Process industry safety knowledge graph error detection method and system based on large language model
CN119740644A
Cited By
Indoor space rule knowledge graph construction method and system, terminal equipment and medium
CN120258116A
Intelligent dialogue generation method oriented to elevator emergency rescue and based on InterHT model
CN121053992A
Knowledge graph quality detection method and device and storage medium
CN121257689A