Intelligent question and answer method and device in substation scene
By performing domain-adaptive pre-training and constructing a dynamically weighted quadruple knowledge graph on a substation professional corpus, the problem of inaccurate answers in the substation intelligent question-answering system was solved, enabling precise responses and accurate answers to complex operation and maintenance questions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-03-13
AI Technical Summary
Existing intelligent question-and-answer systems for substations are limited by their static knowledge graphs, making it difficult to provide accurate and in-depth answers, especially when faced with complex operation and maintenance issues.
By acquiring a substation-specific corpus, a domain-adaptive pre-trained BERT model is performed. Weakly supervised association reasoning is then conducted using a triplet knowledge graph from the equipment knowledge base. A dynamically weighted quadruple knowledge graph is constructed, and high-quality labeled text is generated using multi-instance learning and attention weight correction mechanisms. Finally, answers are generated by combining entity extraction and intent recognition.
It significantly improves the accuracy of answering complex diagnostic questions in substations, and achieves precise responses to complex operation and maintenance problems through dynamic weighted quadruple knowledge graph and real-time sensor data support.
Smart Images

Figure CN121660072A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent power technology, and in particular to an intelligent question-and-answer method and device for substation scenarios. Background Technology
[0002] As power systems transform towards intelligence and digitalization, leveraging massive amounts of operation and maintenance data to improve substation operation and management has become an inevitable trend in the industry. In this process, building intelligent question-and-answer systems capable of accurately and quickly responding to on-site needs has become a key technological means to assist operation and maintenance personnel in fault diagnosis and decision support, which is of great significance for ensuring the safe and stable operation of the power grid.
[0003] Currently, the mainstream technical approach to achieving intelligent question answering in substations is to combine natural language processing and knowledge graph technology. Specifically, a general pre-trained language model is typically used to process unstructured text such as operation and maintenance reports and operation logs, extracting entities and relations from them, and then constructing a traditional triple (head entity-relation-tail entity) knowledge graph.
[0004] During the question-and-answer phase, the system primarily relies on the static knowledge graph for query matching, or combines it with simple document retrieval techniques to generate answers. However, the operation and maintenance scenario of a substation is essentially a dynamic system, while the existing knowledge graph is static. This makes it difficult for the existing question-and-answer system to provide accurate and in-depth answers when faced with complex operation and maintenance problems. Summary of the Invention
[0005] In view of the above problems, the present invention provides an intelligent question-answering method and device in the substation scenario, the main purpose of which is to improve the accuracy of intelligent question-answering results in substations.
[0006] To solve the above-mentioned technical problems, the present invention proposes the following solution: In a first aspect, the present invention provides an intelligent question-answering method for a substation scenario, the method comprising: We obtained a specialized corpus of substations and combined it with specialized entity masking and similar entity replacement tasks to perform domain-adaptive pre-training on the general BERT model, thus obtaining a pre-trained domain BERT model. We use the triplet knowledge graph in the equipment knowledge base to perform weakly supervised association reasoning on unlabeled maintenance text, and generate target labeled text through multi-instance learning and attention weight correction mechanism; Using a pre-trained domain BERT model, combined with joint extraction and dependency algorithms, the target labeled text is processed to obtain the entity types and the relationship types between entities in the target labeled text; Based on the entity type and the relationship type between the entities, a dynamic weighted quadruple knowledge graph is constructed by combining the corresponding time window and historical failure cases. The dynamic weighted quadruple knowledge graph is a knowledge graph that includes the state of the entity under different time windows and the evolution path relationship with transition probability connecting the state nodes. After receiving the user's question to be answered, entity extraction and intent recognition are performed on the question to be answered; Based on the identified intent, the corresponding target processing mechanism is selected from multiple processing mechanisms. The selected target processing mechanism is then executed based on the extracted entity, the dynamically weighted quadruple knowledge graph, the preset spatiotemporal graph neural network model, the technical document library, and sensor data to generate the target answer and output it.
[0007] Secondly, the present invention provides an intelligent question-and-answer device for substation scenarios, the device comprising: The acquisition unit is used to acquire the substation professional corpus and combine it with the professional entity masking task and the similar entity replacement task to perform domain adaptive pre-training on the general BERT model to obtain the pre-trained domain BERT model. The text annotation unit is used to perform weakly supervised association reasoning on unannotated operation and maintenance text using the triple knowledge graph in the device knowledge base, and to generate target annotated text through multi-instance learning and attention weight correction mechanism; The entity extraction unit is used to process the target labeled text obtained by the text annotation unit using the pre-trained domain BERT model obtained by the acquisition unit, combined with the joint extraction algorithm and the dependency algorithm, to obtain the entity types and the relationship types between entities in the target labeled text. The graph construction unit is used to construct a dynamic weighted quadruple knowledge graph based on the entity type extracted by the entity extraction unit and the relationship type between the entities, combined with the corresponding time window and historical failure cases. The dynamic weighted quadruple knowledge graph is a knowledge graph that includes the state of entities under different time windows and the evolution path relationship with transition probability connecting the state nodes. The intent recognition unit is used to perform entity extraction and intent recognition on the question to be answered after receiving the question to be answered from the user. The answer generation unit is used to select the corresponding target processing mechanism from multiple processing mechanisms based on the identified intent, and execute the selected target processing mechanism based on the entities extracted by the intent recognition unit, the dynamically weighted quadruple knowledge graph constructed by the graph construction unit, the preset spatiotemporal graph neural network model, the technical document library and sensor data to generate the target answer and output it.
[0008] To achieve the above objectives, according to a third aspect of the present invention, a storage medium is provided, the storage medium including a stored program, wherein, when the program is executed, the device where the storage medium is located is controlled to execute the intelligent question-and-answer method in the substation scenario described in the first aspect.
[0009] To achieve the above objectives, according to a fourth aspect of the present invention, a processor is provided for running a program, wherein the program executes the intelligent question-and-answer method for a substation scenario as described in the first aspect.
[0010] By employing the above technical solutions, this invention provides an intelligent question-answering method and device for substation scenarios. First, by acquiring a substation-specific corpus and combining it with a professional entity masking task and a similar entity replacement task, the general BERT model is pre-trained using domain-adaptive methods. This effectively improves the model's semantic representation ability and boundary recognition accuracy for professional terms such as power equipment terminology and fault phenomena, significantly alleviating the problem of insufficient generalization performance of general language models on substation-specific texts. Second, by utilizing the existing triplet knowledge graph in the equipment knowledge base to perform weakly supervised association reasoning on massive amounts of unlabeled operation and maintenance text, and introducing a multi-instance learning and attention weight correction mechanism, high-quality target labeled text is automatically generated. This significantly reduces the cost of manual labeling while effectively suppressing model bias caused by noisy labels during remote supervision. Building upon this foundation, a joint extraction algorithm is employed, incorporating dependency parsing to simultaneously identify entity types and the types of relationships between entities. Because this method models entities and relationships uniformly within the same model, it avoids the cascading dependencies of traditional pipelined extraction, which involves "identifying entities first, then determining relationships." This fundamentally eliminates the problem of relationship extraction failure caused by entity identification errors (such as boundary offsets or type misjudgments), significantly improving the robustness and accuracy of structured information extraction from complex operational texts. Furthermore, based on the extracted entity types and their relationship types, combined with corresponding time windows and historical fault cases, a dynamically weighted quadruple knowledge graph is constructed. This graph depicts the temporal evolution of fault states in the form of (entity 1, state, entity 2, time window), and quantifies the causal dependency strength between different states by defining "evolutionary path" relationships with transition probabilities. This upgrades the traditional static knowledge graph into a temporal knowledge engine that supports dynamic reasoning and trend prediction. Finally, in the question-and-answer phase, the system extracts entities and identifies intents from received user questions. Based on the identification results, it dynamically selects the matching target processing mechanism and collaboratively invokes a dynamically weighted quadruplet knowledge graph, a preset spatiotemporal graph neural network model, a technical document library, and real-time sensor data to execute the selected mechanism to generate and output the target answer. Compared with existing technologies, this invention significantly improves the accuracy of answering complex substation diagnostic questions by constructing a dynamically weighted quadruplet knowledge graph that includes time windows and transition probabilities, and by collaboratively utilizing this graph, a preset spatiotemporal graph neural network model, a technical document library, and sensor data during question-and-answer processing.
[0011] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0012] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This invention provides a flowchart of an intelligent question-answering method in a substation scenario. Figure 2 This invention provides a flowchart of another intelligent question-answering method in a substation scenario. Figure 3 This diagram illustrates the composition of an intelligent question-and-answer device for a substation scenario, as provided in an embodiment of the present invention. Figure 4 This invention provides a block diagram of another intelligent question-and-answer device for a substation scenario. Detailed Implementation
[0013] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0014] To address the shortcomings of current intelligent question-answering methods for substations, a novel intelligent question-answering method suitable for substation scenarios is proposed. Next, we will combine... Figure 1 The present invention describes an intelligent question-answering method for a substation scenario, the specific execution steps of which are as follows: Figure 1 As shown, it includes: 101. Obtain a substation-specific corpus and combine it with a specific entity masking task and a similar entity replacement task to perform domain-adaptive pre-training on the general BERT model to obtain a pre-trained domain BERT model.
[0015] In this step, a substation-specific corpus is first constructed, which includes unstructured text data from real-world scenarios such as power equipment technical manuals, historical fault reports, operation and maintenance procedures, and technical standards. Subsequently, based on this corpus, a domain-adaptive pre-training process is performed on the general BERT model, enabling it to fully grasp the semantics, collocations, and syntactic expressions of substation-specific vocabulary.
[0016] It is important to emphasize that this invention introduces two targeted pre-training tasks on top of traditional Masked Language Model (MLM): The first task is specialized entity masking. This involves prioritizing the masking of key specialized entities such as equipment names (e.g., "Main Transformer No. 1") and fault types (e.g., "abnormal oil temperature" or "partial discharge"), rather than using completely random masking. By forcing the model to predict the masked specialized entities based on context, this significantly enhances its semantic representation of core terms in the power sector, preventing general models from misinterpreting "buffer oil leakage" as a common description due to a lack of domain priors.
[0017] The second task is similar entity replacement, which involves randomly replacing a specific professional entity in the original text with another legitimate entity of the same category (e.g., replacing "main transformer No. 2" with "main transformer No. 1", or "abnormal oil temperature" with "winding overheating"), and requiring the model to determine whether the current sentence has been replaced. By forcing the model to pay attention to entity type consistency and contextual rationality, its sensitivity to entity boundaries and its ability to distinguish domain entity categories can be effectively improved, thus laying a more solid foundation for subsequent entity recognition and relation extraction.
[0018] 102. Weakly supervised association reasoning is performed on unlabeled maintenance text using the triple knowledge graph in the equipment knowledge base, and target labeled text is generated through multi-instance learning and attention weight correction mechanism.
[0019] In this step, to address the problem of scarce manually labeled data in substation operation and maintenance scenarios, this invention adopts a weakly supervised approach, utilizing the triplet knowledge graph in the existing equipment knowledge base to automatically label a large amount of unlabeled operation and maintenance text, thereby generating target labeled text that can be used to train the information extraction model.
[0020] The basic idea is to use existing structured triples (such as <transformer, component, cooling system>) in the knowledge base as remote supervision signals, and search for sentences in unlabeled text that mention both the head and tail entities, assuming that these sentences express the relationship. The principle behind this is that the triples in the device knowledge base reflect the actual structural and functional relationships of the device. Projecting these triples as prior knowledge into unstructured text allows for the low-cost generation of large-scale training samples, avoiding reliance on expensive manual annotation.
[0021] However, this remote supervision method is prone to introducing noisy labels, meaning that some sentences may contain the same entity pair but fail to express the corresponding relation in the knowledge base. Directly using these noisy labels to train the model will severely impair extraction performance. Therefore, this invention introduces a Multi-Instance Learning (MIL) framework for noise reduction. Specifically, all sentences mentioning the same entity pair are grouped into a "bag," and it is assumed that at least one sentence in the bag truly expresses the target relation, without requiring all sentences in the bag to be correct. This assumption better reflects the actual text distribution and effectively alleviates the strong constraints of remote supervision.
[0022] Furthermore, to automatically identify high-quality sentences from the packet, this invention designs an attention weight correction mechanism: for each sentence si in the packet, a credibility score score(si) representing the target relation is calculated, which is dynamically generated by a lightweight neural network based on the sentence semantics and relation type; subsequently, attention weights are obtained through softmax normalization. (Formula 1) in This represents the i-th sentence in the package. It is calculated by a neural network and reflects the credibility of the sentence in expressing the target relationship.
[0023] 103. Using a pre-trained domain BERT model, combined with joint extraction and dependency algorithms, the target labeled text is processed to obtain the entity types and the relationship types between entities in the target labeled text.
[0024] In this step, a BERT model pre-trained on a substation-specific corpus is used to encode the target labeled text, thereby obtaining a contextual representation rich in domain semantics. Based on this, by employing the entity type classifier and relation type classifier in the joint extraction algorithm, entity types and the types of relations between them are predicted simultaneously. This avoids the problem of entity recognition errors leading to relation extraction failures caused by the traditional pipeline method of first identifying entities and then identifying the relation types between entities. Furthermore, dependency parsing is combined to extract the grammatical dependency paths between entities in the sentence, further improving the accuracy of relation identification in complex sentence structures.
[0025] Among them, dependency algorithms provide prior knowledge of language structure. Especially when ellipsis, inversion, or long-distance dependency often occur in operation and maintenance texts, they can effectively supplement the structural clues that are difficult for semantic models to capture, thereby improving the accuracy and robustness of entity and relation extraction as a whole.
[0026] Furthermore, the entity type classifier is a feedforward neural network that outputs the probability distribution of each entity type. The relation classifier outputs the probability distribution of relation types.
[0027] 104. Based on entity types and the types of relationships between entities, and combined with corresponding time windows and historical failure cases, construct a dynamic weighted quadruple knowledge graph.
[0028] A dynamically weighted quadruple knowledge graph is a knowledge graph that contains the states of entities under different time windows, as well as the evolutionary path relationships with transition probabilities connecting state nodes. In this step, the entities and relationships between entities extracted in step 103 are aligned with the time information in the original operation and maintenance text or sensor data. A time window is assigned to each (entity 1, relationship, entity 2) triple, forming a quadruple (entity 1, relationship, entity 2, time window). The time window includes three attributes: start time, end time, and time granularity.
[0029] Based on this, multiple quadruplets of the same entity appearing at different times are considered as the state manifestations of the entity under different time windows, denoted as state St, St+1, etc. Furthermore, based on a large number of historical failure cases, the frequency of state St+1 appearing after state St is statistically analyzed, and the transition probability from St to St+1 is calculated accordingly, serving as the weight of the evolutionary path relationship connecting these two states.
[0030] Here, state is an aggregate semantic unit consisting of (entity + relation type + relation object + time window).
[0031] The formula for calculating the transition probability is: (Formula 2) Where St represents the device state at time t, Count(St→St+1) represents the number of historical cases that transitioned from state St to St+1, and Count(St) represents the total number of cases in state St. Based on this time-series representation, the system can achieve fault evolution prediction and causal analysis.
[0032] Furthermore, the entity types in this invention include equipment entities, component entities, location entities, fault entities, parameter entities, time entities, personnel entities, and operation entities. Relationship types include: composition relationships; causal relationships; influence relationships; attribute relationships, used to express the attribute values of entities (e.g., "No. 1 main transformer rated capacity 50MVA"); location relationships; temporal relationships; usage relationships; and operational relationships.
[0033] It should be noted that, because the relation types include composition and influence relationships, the dynamic weighted quadruple knowledge graph can naturally represent a multi-granularity hierarchical structure: the first layer is station-level granularity, describing the macroscopic fault information of the substation as a whole and its power supply area; the second layer is bay-level granularity, focusing on the operating status of functional units such as main transformer bays, line bays, and bus bays; the third layer is equipment component-level granularity, depicting the fine-grained anomalies of specific equipment and its internal components. Different granularity levels are linked through composition relationships (partOf) and influence relationships (affectTo). This multi-granularity modeling enables cross-granularity causal reasoning.
[0034] Furthermore, a confidence weight is assigned to the relation edges in each quadruple of the knowledge graph, thereby enabling the constructed dynamically weighted quadruple knowledge graph to possess probabilistic representation capabilities. The initial value of this confidence weight can be set based on domain expert knowledge. In practical applications, the confidence weight can be dynamically updated and optimized by incorporating newly added operational cases and fault records, continuously improving the accuracy and adaptability of the knowledge graph. The update formula can be: (Formula 3) Where P(A→B) represents the original confidence level, P'(A→B) represents the updated confidence level, and I(A→B) is an indicator function for whether the causal relationship has been observed in the new case. and These represent the number of historical cases and the number of new cases, respectively. Based on probabilistic knowledge graphs, the system can perform uncertain reasoning, calculate the posterior probability of different causes of failure under given symptoms, and provide a quantitative basis for diagnostic decisions.
[0035] 105. After receiving the user's question to be answered, perform entity extraction and intent recognition on the question to be answered.
[0036] 106. Select the corresponding target processing mechanism from multiple processing mechanisms based on the identified intent, and execute the selected target processing mechanism based on the extracted entities, dynamic weighted quadruple knowledge graph, preset spatiotemporal graph neural network model, technical document library and sensor data to generate the target answer and output it.
[0037] In step 105, after obtaining the question input by the user on the interactive interface, the system first performs text preprocessing on the question. Then, using the pre-trained domain BERT model obtained in step 101, combined with the joint extraction model trained in step 103, entity extraction is performed on the question to identify the entities involved. Simultaneously, the question is input into a pre-trained intent classifier to determine its semantic intent category. Through the above processing, the entity and its type, as well as an intent label, are obtained.
[0038] In step 106, based on the identified intent, a corresponding target processing mechanism is selected from a set of preset processing mechanisms. Based on the extracted entities, the system collaboratively invokes a dynamically weighted quadruple knowledge graph, a preset spatiotemporal graph neural network model, a technical document library, and sensor data to execute the selected mechanism, generating and outputting the target answer. In other words, under the selected target processing mechanism, the system can flexibly select and invoke some or all of the resources in the aforementioned data and models according to actual question-and-answer requirements to collaboratively complete answer generation.
[0039] Based on the above Figure 1 As can be seen from the implementation, the intelligent question-answering method provided by this invention for substation scenarios firstly acquires a substation professional corpus and performs domain-adaptive pre-training on a general BERT model by combining a professional entity masking task and a similar entity replacement task, effectively improving the model's semantic representation ability of power professional vocabulary. Secondly, it utilizes the existing triplet knowledge graph in the equipment knowledge base to perform weakly supervised association reasoning on unlabeled operation and maintenance text, and introduces a multi-instance learning and attention weight correction mechanism to automatically generate high-quality target labeled text. This significantly reduces the cost of manual labeling while effectively suppressing model bias caused by noise labels during remote supervision. On this basis, a joint extraction algorithm is adopted to integrate dependency parsing, simultaneously completing the identification of entity types and the types of relationships between entities. Since this method uniformly models entities and relationships in the same model, it avoids the cascading dependency of "first identifying entities, then judging relationships" in traditional pipeline extraction, fundamentally eliminating the problem of relationship extraction failure caused by entity recognition errors. Furthermore, based on the extracted entity types and their relationship types, combined with the corresponding time windows and historical fault cases, a dynamic weighted quadruple knowledge graph is constructed. This graph depicts the temporal evolution of fault states in the form of (entity 1, state, entity 2, time window), and quantifies the causal dependency strength between different states by defining "evolutionary path" relationships with transition probabilities. Finally, in the question-answering stage, the system extracts entities and identifies intents from received user questions. Based on the identification results, it dynamically selects the matching target processing mechanism and collaboratively invokes the dynamic weighted quadruple knowledge graph, a preset spatiotemporal graph neural network model, a technical document library, and real-time sensor data to execute the selected mechanism to generate the target answer and output it. Compared with existing technologies, this invention significantly improves the accuracy of answering complex diagnostic questions in substations.
[0040] Furthermore, as a response to Figure 1 Further refinement and extension of the illustrated embodiment, this invention also provides another intelligent question-answering method for substation scenarios, such as... Figure 2 As shown, the specific steps are as follows: 201. Obtain a substation-specific corpus and combine it with a specific entity masking task and a similar entity replacement task to perform domain-adaptive pre-training on the general BERT model, thus obtaining a pre-trained domain BERT model.
[0041] 202. Weakly supervised association reasoning is performed on unlabeled maintenance text using the triple knowledge graph in the equipment knowledge base, and target labeled text is generated through multi-instance learning and attention weight correction mechanism.
[0042] The implementation methods of steps 201-202 are the same as those of steps 101-102, and can achieve the same technical effect and solve the same technical problem, so they will not be repeated here.
[0043] 203. Using a pre-trained domain BERT model, combined with joint extraction and dependency algorithms, the target labeled text is processed to obtain the entity types and the relationship types between entities in the target labeled text.
[0044] In this case, the target labeled text is first segmented to generate a sequence of segments composed of words. Next, this sequence is fed into a pre-trained domain-specific BERT model to obtain a context-dependent vector representation for each word. Subsequently, multiple consecutive word subsequences are enumerated on the segmented sequence as candidate text segments. For each segment, based on the BERT vectors of the words it encompasses, a corresponding semantic representation vector is generated through max pooling or attention mechanisms.
[0045] Then, the semantic representation vector of each Span is input into the entity type classifier in the joint extraction algorithm to determine whether it constitutes a valid entity and to predict the corresponding entity type (such as equipment entity, fault entity, etc.).
[0046] Based on this, dependency parsing is performed on the original word segmentation sequence to construct a dependency tree, where each node corresponds to a lexical unit, and edges represent grammatical dependency relationships (such as subject-verb, verb-object, etc.). Then, for each target candidate text segment (a span identified as a valid entity), the set of word nodes it covers in the dependency tree is determined based on its start and end positions in the word segmentation sequence, and a central word node (usually a noun-like core word, such as "subject-variant" to "1st subject-variant") is selected from this set. For each pair of target candidate text segments whose text distance does not exceed a preset threshold, the shortest dependency path between their corresponding central word nodes is extracted—that is, the undirected path with the fewest edges connecting the two central words. The shortest dependency path can effectively compress irrelevant words while preserving the key grammatical skeleton.
[0047] Furthermore, a multi-layer graph convolutional network (GCN) is employed to propagate information across the subgraph formed by the shortest dependency path, aggregating the syntactic adjacency information along the path layer by layer to the two center word nodes, resulting in updated center word representation vectors. Subsequently, this updated vector is concatenated with the original semantic representation vector of its corresponding span to form an enhanced entity representation. Finally, the enhanced entity representations of each pair of target candidate text segments are input into the relation type classifier in the joint extraction algorithm, which outputs the relation type between the two.
[0048] The update formula for GCN is as follows: (Formula 4) in Let N(i) represent the representation vector of node i at level l, and let N(i) represent the set of neighboring nodes of node i. Let σ be the learnable weight matrix, and σ be the activation function.
[0049] 204. Based on entity types and the types of relationships between entities, construct a dynamic weighted quadruple knowledge graph by combining the corresponding time windows and historical failure cases.
[0050] 205. After receiving the user's question to be answered, perform entity extraction and intent recognition on the question to be answered.
[0051] The implementation methods of steps 204-205 are the same as those of steps 104-105, and can achieve the same technical effect and solve the same technical problem, so they will not be repeated here.
[0052] 206. Select the corresponding target processing mechanism from among multiple processing mechanisms based on the identified intent.
[0053] In this embodiment, the corresponding processing mechanism is dynamically matched according to the type of intent of the user's question: if the intent is to query simple facts (such as "What is the current oil temperature of main transformer No. 1?"), the knowledge graph direct query mechanism is selected; if the intent is to query the cause of a fault (such as "What is the cause of the main transformer tripping?"), the causal reasoning query mechanism is preferred; if the intent is to query diagnostic suggestions (such as "How should abnormal oil temperature be handled?"), the retrieval generation query mechanism is selected. If the intent is to query operation guidance (such as "How to manually open the isolating switch?"), the template query mechanism is selected; if the intent is to predict results (such as "Will a cooling system failure cause the main transformer to shut down?"), the temporal reasoning query mechanism is selected; if the intent is a complex reasoning query (such as "Inferring possible root causes from current multi-point alarms"), the multi-hop reasoning query mechanism is selected.
[0054] Of course, the above intent-mechanism mapping strategy is not fixed. This mapping strategy is mainly used to provide an initial, highly adaptable processing path for different intents. However, in actual operation, other mechanisms can be flexibly added or combined after the target processing mechanism is executed, based on the question-and-answer effect, data availability, and question complexity, to achieve dynamic and collaborative multi-source intelligent question answering.
[0055] 207. Based on the extracted entities, the dynamically weighted quadruple knowledge graph, the preset spatiotemporal graph neural network model, the technical document library, and the sensor data, execute the selected target processing mechanism to generate the target answer and output it.
[0056] It should be noted that this step does not exhaustively list all possible cases. All dynamic combination strategies not explicitly listed are within the protection scope of this invention. In this embodiment, if the target processing mechanism is a direct query mechanism of the knowledge graph, then based on the extracted entity, a single-hop query is performed in the dynamically weighted quadruple knowledge graph to retrieve all quadruples containing that entity, and the matching relation type and corresponding value are filtered according to the question intent and returned as the target answer.
[0057] It's important to note that the entire system maintains a dynamically weighted quadruple knowledge graph. This graph integrates facts of various semantic types, including attribute relationships (such as rated capacity), composition relationships, status records, and fault cases. Therefore, queries do not switch between multiple graphs but rather match different semantic patterns on demand within the same graph. For example, when a user asks, "What is the rated capacity of transformer No. 1?", the system extracts the entity "transformer No. 1" and searches for its associated attribute relationship quadruples in the graph. This mechanism is suitable for query scenarios with clear facts and a well-defined structure, offering advantages such as rapid response and accurate results.
[0058] If the target processing mechanism is a template query mechanism, the system matches the extracted entity with a predefined operation-type question-and-answer template, fills the entity and other relevant parameters into the corresponding positions in the template, and generates a structurally sound and semantically complete target answer. This mechanism is suitable for operation-type questions with clear procedures and fixed steps, ensuring that the output content conforms to safety standards and avoiding the risks associated with arbitrary generation.
[0059] If the target processing mechanism is a retrieval-generated query mechanism, then firstly, based on the extracted entity (such as "abnormal oil temperature"), the triplet information related to the entity is extracted from the dynamic weighted quadruple knowledge graph. At the same time, the target text paragraphs with semantic similarity to the question to be answered exceeding a preset threshold (such as the chapter on "handling abnormal oil temperature" in the "Transformer Operation and Maintenance Regulations") are retrieved from the technical document library.
[0060] The aforementioned triplet information, together with the retrieved document paragraphs, constitutes a knowledge context. This context is then concatenated with the original question and input into a pre-trained language model, which outputs the target answer through conditional generation. Specifically, the model generates the answer with the following conditional probabilities: (Formula 5) in The t-th word is the answer.
[0061] To prevent "illusionary" content generated by the model that is inconsistent with the retrieved knowledge, this invention designs a knowledge-constrained decoding strategy: at each generation step, the relevance score between candidate words and the knowledge context is calculated. (Formula 6) Where sim is the cosine similarity, embed is the word embedding function, and k is the knowledge fragment in the context. The target answer is constructed step by step by continuously selecting "candidate words".
[0062] Subsequently, the relevance score is fused with the model's original generation probability: (Formula 7) Here, λ is a weighting coefficient. This constraint makes the generated words more relevant to the retrieved knowledge, reducing the risk of generating incorrect information.
[0063] Furthermore, because this mechanism integrates triplet knowledge from a dynamically weighted quadruple knowledge graph (i.e., the <entity, relation, value> structure extracted from quadruples), a technical document library, and a generative model, the system can also evaluate the credibility of the generated answers. Credibility consists of three parts: knowledge graph support: measuring whether the facts stated in the answer have corresponding records in the graph; document support: measuring the degree of semantic overlap between the answer content and the retrieved document; and model generation confidence: taking the logarithmic value of the probability of the generated sequence. The comprehensive credibility is calculated as follows: (Formula 8) Here, α, β, and γ are weighting coefficients, satisfying α + β + γ = 1. When the credibility is below the threshold, the system will prompt the user with the uncertainty of the answer and suggest manual review.
[0064] Furthermore, if the target processing mechanism is a temporal reasoning query mechanism, the target answer is obtained by combining the extracted entities and the spatial relationship diagram of substation equipment with a preset spatiotemporal graph neural network model. Specifically: This invention pre-constructs a spatial relationship diagram of substation equipment, where nodes represent individual devices, and edges represent electrical connections, physical proximity, and functional dependencies between devices. Each node is accompanied by time-series data, including historical monitoring parameters and status change sequences of the equipment.
[0065] The model employs a spatiotemporal graph convolutional network (ST-GCN) to simultaneously capture dependencies in both spatial and temporal dimensions. Spatially, it leverages the graph convolutional network to aggregate information from neighboring devices and update the current device's state representation. (Formula Nine) Where h_v is the representation vector of device v, and N(v) is the set of neighboring devices of v. h_u is the representation vector of neighboring device u. In the time dimension, the temporal evolution of device states is captured using gated recurrent units (GRUs). (Formula 10) Where x_v^t represents the monitoring data of device v at time t. Finally, spatiotemporal features are fused using an attention mechanism. (Formula Eleven) Here, α represents the attention weight, which is adaptively calculated by a feedforward network based on the current state. Based on the fused representation, the model can predict the device state and failure probability at future moments, enabling early warning of faults.
[0066] Furthermore, if the target processing mechanism is a causal reasoning query mechanism, the system first locates the corresponding node in the dynamically weighted quadruple knowledge graph based on the extracted entities (such as "transformer" and "high oil temperature"). Then, it traces back along the causal and influence paths in the graph to retrieve upstream events or states that may have led to the phenomenon, generating structured causal evidence. For example, regarding the question "Why is the transformer oil temperature high?", the system can identify the following causal chain from the graph: "Cooling fan failure → decreased cooling system efficiency → poor transformer heat dissipation → increased oil temperature." Subsequently, the system integrated three types of heterogeneous evidence: Causal / inferential evidence: causal paths from knowledge graphs; empirical evidence: relevant regulations or typical cases retrieved from technical document libraries (such as the "Transformer Operation and Maintenance Guidelines" which states that "high ambient temperature or overload can also lead to an increase in oil temperature"); numerical evidence: quantitative indicators obtained from real-time sensor data (such as current load rate reaching 95%, ambient temperature 42℃, abnormal cooling fan current, etc.).
[0067] To reconcile potential conflicts between evidence from different sources (as shown in the graph indicating "cooling failure" while the sensor displays "overload"), an evidence conflict discounting strategy (such as based on DS evidence theory or weighted confidence adjustment) can be adopted to assign dynamic credibility weights to each evidence source, perform multi-source fusion, and ultimately generate a consistent, reliable, and interpretable target answer.
[0068] If the target processing mechanism is a multi-hop reasoning query mechanism, the system performs multi-hop search on the dynamically weighted quadruple knowledge graph using a reinforcement learning strategy to achieve efficient knowledge path reasoning. Specifically, this invention models multi-hop reasoning on the graph as a Markov decision process (MDP): The state space S consists of all entity nodes in the graph; the action space A consists of all relation edges originating from the current node; the transition function T(s'|s,a) is determined by the triple (s,a,s'), representing a deterministic transition from node s to node s' through relation a.
[0069] The reward function R is designed as follows: a positive reward of +10 is given when the agent reaches the answer entity; a small positive reward of +1 is given when moving towards the answer; a negative reward of -1 is given when moving away from the answer entity; and a penalty of -5 is given when exceeding the maximum number of steps. The agent's policy network π(a|s,q) selects the relation a to explore next based on the current node s and the question encoding vector q. The policy network uses an attention mechanism to calculate the score for each edge. (Formula 12) in Let be the embedding vector of relation 'a', q be the question encoding vector, and s be the embedding vector of the current node. This is the learnable parameter matrix.
[0070] The action probability distribution is obtained through softmax normalization: (Formula Thirteen) The policy network is trained using the REINFORCE algorithm, with the goal of maximizing the expected cumulative reward. (Formula Fourteen) Where τ represents an inference path, and θ are the policy network parameters. The gradient is calculated using the policy gradient theorem: (Formula Fifteen) in This represents the cumulative return starting from time t. To reduce variance, a baseline function is introduced. : (Formula Sixteen) Baseline function uses value network It is estimated that the policy network is trained simultaneously.
[0071] To avoid getting trapped in local optima and improve exploration efficiency, a curiosity-driven exploration mechanism is introduced. The intrinsic reward is defined as the reciprocal of the number of times a new node is reached, encouraging the agent to explore unvisited areas. (Formula 17) Where Count(s) is the number of times node s is visited. The total reward is the weighted sum of extrinsic and intrinsic rewards: (Formula 18) Where β is the tradeoff coefficient.
[0072] Through the above mechanism, the intelligent agent can efficiently search for reasoning paths on the knowledge graph. In practical applications, the system starts with the extracted initial entity, performs multi-hop reasoning, generates at least one reasoning path, and uses the endpoint entity of the preferred path with the highest cumulative confidence score as reasoning evidence. Subsequently, this reasoning evidence is fused with two types of external evidence: empirical evidence: relevant equipment configurations or procedure clauses retrieved from technical document libraries; and numerical evidence: real-time / static parameters obtained from sensor data or equipment ledgers.
[0073] To address potential conflicts between evidence from different sources, the system employs an evidence conflict discount strategy (such as confidence-weighted or DS evidence theory) to calibrate and fuse the credibility of each evidence source, ultimately generating a consistent and reliable target answer.
[0074] Regarding evidence fusion, a reliability weight can be predefined for each evidence source. The reliability weight is derived from historical diagnostic accuracy statistics and can be dynamically adjusted.
[0075] For each source of evidence i, the basic probability assignment (BPA) on the set of diagnostic hypotheses H given by it is denoted as follows: This indicates the degree to which the evidence supports each hypothesis. When integrating multiple pieces of evidence, the conflict coefficient K is calculated first. (Formula 19) A higher K value indicates a more severe conflict of evidence. When K > 0.8, the evidence is considered highly conflicting and requires conflict resolution. This invention employs an evidence discounting strategy, discounting evidence based on reliability weights: (Formula 20) (Formula 21) in Let Θ be the reliability weight of evidence source i, and Θ be the complete set of hypotheses. The discounted BPA. The discounted evidence was fused using Dempster's combination rule: (Formula 22) Where K' is the conflict coefficient after discounting. In this way, the impact of unreliable evidence on the final result is reduced, thereby reducing conflict. After fusion, the overall confidence level of each diagnostic hypothesis is obtained, and the hypothesis with the highest confidence level is selected as the diagnostic conclusion.
[0076] When performing path reasoning based on knowledge graphs, this invention fully records all nodes and relation edges traversed during the reasoning process, forming a structured reasoning chain. For example, for the question "What type of motor is used for the cooling fan of main transformer No. 1?", the system generates the following reasoning chain: Main transformer No. 1 — [includes] → Cooling system — [includes] → Cooling fan — [uses] → YE3-132 motor. The system then automatically converts this reasoning chain into a natural language explanation: "Main transformer No. 1 includes a cooling system, the cooling system includes a cooling fan, the cooling fan uses a YE3-132 model motor, therefore the answer is YE3-132." For complex reasoning involving multi-source information fusion (such as fault diagnosis), the system not only outputs a conclusion but also generates a structured list of evidence and its confidence level explanation to enhance interpretability. For example, for an insulation fault diagnosis problem, the system outputs the following explanation: The overall judgment is an insulation fault (overall confidence level 0.85), based on the following: Partial discharge signal in sensor data (weight 0.9); oil chromatography analysis showed excessive C2H2 content (weight 0.8); 90% of similar working conditions in the historical case database were ultimately confirmed as insulation problems (weight 0.5); no obvious hot spots were found in infrared imaging (weight 0.7, discounted as reverse evidence).
[0077] In this way, users not only obtain diagnostic results but also clearly understand the system's reasoning, thereby building trust in the intelligent system and enabling manual review or intervention when necessary. Furthermore, the system supports counterfactual explanation capabilities to answer questions like "How would the outcome change if a certain condition were changed?" Counterfactual reasoning can be performed within a dynamically weighted quadruple knowledge graph: the state of the "abnormal oil temperature" node is temporarily changed to "normal," and the causal or temporal reasoning model is re-run based on the updated state to calculate the change in the failure probability. Ultimately, the system reports: "If the oil temperature returns to normal, the insulation failure probability decreases from the current 68% to 22%." This type of counterfactual reasoning capability provides hypothetical decision support for maintenance personnel and has significant application value in scenarios such as risk assessment, selection of disposal solutions, and preventative maintenance.
[0078] Furthermore, it should be noted that the evidence sources involved in this invention not only cover technical document libraries and sensor data, but also include various types such as oil analysis data, infrared thermography data, manual inspection records, and historical case comparisons. In practical applications, users can flexibly select the appropriate evidence sources according to their specific needs.
[0079] 208. If an updated unanswered question is received from the same user, the updated unanswered question will be completed.
[0080] In this embodiment, the system maintains a dialogue state dictionary to record key contextual information in the current session, including the device entity being discussed, the fault type, the diagnostic stage, and confirmed operating conditions. After each round of user input, the system dynamically updates the state dictionary based on the content of the new question. When an updated question to be answered from the same user is received, the system first retrieves their historical dialogue record (i.e., the current state dictionary) and, based on this context, resolves pronouns, zero subjects, or omitted components in the question to generate a complete target updated question to be answered.
[0081] Furthermore, when the system determines that the current information is insufficient to generate a reliable answer, it will proactively initiate clarifying questions to collect necessary information. This proactive questioning strategy is implemented based on a slot filling mechanism: the system predefines the required slots (such as "fault type" and "device name") and optional slots (such as "occurrence time" and "environmental conditions") for each type of intent; when the required slots are not filled, the corresponding clarifying questions are automatically triggered.
[0082] Furthermore, the system supports multi-intent recognition, capable of handling situations where a single question contains multiple sub-intents. In addition, the activation probability is calculated independently for each predefined intent category, and any intent exceeding a preset threshold is activated. Subsequently, the system decomposes the original question into several sub-questions, calls the corresponding processing mechanism for each, and finally combines the sub-answers in an orderly manner to form a comprehensive response with a clear structure and complete content. These mechanisms collectively ensure the system's robustness, interactivity, and professionalism in complex, realistic dialogue scenarios.
[0083] Furthermore, as a response to the above Figure 1 In addition to the implementation of the method shown, this embodiment of the invention also provides an intelligent question-and-answer device for substation scenarios, used for the above-mentioned... Figure 1 The method shown is implemented accordingly. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 3 As shown, the device includes: The acquisition unit 301 is used to acquire the substation professional corpus and combine the professional entity masking task and the similar entity replacement task to perform domain adaptive pre-training on the general BERT model to obtain the pre-trained domain BERT model. The text annotation unit 302 is used to perform weakly supervised association reasoning on unannotated operation and maintenance text using the triple knowledge graph in the device knowledge base, and to generate target annotated text through multi-instance learning and attention weight correction mechanism. The entity extraction unit 303 is used to process the target labeled text obtained by the text annotation unit 302 using the pre-trained domain BERT model obtained by the acquisition unit 301, combined with the joint extraction algorithm and the dependency algorithm, to obtain the entity types and the relationship types between entities in the target labeled text. The graph construction unit 304 is used to construct a dynamic weighted quadruple knowledge graph based on the entity type extracted by the entity extraction unit 303 and the relationship type between the entities, combined with the corresponding time window and historical fault cases. The dynamic weighted quadruple knowledge graph is a knowledge graph that includes the state of entities under different time windows and the evolution path relationship with transition probability connecting the state nodes. The intent recognition unit 305 is used to perform entity extraction and intent recognition on the question to be answered after receiving the question to be answered from the user. The answer generation unit 306 is used to select the corresponding target processing mechanism from multiple processing mechanisms according to the identified intent, and execute the selected target processing mechanism based on the entities extracted by the intent recognition unit 305, the dynamic weighted quadruple knowledge graph constructed by the graph construction unit 304, the preset spatiotemporal graph neural network model, the technical document library and sensor data to generate the target answer and output it.
[0084] Furthermore, as a response to the above Figure 2 In addition to the implementation of the method shown, this embodiment of the invention also provides another intelligent question-and-answer device for substation scenarios, used for the above-mentioned... Figure 2 The method shown is implemented accordingly. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 4 As shown, the device includes: The acquisition unit 301 is used to acquire the substation professional corpus and combine the professional entity masking task and the similar entity replacement task to perform domain adaptive pre-training on the general BERT model to obtain the pre-trained domain BERT model. The text annotation unit 302 is used to perform weakly supervised association reasoning on unannotated operation and maintenance text using the triple knowledge graph in the device knowledge base, and to generate target annotated text through multi-instance learning and attention weight correction mechanism. The entity extraction unit 303 is used to process the target labeled text obtained by the text annotation unit 302 using the pre-trained domain BERT model obtained by the acquisition unit 301, combined with the joint extraction algorithm and the dependency algorithm, to obtain the entity types and the relationship types between entities in the target labeled text. The graph construction unit 304 is used to construct a dynamic weighted quadruple knowledge graph based on the entity type extracted by the entity extraction unit 303 and the relationship type between the entities, combined with the corresponding time window and historical fault cases. The dynamic weighted quadruple knowledge graph is a knowledge graph that includes the state of entities under different time windows and the evolution path relationship with transition probability connecting the state nodes. The intent recognition unit 305 is used to perform entity extraction and intent recognition on the question to be answered after receiving the question to be answered from the user. The answer generation unit 306 is used to select the corresponding target processing mechanism from multiple processing mechanisms according to the identified intent, and execute the selected target processing mechanism based on the entities extracted by the intent recognition unit 305, the dynamic weighted quadruple knowledge graph constructed by the graph construction unit 304, the preset spatiotemporal graph neural network model, the technical document library and sensor data to generate the target answer and output it.
[0085] In one optional implementation, the entity extraction unit 303 is specifically used for: The target labeled text is segmented to obtain a segmented sequence composed of word units; The word segmentation sequence is processed using a pre-trained domain BERT model to obtain the context-related vector representation of each word element in the word segmentation sequence; Enumerate multiple consecutive word subsequences as candidate text segments on the word segmentation sequence; For each candidate text segment, based on the context-related vector representations of the covered lexical units, the corresponding semantic representation vectors are aggregated using max pooling or attention mechanisms. The semantic representation vector is input into the entity type classifier in the joint extraction algorithm to determine whether each candidate text fragment contains a valid entity and the entity type that contains the valid entity. The entity type includes at least one of device entity, fault entity, or location entity. The dependency algorithm and the relation type classifier in the joint extraction algorithm are used to process the target candidate text fragments with entities to obtain the relation types between the entities.
[0086] In one optional implementation, when the entity extraction unit 303 processes the target candidate text fragments containing entities according to the dependency algorithm and the relation type classifier in the joint extraction algorithm to obtain the relation types between entities, it is specifically used for: Dependency parsing is performed on the segmented sequence to obtain a dependency tree between lexical units, where each node of the dependency tree corresponds to a lexical unit in the segmented sequence, and the edges between nodes represent syntactic dependency relationships. For each target candidate text segment, the set of word nodes covered in the dependency tree is determined according to its start and end positions in the word segmentation sequence, and the central word node is determined in the set of word nodes. For every pair of target candidate text segments whose text distance does not exceed a preset text distance threshold, the shortest dependency path between their central word nodes is extracted. The shortest dependency path is the undirected path with the fewest edges connecting the two central word nodes. A multi-layer graph convolutional network is used to perform information propagation processing on the subgraph formed by the shortest dependency path, and the syntactic adjacency information on the path is aggregated to two central word nodes to obtain the updated representation vector of each central word node. The updated representation vector of each central word node is concatenated with the semantic representation vector of its corresponding target candidate text segment to form the enhanced entity representation of that text segment. The enhanced entity representations of each pair of target candidate text fragments are input into the relation type classifier in the joint extraction algorithm to obtain the relation type between the entities in each pair of target candidate text fragments. The relation type includes composition relation and influence relation.
[0087] In one optional implementation, when the answer generation unit 306 selects the corresponding target processing mechanism from multiple processing mechanisms based on the identified intent, it is specifically used for: If the intent of the question to be answered is to query simple facts, then the knowledge graph direct query mechanism is determined as the corresponding target processing mechanism; If the stated intent is to query the cause of the fault, then the causal reasoning query mechanism will be determined as the corresponding target processing mechanism. If the stated intent is to provide diagnostic suggestions, then the retrieval and query generation mechanism will be determined as the corresponding target processing mechanism. If the stated intent is a query operation guide, then the template query mechanism will be determined as the corresponding target processing mechanism; If the intent is a prediction result, then the temporal reasoning query mechanism is determined as the corresponding target processing mechanism; If the intent is a complex reasoning query, then the multi-hop reasoning query mechanism is determined as the corresponding target processing mechanism.
[0088] In one optional implementation, when the answer generation unit 306 generates and outputs the target answer by executing the selected target processing mechanism based on the extracted entities, the dynamically weighted quadruple knowledge graph, the preset spatiotemporal graph neural network model, the technical document library, and sensor data, it is specifically used for: If the target processing mechanism is a knowledge graph direct query mechanism, then a single-hop query is performed in the dynamically weighted quadruple knowledge graph based on the extracted entity, and the matching entity or relation type is returned as the target answer. If the target processing mechanism is a template query mechanism, then the extracted entity is matched with a preset operation template, and the corresponding parameters are filled into the preset operation template and then converted into the target answer; If the target processing mechanism is a retrieval and query generation mechanism, then the extracted entities are matched with the corresponding dynamic weighted quadruple knowledge graph, and the target text paragraphs with semantic similarity to the question to be answered exceeding a preset similarity threshold are retrieved in the technical document library. The dynamic weighted quadruple knowledge graph and the target text paragraph are determined as the knowledge context, and the question to be answered is concatenated with the knowledge context; The concatenated result is input into a pre-trained language model to obtain the target answer, wherein the target answer is obtained by calculating the relevance score between the candidate answer and the knowledge context; If the target processing mechanism is a temporal reasoning query mechanism, the target answer is obtained by combining the extracted entities and the spatial relationship diagram of substation equipment with the preset spatiotemporal graph neural network model; If the target processing mechanism is a causal reasoning query mechanism and a multi-hop reasoning query mechanism, then the target answer is obtained according to the multi-source evidence fusion mechanism.
[0089] In one optional implementation, when the answer generation unit 306 obtains the target answer based on the multi-source evidence fusion mechanism, it is specifically used for: If the target processing mechanism is a causal reasoning query mechanism, then the corresponding dynamic weighted quadruple knowledge graph is determined based on the extracted entity, and the causal relationship path related to the extracted entity is retrieved based on the dynamic weighted quadruple knowledge graph to generate causal evidence. If the target processing mechanism is a multi-hop reasoning query mechanism, then a multi-hop search is performed on the dynamic weighted quadruple knowledge graph using a reinforcement learning strategy to generate at least one reasoning path, and the endpoint entity in the preferred reasoning path with the highest accumulated confidence score during the generation of the reasoning path is determined as reasoning evidence. The causal or inferential evidence is combined with empirical evidence obtained from a technical documentation library and numerical evidence obtained from sensor data. Multi-source evidence is fused using an evidence conflict discounting strategy to obtain the target answer.
[0090] In an optional implementation, after obtaining and outputting the answer to the question to be answered, the device further includes a question completion unit 307, which is specifically used for: If an updated unanswered question is received from the same user, then retrieve the historical dialogue prior to the updated unanswered question; Based on the historical dialogue, the referential components or omitted content in the updated unanswered question are resolved through contextual analysis to obtain the target updated unanswered question.
[0091] Furthermore, embodiments of the present invention also provide a storage medium for storing a computer program, wherein the computer program, when running, controls the device where the storage medium is located to execute the above-described... Figure 1-2 The intelligent question-answering method for substation scenarios described in the article.
[0092] Furthermore, embodiments of the present invention also provide a processor for running a program, wherein the program executes the above-described... Figure 1-2 The intelligent question-answering method for substation scenarios described in the article.
[0093] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0094] It is understood that the relevant features in the above methods and apparatus can be referenced interchangeably. Furthermore, the terms "first," "second," etc., in the above embodiments are used to distinguish between embodiments and do not represent the superiority or inferiority of any particular embodiment.
[0095] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0096] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0097] In addition, the memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0098] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0099] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0100] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0101] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0102] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0103] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0104] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0105] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0106] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0107] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. An intelligent question-answering method for a substation scenario, characterized in that, The method includes: We obtained a specialized corpus of substations and combined it with specialized entity masking and similar entity replacement tasks to perform domain-adaptive pre-training on the general BERT model, thus obtaining a pre-trained domain BERT model. We use the triplet knowledge graph in the equipment knowledge base to perform weakly supervised association reasoning on unlabeled maintenance text, and generate target labeled text through multi-instance learning and attention weight correction mechanism; Using a pre-trained domain BERT model, combined with joint extraction and dependency algorithms, the target labeled text is processed to obtain the entity types and the relationship types between entities in the target labeled text; Based on the entity type and the relationship type between the entities, a dynamic weighted quadruple knowledge graph is constructed by combining the corresponding time window and historical failure cases. The dynamic weighted quadruple knowledge graph is a knowledge graph that includes the state of the entity under different time windows and the evolution path relationship with transition probability connecting the state nodes. After receiving the user's question to be answered, entity extraction and intent recognition are performed on the question to be answered; Based on the identified intent, the corresponding target processing mechanism is selected from multiple processing mechanisms. The selected target processing mechanism is then executed based on the extracted entity, the dynamically weighted quadruple knowledge graph, the preset spatiotemporal graph neural network model, the technical document library, and sensor data to generate the target answer and output it.
2. The method according to claim 1, characterized in that, Using a pre-trained domain BERT model, combined with joint extraction and dependency algorithms, the target labeled text is processed to obtain the entity types and relationship types between entities in the target labeled text, including: The target labeled text is segmented to obtain a segmented sequence composed of word units; The word segmentation sequence is processed using a pre-trained domain BERT model to obtain the context-related vector representation of each word element in the word segmentation sequence; Enumerate multiple consecutive word subsequences as candidate text segments on the word segmentation sequence; For each candidate text segment, based on the context-related vector representations of the covered lexical units, the corresponding semantic representation vectors are aggregated using max pooling or attention mechanisms. The semantic representation vector is input into the entity type classifier in the joint extraction algorithm to determine whether each candidate text fragment contains a valid entity and the entity type that contains the valid entity. The entity type includes at least one of device entity, fault entity, or location entity. The target candidate text fragments with entities are processed according to the dependency algorithm and the relation type classifier in the joint extraction algorithm to obtain the relation types between entities.
3. The method according to claim 2, characterized in that, The candidate text fragments containing entities are processed according to the dependency algorithm and the relation type classifier in the joint extraction algorithm to obtain the relation types between entities, including: Dependency parsing is performed on the segmented sequence to obtain a dependency tree between lexical units, where each node of the dependency tree corresponds to a lexical unit in the segmented sequence, and the edges between nodes represent syntactic dependency relationships. For each target candidate text segment, the set of word nodes covered in the dependency tree is determined according to its start and end positions in the word segmentation sequence, and the central word node is determined in the set of word nodes. For every pair of target candidate text segments whose text distance does not exceed a preset text distance threshold, the shortest dependency path between their central word nodes is extracted. The shortest dependency path is the undirected path with the fewest edges connecting the two central word nodes. A multi-layer graph convolutional network is used to perform information propagation processing on the subgraph formed by the shortest dependency path, and the syntactic adjacency information on the path is aggregated to two central word nodes to obtain the updated representation vector of each central word node. The updated representation vector of each central word node is concatenated with the semantic representation vector of its corresponding target candidate text segment to form the enhanced entity representation of that text segment. The enhanced entity representations of each pair of target candidate text fragments are input into the relation type classifier in the joint extraction algorithm to obtain the relation type between the entities in each pair of target candidate text fragments. The relation type includes composition relation and influence relation.
4. The method according to claim 1, characterized in that, Based on the identified intent, the corresponding target processing mechanism is selected from multiple processing mechanisms, including: If the intent of the question to be answered is to query simple facts, then the knowledge graph direct query mechanism is determined as the corresponding target processing mechanism; If the stated intent is to query the cause of the fault, then the causal reasoning query mechanism will be determined as the corresponding target processing mechanism. If the stated intent is to provide diagnostic suggestions, then the retrieval and query generation mechanism will be determined as the corresponding target processing mechanism. If the stated intent is a query operation guide, then the template query mechanism will be determined as the corresponding target processing mechanism; If the intent is a prediction result, then the temporal reasoning query mechanism is determined as the corresponding target processing mechanism; If the intent is a complex reasoning query, then the multi-hop reasoning query mechanism is determined as the corresponding target processing mechanism.
5. The method according to claim 1, characterized in that, Based on the extracted entities, the dynamically weighted quadruple knowledge graph, the preset spatiotemporal graph neural network model, the technical document library, and sensor data, the selected target processing mechanism is executed to generate and output the target answer, including: If the target processing mechanism is a knowledge graph direct query mechanism, then a single-hop query is performed in the dynamically weighted quadruple knowledge graph based on the extracted entity, and the matching entity or relation type is returned as the target answer. If the target processing mechanism is a template query mechanism, then the extracted entity is matched with a preset operation template, and the corresponding parameters are filled into the preset operation template and then converted into the target answer; If the target processing mechanism is a retrieval and query generation mechanism, then the extracted entities are matched with the corresponding dynamic weighted quadruple knowledge graph, and the target text paragraphs with semantic similarity to the question to be answered exceeding a preset similarity threshold are retrieved in the technical document library. The dynamic weighted quadruple knowledge graph and the target text paragraph are determined as the knowledge context, and the question to be answered is concatenated with the knowledge context; The concatenated result is input into a pre-trained language model to obtain the target answer, wherein the target answer is obtained by calculating the relevance score between the candidate answer and the knowledge context; If the target processing mechanism is a temporal reasoning query mechanism, the target answer is obtained by combining the extracted entities and the spatial relationship diagram of substation equipment with the preset spatiotemporal graph neural network model; If the target processing mechanism is a causal reasoning query mechanism and a multi-hop reasoning query mechanism, then the target answer is obtained according to the multi-source evidence fusion mechanism.
6. The method according to claim 5, characterized in that, The target answer is obtained based on the multi-source evidence fusion mechanism, including: If the target processing mechanism is a causal reasoning query mechanism, then the corresponding dynamic weighted quadruple knowledge graph is determined based on the extracted entity, and the causal relationship path related to the extracted entity is retrieved based on the dynamic weighted quadruple knowledge graph to generate causal evidence. If the target processing mechanism is a multi-hop reasoning query mechanism, then a multi-hop search is performed on the dynamic weighted quadruple knowledge graph using a reinforcement learning strategy to generate at least one reasoning path, and the endpoint entity in the preferred reasoning path with the highest accumulated confidence score during the generation of the reasoning path is determined as reasoning evidence. The causal or inferential evidence is combined with empirical evidence obtained from a technical documentation library and numerical evidence obtained from sensor data. Multi-source evidence is fused using an evidence conflict discounting strategy to obtain the target answer.
7. The method according to claim 1, characterized in that, After obtaining and outputting the answer to the question to be answered, the method further includes: If an updated unanswered question is received from the same user, then retrieve the historical dialogue prior to the updated unanswered question; Based on the historical dialogue, the referential components or omitted content in the updated unanswered question are resolved through contextual analysis to obtain the target updated unanswered question.
8. An intelligent question-and-answer device for a substation scenario, characterized in that, The device includes: The acquisition unit is used to acquire the substation professional corpus and combine it with the professional entity masking task and the similar entity replacement task to perform domain adaptive pre-training on the general BERT model to obtain the pre-trained domain BERT model. The text annotation unit is used to perform weakly supervised association reasoning on unannotated operation and maintenance text using the triple knowledge graph in the device knowledge base, and to generate target annotated text through multi-instance learning and attention weight correction mechanism; The entity extraction unit is used to process the target labeled text obtained by the text annotation unit using the pre-trained domain BERT model obtained by the acquisition unit, combined with the joint extraction algorithm and the dependency algorithm, to obtain the entity types and the relationship types between entities in the target labeled text. The graph construction unit is used to construct a dynamic weighted quadruple knowledge graph based on the entity type extracted by the entity extraction unit and the relationship type between the entities, combined with the corresponding time window and historical failure cases. The dynamic weighted quadruple knowledge graph is a knowledge graph that includes the state of entities under different time windows and the evolution path relationship with transition probability connecting the state nodes. The intent recognition unit is used to perform entity extraction and intent recognition on the question to be answered after receiving the question to be answered from the user. The answer generation unit is used to select the corresponding target processing mechanism from multiple processing mechanisms based on the identified intent, and execute the selected target processing mechanism based on the entities extracted by the intent recognition unit, the dynamically weighted quadruple knowledge graph constructed by the graph construction unit, the preset spatiotemporal graph neural network model, the technical document library and sensor data to generate the target answer and output it.
9. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to execute the intelligent question-and-answer method in the substation scenario as described in any one of claims 1 to 7.
10. A processor, characterized in that, The processor is used to run a program, wherein the program executes the intelligent question-answering method in the substation scenario as described in any one of claims 1 to 7.