Artificial intelligence-based new energy field knowledge intelligent question answering system
By constructing a hyper-entity knowledge graph and a graph neural network reasoning mechanism, the problems of cross-modal data fusion and multi-hop reasoning in the question-answering system in the new energy field are solved, achieving efficient knowledge representation and accurate answer generation, and improving the usability and reliability of the question-answering system.
Patent Information
- Application Number
- CN202611437524.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional question-answering systems struggle to effectively integrate cross-modal heterogeneous data in the new energy field, fail to express high-order semantic relationships, and lack sufficient reasoning accuracy under multiple constraints. They are unable to accurately identify long-distance causal chains across entities, which affects the confidence assessment of answers.
We construct a hyper-entity knowledge graph, combining dynamic subgraph retrieval and graph neural network reasoning mechanisms. Through cross-modal data acquisition, entity feature embedding, dynamic semantic relationship recognition, and hypergraph structure generation, we achieve unified representation and efficient reasoning of knowledge in the new energy field. We also utilize graph neural networks for deep semantic reasoning and answer generation.
It improves the availability and reliability of professional knowledge services in the new energy field, enhances the accuracy of question answering and domain adaptability, can accurately extract answers to complex questions, and solves the shortcomings of traditional methods in multi-hop reasoning scenarios.
Smart Images

Figure CN123178564A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent question answering and knowledge graph technology, specifically to an intelligent question answering system for the new energy field based on artificial intelligence. Background Technology
[0002] The knowledge system in the new energy field encompasses various professional knowledge areas such as power generation, energy storage, and grid dispatch. Data sources are diverse and structurally varied, making it difficult for traditional question-answering systems to effectively integrate cross-modal heterogeneous data. Existing technical solutions mostly rely on single knowledge bases or rule templates for query matching. Their knowledge representation capabilities are limited by the binary relation structure of traditional triplet graphs, failing to express higher-order relationships such as "equipment—operating status—environmental parameters—dispatch instructions," and struggling to capture the complex multi-dimensional semantics between entities. Furthermore, question-answering methods based on keyword matching or shallow semantic parsing often suffer from low answer recall and insufficient reasoning accuracy when dealing with professional questions in the new energy field involving multiple constraints and multi-step reasoning, due to a lack of dynamic aggregation of subgraph structures and deep reasoning capabilities. While existing question-answering systems based on graph neural networks introduce structural information, they typically only aggregate nodes within a fixed range of knowledge subgraphs, failing to adaptively expand and filter multi-hop paths based on question semantics, thus failing to effectively balance reasoning depth and computational efficiency. Furthermore, when performing high-order logical reasoning from multi-hop extended subgraph candidates, traditional methods often ignore the temporal dependencies and serialization features of relational paths, making it difficult to accurately identify long-distance causal chains across entities, which in turn affects the confidence assessment of the final answer. Summary of the Invention
[0003] The purpose of this invention is to provide an AI-based intelligent question-answering system for the new energy field, addressing the limitations of traditional knowledge-based question-answering methods in expressing high-order semantic relationships between hyper-entities and adapting to the cross-modal data fusion and multi-hop reasoning requirements of the new energy field. This invention achieves accurate mapping from complex natural language questions to high-quality answers by constructing a hyper-entity knowledge graph and introducing dynamic subgraph retrieval and graph neural network reasoning mechanisms, thereby improving the availability and reliability of professional knowledge services in the new energy field.
[0004] To achieve the above objectives, this invention provides the following technical solution: This invention proposes an artificial intelligence-based intelligent question-answering system for the new energy field, capable of unified representation and efficient reasoning of multi-source heterogeneous knowledge such as power generation, energy storage, and grid dispatching, thereby improving question-answering accuracy and domain adaptability. The system includes a knowledge graph construction module, a query semantic parsing module, a dynamic subgraph retrieval module, a graph neural network reasoning module, and an answer generation and output module. The knowledge graph construction module extracts entities, relationships, and attributes from multi-source heterogeneous data to construct a hyper-entity knowledge graph containing knowledge of power generation, energy storage, and grid dispatching, enhancing the expressive power of complex semantic relationships through the hypergraph structure. The query semantic parsing module receives natural language questions and performs semantic parsing on them, generating query semantic vectors containing question types and core entities, enabling a precise structured representation of user intent. The dynamic subgraph retrieval module retrieves and extracts associated subgraphs from the hyper-entity knowledge graph based on the query semantic vectors, generating a set of candidate answer subgraphs, thereby effectively narrowing the reasoning scope while ensuring recall. The graph neural network inference module performs deep semantic reasoning on the candidate answer subgraph set, generating an inference feature vector set for the candidate answers, thus enabling the mining of implicit logic across entities and multi-hop relationships. The answer generation and output module sorts the inference feature vector set by confidence and outputs the final answer, ensuring that the answer reflects both deep semantic matching and readability.
[0005] As a technical solution of the present invention, the knowledge graph construction module includes a cross-modal data acquisition unit, an entity feature embedding unit, a dynamic semantic relationship recognition unit, and a hypergraph structure generation unit. The cross-modal data acquisition unit is used to collect technical documents, equipment parameter manuals, and operation log data in the new energy field. It can further collect sensor time-series data and satellite remote sensing image data from new energy equipment, performing structured and semi-structured data fusion processing to enrich the original signal sources for entity relationship discovery. The entity feature embedding unit performs entity recognition and vectorized embedding processing on the collected data, generating initial entity feature vectors to ensure alignment of different types of data in a unified semantic space. The dynamic semantic relationship recognition unit, based on the initial entity feature vectors, calculates the semantic correlation between entities through a self-attention mechanism and generates a set of relation triples based on the semantic correlation, enabling adaptive capture of implicit relationships in domain knowledge. The hypergraph structure generation unit maps the entities and relationships in the relation triple set to a hypergraph structure, generating the hyper-entity knowledge graph. It uses hyperedges to jointly model multi-dimensional relationships, avoiding information loss caused by traditional triple representations.
[0006] Preferably, the query semantic parsing module includes a text intent encoding unit, an entity type discrimination unit, a dependency relation extraction unit, and an intent type mapping unit. The text intent encoding unit performs word segmentation and part-of-speech tagging on the natural language question, and extracts the semantic features of the question using a pre-trained language model to generate a question semantic vector, effectively preserving contextual information. The entity type discrimination unit, based on the question semantic vector, uses a conditional random field model to identify the core entities and entity type labels in the question, improving the recognition accuracy of new energy proper nouns. The dependency relation extraction unit analyzes the dependency grammatical relationships between words in the question based on the core entities and entity type labels, generating a question grammatical dependency tree, thereby explicitly capturing the sentence structure of the question. The intent type mapping unit matches the structural features of the question grammatical dependency tree with a preset question-and-answer intent template to generate the query semantic vector, ensuring that the semantic parsing results are highly consistent with the knowledge graph query logic.
[0007] Furthermore, the dynamic subgraph retrieval module includes an entity matching and localization unit, a multi-hop path expansion unit, and a graph similarity filtering unit. The entity matching and localization unit locates entity nodes in the hyper-entity knowledge graph based on the core entities in the query semantic vector, generating an initial set of matching nodes to accurately determine the query anchor point. The multi-hop path expansion unit starts from each node in the initial set of matching nodes and expands the path along the relation edges for a preset number of hops, generating an expanded subgraph set. The preset number of hops is preferably 2 to 5 hops, and a path pruning strategy is used during the path expansion process to remove paths with semantic similarity below a threshold, thereby balancing inference depth and computational overhead. The graph similarity filtering unit calculates the semantic similarity between each subgraph in the expanded subgraph set and the query semantic vector, and sorts and filters them according to semantic similarity to generate a candidate answer subgraph set, eliminating noisy subgraphs to ensure the high quality of the candidate set.
[0008] As another technical solution of the present invention, the graph neural network inference module includes a node feature initialization unit, a graph attention aggregation unit, a temporal path encoding unit, and a high-order logic inference unit. The node feature initialization unit performs feature initialization processing on each node in the candidate answer subgraph set, generating an initial node feature matrix and unifying the feature dimensions and distribution of nodes from different sources. The graph attention aggregation unit aggregates neighbor node information from the initial node feature matrix using a multi-head attention mechanism, generating an aggregated node feature vector. The number of heads in the multi-head attention mechanism is preferably 4 or 8, and the output dimension of each attention head is preferably 64 or 128 dimensions, thereby fully capturing semantic features under different relational channels. The temporal path encoding unit performs serialization encoding on the aggregated node feature vector based on the relational paths in the candidate answer subgraph set, generating path-level feature vectors and explicitly encoding the sequential dependencies in the inference chain. The high-order logic inference unit inputs the path-level feature vectors into the graph recurrent neural network for multi-step iterative inference, generating a set of inference feature vectors, achieving deep logic inference across multiple knowledge jumps.
[0009] Furthermore, the answer generation and output module includes a feature confidence calculation unit, an answer deduplication and sorting unit, and an answer formatting output unit. The feature confidence calculation unit standardizes each feature vector in the inference feature vector set and calculates the matching confidence of each candidate answer using a preset scoring function. The scoring function is preferably a linear weighted function based on cosine similarity or Euclidean distance, with the matching confidence ranging from 0 to 1, facilitating a direct measurement of answer credibility. The answer deduplication and sorting unit sorts the candidate answers in descending order based on the matching confidence and removes duplicate answers based on a semantic similarity threshold, generating a sorted answer sequence that ensures diversity while avoiding redundant output. The answer formatting output unit concatenates the answer text from the sorted answer sequence with structured data to generate readable question-and-answer results and output them, meeting users' needs for ease of understanding and information completeness.
[0010] Through the collaborative work of the above modules, this invention can perform unified representation and deep reasoning on complex multi-source knowledge in the new energy field. While improving the recall and precision of question answering, it reduces the interference introduced by irrelevant subgraphs and effectively addresses the technical challenges in multi-hop question answering and implicit relation reasoning scenarios.
[0011] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0012] By using the hypergraph structure generation unit in the knowledge graph construction module, triplet relationships are mapped to a hypergraph structure connecting multiple entities via hyperedges. This breaks through the limitation of traditional graphs, which can only describe binary relationships between pairs of entities, and directly expresses high-order semantic combinations involving multiple entities in the new energy field, such as "generator set—output fluctuation—meteorological conditions—energy storage scheduling strategy". Based on this hyper-entity knowledge graph, the collaboration, constraints, and cascading dependencies between entities are natively preserved. During query parsing, it is no longer necessary to decompose and match complex problems separately, which significantly improves the completeness of knowledge representation and the semantic consistency of subsequent retrieval. Utilizing the multi-hop path expansion and graph similarity filtering mechanism in the dynamic subgraph retrieval module, a preset number of hop paths are expanded along the hypergraph relationship edges starting from the core entity. During the expansion process, a path pruning strategy is used to remove paths with semantic similarity below a threshold, adaptively generating a set of candidate answer subgraphs that are highly relevant to the semantics of the question. By combining the temporal path encoding unit and high-order logic reasoning unit in the graph neural network reasoning module, the relational paths within the subgraph are encoded sequentially and then input into the graph recurrent neural network for multi-step iterative reasoning. This captures the temporal evolution and causal transmission features between entities in the path, avoiding the problem of insufficient modeling of long-distance dependencies in traditional methods. In scenarios requiring multi-step associative reasoning, such as fault tracing of new energy equipment and explanation of power grid dispatching schemes, this solution can accurately extract complete reasoning chains from the hypergraph structure, effectively improving the accuracy of answer retrieval and the logical rigor of complex problems. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0014] Figure 1 This is a schematic diagram of the structure of an AI-based intelligent question-and-answer system for the new energy field.
[0015] Figure 2 It is a timing statistical characteristic curve of a voltage sensor;
[0016] Figure 3 This is a dimension-reduced distribution diagram of semantic vectors representing question-and-answer intent types in the new energy field.
[0017] Figure 4 This is a schematic diagram of node-level semantic similarity distribution;
[0018] Figure 5 This is a distribution diagram of the weight coefficients of each attention head in the multi-head graph attention mechanism. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] See Figure 1 This invention provides an AI-based intelligent question-answering system for the new energy field. The system includes a knowledge graph construction module, a query semantic parsing module, a dynamic subgraph retrieval module, a graph neural network inference module, and an answer generation and output module. The knowledge graph construction module extracts entities, relationships, and attributes from multi-source heterogeneous data in the fields of power generation, energy storage, and power grid dispatching to form a hyper-entity knowledge graph. The query semantic parsing module receives natural language questions input by the user, performs semantic parsing on the questions, and generates a query semantic vector containing the question type and core entities. The dynamic subgraph retrieval module, based on this query semantic vector, performs retrieval and subgraph extraction within the hyper-entity knowledge graph to obtain a set of candidate answer subgraphs. The graph neural network inference module performs deep semantic inference on the candidate answer subgraph set to generate a set of inference feature vectors. The answer generation and output module sorts the inference feature vector set by confidence and outputs the final answer.
[0021] Example 1:
[0022] In practice, the knowledge graph construction module includes a cross-modal data acquisition unit, an entity feature embedding unit, a dynamic semantic relationship recognition unit, and a hypergraph structure generation unit.
[0023] The cross-modal data acquisition unit collects technical documents, equipment parameter manuals, operation log data, as well as sensor time-series data and satellite remote sensing image data from the new energy field. The unit performs structured and semi-structured data fusion processing on the collected data. The fusion process is as follows: text sections in technical documents and equipment parameter manuals are parsed into structured fields, including equipment model, rated power, conversion efficiency, and operating temperature range; equipment status codes and fault information recorded by timestamps in the operation log data are extracted into a relational data table, with the timestamps aligned with the timestamps of the sensor time-series data; the sensor time-series data includes voltage, current, temperature, and vibration amplitude, recorded at a fixed sampling frequency, and its mean, variance, and peak-to-peak value are calculated using a sliding window to form a time-series feature table; satellite remote sensing image data is processed by a convolutional neural network-based target detection model to identify the bounding boxes of photovoltaic arrays, wind turbine generators, and energy storage stations in the images, and outputs geographic coordinates and coverage area, which are associated with the equipment installation location field in the equipment parameter manual. The cross-modal data acquisition unit associates the above-mentioned structured fields, time-series feature table, and target detection results with the device identifier as the primary key to generate fused semi-structured data records. Each record contains a text description field, a time-series statistics field, and a spatial information field.
[0024] The entity feature embedding unit performs entity recognition and vectorization embedding on the fused technical documents, equipment parameter manuals, and operation log data to generate initial entity feature vectors. The entity recognition process is executed using a sequence labeling model based on a pre-trained language model and a linear chain conditional random field (LCRF). The pre-trained language model uses a RoBERTa model further pre-trained on new energy domain corpora, with the LRF layer layered on top of the hidden states output by the pre-trained language model. The sequence labeling model uses the BIOES tag set, with tag types including six entity categories: equipment model, component name, parameter name, parameter value, operating status, and fault type. During training, the training data consists of 5000 manually labeled statements from the new energy domain. The training objective is to maximize the log-likelihood of correctly labeled sequences. The optimizer used is AdamW, and the learning rate is set to... The batch size is 16, and the training epochs are 15. The trained sequence labeling model receives text description fields from fused technical documents, equipment parameter manuals, and operation log data as input, and outputs entity labels corresponding to each character in the text description fields. The entity feature embedding unit determines entity boundaries based on the entity label sequence. For each identified entity, it extracts all character hidden states output from the back layer of the pre-trained language model and performs average pooling on the extracted character hidden states to obtain an initial entity feature vector of dimension 768. The entity feature embedding unit summarizes the initial entity feature vectors of all entities in each data record to form an initial entity feature vector set.
[0025] The dynamic semantic relationship recognition unit calculates the semantic correlation between entities based on the initial entity feature vectors using a self-attention mechanism, and generates a set of relation triples based on the semantic correlation. The dynamic semantic relationship recognition unit includes a self-attention module based on a Transformer encoder. This module contains six encoder layers, each with eight attention heads. Each attention head generates a query vector, key vector, and value vector from the input vector through linear projection. The linear projection weight matrix is fine-tuned on triple annotation data from the new energy field. The dynamic semantic relationship recognition unit arranges all initial entity feature vectors from the initial entity feature vector set into a sequence, inputs it into the self-attention module, and extracts the attention weight matrix of all attention heads in the last encoder layer of the self-attention module. The semantic correlation between entity i and entity j is then calculated. Calculated using the following formula:
[0026]
[0027] in, This represents the total number of attention heads contained in each encoder layer of the self-attention module. The value is 8; Indicates the first The attention weights are calculated from the query vector corresponding to entity i and the key vector corresponding to entity j in each attention head. It is obtained by scaling the dot product of the query vector and the key vector, and then normalizing it using the softmax function; The value ranges from 0 to 1. The dynamic semantic relationship recognition unit identifies the semantic relevance. With preset semantic relevance threshold Comparison, preset semantic relevance threshold By extracting relations on the validation set The value is determined by a grid search based on the metric, with a preset semantic relevance threshold. Set to 0.08. When At that time, the dynamic semantic relationship recognition unit determines that there is a semantic relationship between entity i and entity j. The dynamic semantic relationship recognition unit inputs the entity pair with the semantic relationship and its pooled joint representation from the self-attention module into a relationship classification feedforward network. This network contains two fully connected layers with a GELU activation function in between. The output dimension is the total number of predefined relationship types, which include six types: "contains," "connects," "controls," "monitors," "transforms," and "causes." The relationship type corresponding to the maximum probability output by the relationship classification feedforward network is taken as the relationship between entity i and entity j. The dynamic semantic relationship recognition unit then groups the entity pairs that satisfy the conditions and their relationships into relationship triples, and all relationship triples constitute the set of relationship triples.
[0028] The hypergraph structure generation unit maps entities and relations in a set of relation triples to a hypergraph structure, generating a hyper-entity knowledge graph. Each entity in the hypergraph structure is created as a node, with the node identifier using the entity's globally unique identifier within the knowledge graph. The relation type and participating entity set in each relation triple are created as a hyperedge, connecting all nodes corresponding to the entities in the relation triple. The hyperedge has a hyperedge identifier and attribute fields; the attribute fields record the relation type, the identifier of the original data source upon which the relation triple is based, and the generation timestamp. For complex multi-entity relations obtained by associating sensor time-series data and satellite remote sensing image data, the hyperedge connects three or more entity nodes simultaneously. The hypergraph structure generation unit persists all nodes, hyperedges, and their attributes to the graph database, forming a hyper-entity knowledge graph containing knowledge of power generation, energy storage, and grid dispatch.
[0029] See Figure 2 The figure shows the trend of voltage statistical characteristics extracted by the cross-modal data acquisition unit from sensor time-series data after sliding window processing, as the sliding window number changes. The horizontal axis represents the sliding window number, ranging from 0 to 500, and the vertical axis represents the statistical characteristic value, in volts (V). The figure includes three curves: voltage mean, voltage variance, and voltage peak-to-peak value, represented by solid blue dots, dashed red squares, and dotted green triangles, respectively.
[0030] The average voltage curve remains relatively stable, hovering around 220V, indicating that the average voltage level of the equipment was relatively stable during this period without significant fluctuations. The peak-to-peak voltage curve exhibits a periodic trend, with peak values ranging from approximately 1V to 5V, showing some short-term fluctuations and reflecting the dynamic characteristics of the equipment's operating status. The voltage variance curve has a low value, fluctuating within the range of approximately 0 to 1V, and its trend is largely consistent with the peak-to-peak curve, indicating that the dispersion of voltage fluctuations is small and the fluctuation amplitude is limited.
[0031] Example 2:
[0032] In practice, the query semantic parsing module includes a text intent encoding unit, an entity type discrimination unit, a dependency relationship extraction unit, and an intent type mapping unit.
[0033] The Text Intent Coding Unit (TIU) performs word segmentation and part-of-speech tagging on the received natural language questions. The TTU employs a dictionary-based forward maximum matching word segmentation algorithm to segment the natural language questions into words. The dictionary used is a customized dictionary containing terms from the new energy field, with 35,000 entries. After word segmentation, the TTU uses a Hidden Markov Model (HMM) to tag the segmented word sequences with part-of-speech tags. The tag set is the Chinese Pennsylvania Treebank part-of-speech tag set. The transition probability matrix and emission probability matrix of the HMM are obtained through maximum likelihood estimation on 8,000 manually annotated questions from the new energy field. The TTU utilizes a pre-trained language model to extract the semantic features of the questions and generate semantic vectors. The pre-trained language model uses a BERT-base model based on a transducer bidirectional encoder architecture. The BERT-base model contains 12 transducer encoder layers, each with a hidden vector dimension of 768, a multi-head self-attention mechanism with 12 heads, and a feedforward neural network intermediate layer with a dimension of 3072. The input to the pre-trained language model is the natural language question text itself, which begins with "[CLS]" and ends with "[SEP]". The input text is converted into a character identifier sequence by a byte-pair encoding tokenizer, and then incorporating position embedding, segment embedding, and token embedding before being fed into the transformer encoder layer. The pre-trained language model underwent domain-adaptive pre-training on a corpus of 500,000 new energy technology documents. The pre-training task was a masked language model task, with a mask probability set to 15%. The Adam optimizer was used, and the learning rate was set to [missing information]. The batch size was set to 32, and the training steps were set to 200,000. The text intent encoding unit takes the hidden state vector corresponding to the “[CLS]” marker output from the last transformer encoder layer of the pre-trained language model as the question semantic vector, and the dimension of the question semantic vector is 768.
[0034] The entity type discrimination unit takes the question semantic vector as input, identifies the core entities in the question using a conditional random field (CRF) model, and labels each core entity with an entity type label. The entity type discrimination unit incorporates a sequence labeling network, which consists of fully connected layers and linear chain CRF layers. The fully connected layer receives the hidden state vector corresponding to each character position from the encoder layer of the last transformer layer of the pre-trained language model as input. The hidden state vector has a dimension of 768. The fully connected layer outputs a hidden layer representation with a dimension of 256, and the activation function of the fully connected layer is a Gaussian error linear unit function. The output hidden layer representation of the fully connected layer is mapped to an emission score vector with a dimension equal to the number of entity label categories through a second fully connected layer. The number of entity label categories is set to 13, corresponding to six entity types plus seven boundary labels, using the BIOES labeling strategy. Entity type labels include "equipment model," "part name," "parameter name," "parameter value," "operation status," and "fault type." The linear chain CRF layer calculates the conditional probability of the label sequence based on the emission score vector output by the fully connected layer and the trainable transition score matrix. During decoding, the Viterbi algorithm is used to find the optimal label sequence. The training data for the Conditional Random Field model is a dataset constructed from manually labeled questions in 5000 question-answer pairs in the new energy field. The training objective is to maximize the log-likelihood of the correctly labeled sequences. The optimizer uses a stochastic gradient descent optimizer, and the learning rate is set to... The momentum coefficient was set to 0.9, and the iteration rounds were set to 50. The entity type discrimination unit extracts the character fragments marked as entity type labels from the label sequence obtained by decoding the conditional random field model as core entities, and at the same time obtains the entity type label corresponding to each core entity.
[0035] The dependency extraction unit analyzes the dependency grammatical relationships between words in the question based on the core entities and entity type labels, generating a question grammatical dependency tree. The dependency extraction unit includes a dual affine attention dependency parser, whose core architecture consists of a word representation layer, a bidirectional long short-term memory (LSTM) network encoding layer, and a dual affine classifier. The word representation layer takes the word-level hidden state vector output from the third-to-last transformer encoder layer of the pre-trained language model in the text intent encoding unit as input. For each word, the average pooling result of the hidden state vectors of its constituent word units is selected as the word representation vector, with a dimension of 768. The bidirectional LSM network encoding layer consists of three stacked bidirectional LSM networks. Each layer has a forward LSM network hidden dimension of 400, and the backward LSM network hidden dimension is also 400. Residual connections and layer normalization are used between each bidirectional LSM network layer. The scaling factor and offset of the layer normalization are learnable. The bidirectional LSM network encoding layer outputs the encoded word vector sequence. The dual-affine classifier generates a head word representation vector and a dependency word representation vector for each pair of words in the encoded word vector sequence through two single-layer feedforward networks. The output dimension of each single-layer feedforward network is 500, and the activation function is a modified linear unit function. The dual-affine classifier then calculates the arc score matrix and the relation label score matrix through dual-affine transformations of the head word representation vector and the dependency word representation vector. The elements of the arc score matrix represent the score for the existence of dependency arcs between words, and the elements of the relation label score matrix represent the score for a specific dependency relation type. The dual-affine attention dependency parser is trained on training data containing 100,000 Chinese dependency treebank sentences. The dependency relation types in the training data are 14 predefined dependency relations. The optimizer uses the Adam optimizer, with a learning rate set to... The batch size was set to 32, and the training epochs were set to 30. The dependency extraction unit used the trained dual affine attention dependency parser to perform dependency parsing on natural language questions. It took the parent node corresponding to the highest score for each word in the arc score matrix as the dependency arc, combined with the relation label score matrix to obtain the relation type, and constructed an initial dependency tree. Based on the initial dependency tree, the dependency extraction unit searched for nodes corresponding to core entities. Using the node corresponding to each core entity as the root, it extracted all descendant nodes starting from the root to form a question syntax dependency subtree. The entity type label corresponding to the core entity was then labeled on the corresponding node of the question syntax dependency subtree. All question syntax dependency subtrees corresponding to core entities were combined to form the question syntax dependency tree.
[0036] The intent type mapping unit matches the structural features of the question syntax dependency tree with preset question-and-answer intent templates, generating a query semantic vector containing question type and core entity information based on the matching results. The intent type mapping unit maintains a question-and-answer intent template library containing twelve preset templates, each corresponding to a question-and-answer intent type, including "equipment parameter query," "fault cause analysis," "status monitoring query," "performance comparison analysis," "control strategy query," and "topology query," among others. Each preset template is represented as a template dependency tree structure rooted at the intent core word. The nodes of the template dependency tree contain part-of-speech and entity type label restrictions. The intent type mapping unit uses a tree kernel-based similarity calculation function to match the question syntax dependency tree and the template dependency tree. The tree kernel similarity calculation function counts the number of subtrees with the same production rules in the question syntax dependency tree and the template dependency tree as the similarity value. The intent type mapping unit matches the question syntax dependency tree with all preset question-answer intent templates one by one, selecting the question-answer intent type corresponding to the preset question-answer intent template with the highest similarity value that exceeds a predetermined similarity threshold as the question type. The predetermined similarity threshold is set to 0.65. The intent type mapping unit encodes the question type into a one-hot vector, and encodes the entity text in the core entity information again into a 768-dimensional entity vector through the text intent encoding unit. The one-hot vector and the entity vector are then concatenated to generate a 780-dimensional query semantic vector.
[0037] See Figure 3 The diagram illustrates the distribution of semantic vectors generated by the intent type mapping unit in the query semantic parsing module within a two-dimensional reduced space. The horizontal axis represents the first dimension of the semantic vector after dimensionality reduction, and the vertical axis represents the second dimension. Both axes are standardized. The diagram uses different colors and shapes to identify six preset question-and-answer intent types: device parameter query (blue dot), fault cause analysis (orange square), status monitoring query (green triangle), performance comparison analysis (red diamond), control strategy query (purple inverted triangle), and topology query (brown plus sign).
[0038] As can be seen from the figure, the semantic vectors of the six question-answering intent types exhibit obvious clustering characteristics in the dimensionality reduction space. The semantic vectors for device parameter queries are mainly distributed in the region of approximately 0.0 to 0.5 on the horizontal axis and approximately 0.6 to 1.1 on the vertical axis, forming a relatively concentrated cluster of blue dots. Fault cause analysis is distributed in the region of 0.5 to 0.9 on the horizontal axis and 0.0 to 0.4 on the vertical axis, with obvious clusters of orange square dots that are clearly distinguishable from other types. Status monitoring queries are mainly concentrated in the region of 0.1 to 0.7 on the horizontal axis and 0.2 to 0.6 on the vertical axis, with relatively compact distribution of green triangle dots. Performance comparison analysis has a relatively concentrated distribution range, with the horizontal axis between 0.5 and 1.1 and the vertical axis between 0.4 and 1.0, with relatively dense red diamond dots. Control strategy queries are clustered in the lower region of -0.2 to 0.3 on the horizontal axis and -0.1 to 0.4 on the vertical axis, with purple inverted triangle dots that are clearly distinguishable from other types. The semantic vectors for topology queries are distributed in the upper region of 0.4 to 0.8 on the horizontal axis and 0.6 to 1.1 on the vertical axis, forming a cluster of brown plus signs.
[0039] Example 3:
[0040] In practice, the dynamic subgraph retrieval module includes an entity matching and localization unit, a multi-hop path expansion unit, and a graph similarity filtering unit.
[0041] The entity matching and localization unit locates entity nodes in the hyper-entity knowledge graph based on the core entities in the query semantic vector, generating an initial set of matching nodes. The unit extracts core entity information from the query semantic vector, including entity text strings and entity type tags. Using the entity text strings as query keywords, the unit performs precise matching retrieval in the node attribute index of the hyper-entity knowledge graph. The node attribute index is stored using an inverted index structure, with the key being the normalized form of the entity text string. Normalization processes include lowercase English letters, removal of leading and trailing spaces, and standardization of full-width and half-width Chinese characters. When precise matching retrieval returns no nodes, the unit uses fuzzy matching retrieval based on edit distance. With an edit distance threshold of 2, the unit calculates the edit distance between the entity text string and all entity node names in the hyper-entity knowledge graph, selecting the node with the smallest edit distance that is not greater than the edit distance threshold as the matching node. The unit filters the matching nodes obtained through precise or fuzzy matching retrieval according to their entity type tags, retaining those whose entity type tags match the entity type tags in the query semantic vector. The filtered node set constitutes the initial set of matching nodes. Each node in the initial matching node set contains a unique node identifier, node name, node type, and initial vector representation of the node in the hyper-entity knowledge graph.
[0042] The multi-hop path expansion unit starts with each node in the initial set of matched nodes and expands the path along the relation edges to generate an expanded subgraph set. Internally, the multi-hop path expansion unit maintains a path expansion queue, which uses a first-in-first-out (FIFO) scheduling strategy. Each element in the queue is a four-tuple containing the current node identifier, a list of visited node identifiers, a list of traversed relation edge identifiers, and the current hop count. During path expansion queue initialization, each node in the initial set of matched nodes constructs a four-tuple and adds it to the queue. In the four-tuple, the current node identifier is set to the unique identifier of the corresponding node, the list of visited node identifiers is initialized to contain only the current node identifier itself, the list of traversed relation edge identifiers is initialized to an empty list, and the current hop count is initialized to 0. The multi-hop path expansion unit sets the upper limit of the expansion hop count to 5 and the lower limit to 2. The multi-hop path expansion unit retrieves a quadruple from the path expansion queue and searches the hyper-entity knowledge graph for all outgoing edges originating from the current node identifier and all incoming edges associated with the current node identifier. The neighboring nodes pointed to by these outgoing and incoming edges are designated as candidate expansion nodes. For each candidate expansion node, the multi-hop path expansion unit checks if its node identifier already exists in the list of visited node identifiers. If it does, the unit skips the candidate node to eliminate loops in the path. If the node identifier is not in the list, the unit calculates the node-level semantic similarity between the candidate expansion node and the query semantic vector. The node-level semantic similarity calculation process involves calculating the cosine similarity between the initial vector representation of the candidate expansion node and the entity vector of the corresponding core entity in the query semantic vector. The cosine similarity value ranges from -1 to 1. This cosine similarity value is then mapped to the interval 0 to 1 using a linear mapping function to represent the node-level semantic similarity. The multi-hop path expansion unit compares node-level semantic similarity with a preset node similarity threshold, which is set to 0.35. This threshold is determined by scanning parameters on the validation set using retrieval recall as an indicator. When the node-level semantic similarity is lower than the preset threshold, the multi-hop path expansion unit employs a path pruning strategy, removing path branches extending from the current node to candidate expansion nodes and ceasing to add candidate expansion nodes to the path expansion queue. When the node-level semantic similarity is greater than or equal to the preset threshold, the multi-hop path expansion unit appends the node identifier of the candidate expansion node to the end of the list of visited node identifiers, appends the identifier of the relational edge connecting the current node and the candidate expansion node to the end of the list of traversed relational edge identifiers, increments the current hop count by 1, constructs a new quadruple, and adds it to the path expansion queue.The multi-hop path expansion unit continues to execute the above path expansion process until the path expansion queue is empty or the current hop count of all paths reaches 5 hops. During the path expansion process, the multi-hop path expansion unit collects lists of visited node identifiers and traversed relation edge identifiers for all paths with a current hop count between 2 and 5 hops. Based on these lists, it extracts the corresponding entity nodes and relation edges from the hyper-entity knowledge graph for each path, forming an expanded subgraph. All expanded subgraphs constitute the expanded subgraph set. Each expanded subgraph contains a node set, an edge set, and a node attribute vector, where the node attribute vector is the initial vector representation of the corresponding node in the hyper-entity knowledge graph.
[0043] The graph similarity filtering unit calculates the semantic similarity between each subgraph in the extended subgraph set and the query semantic vector, and sorts and filters them according to semantic similarity to generate a candidate answer subgraph set. For each extended subgraph in the extended subgraph set, the graph similarity filtering unit performs a subgraph representation vector extraction operation. The subgraph representation vector extraction operation is as follows: the node attribute vectors corresponding to all nodes in the extended subgraph are weighted and summed. The weight of the summation uses the node-level semantic similarity calculated for each node during the multi-hop path expansion process. The average of the weighted summation results yields a subgraph representation vector with a dimension of 768. The graph similarity filtering unit calculates the semantic similarity between the subgraph representation vector and the question semantic vector in the query semantic vector. The semantic similarity uses cosine similarity, and the calculation formula is:
[0044]
[0045] in, Subgraphs represent vectors. The dimension is 768. The Middle The numerical values of each dimension From all nodes in the extended subgraph The node attribute vector values in each dimension are obtained by weighting the average of their node-level semantic similarity. Integer and ; This represents the question semantic vector within the query semantic vector. The dimension is 768. The question semantic vector is directly provided by the text intent encoding unit output in the query semantic parsing module. This represents the vector dot product operation; Subgraph represents vector of Norm, The calculation method is as follows ; This represents the question semantic vector in the query semantic vector. of Norm, The calculation method is as follows ; The subgraph represents the cosine similarity between the vector and the query semantic vector. The value range is from -1 to 1. The graph similarity filtering unit sorts the cosine similarity values corresponding to all extended subgraphs from high to low, sets the maximum number of filters to 50, and selects the top 50 extended subgraphs with the highest cosine similarity values after sorting to form a candidate answer subgraph set. When the number of subgraphs in the extended subgraph set is less than 50, all extended subgraphs are directly used as the candidate answer subgraph set.
[0046] See Figure 4 In the graph, the vertical axis represents the frequency distribution of node-level semantic similarity, and the horizontal axis represents the node-level semantic similarity value, ranging from 0 to 1. The green bars reflect the frequency distribution of node-level semantic similarity between nodes in the hyper-entity knowledge graph and core entities in the query semantic vector. Overall, node-level semantic similarity is mainly concentrated in the range of 0 to 0.35, with the highest frequency in the range of 0 to 0.1, exceeding 160 times, showing a clear left-skewed distribution. As the similarity increases, the frequency gradually decreases, and the number of similarity nodes exceeding the 0.35 threshold decreases significantly, accounting for only a low proportion.
[0047] The red dashed line in the figure represents the preset node similarity threshold of 0.35, which is determined by the multi-hop path expansion unit in Example 3 based on the validation set retrieval recall metric. Nodes with a semantic similarity below 0.35 will be removed by the path pruning strategy and will not be included in the subgraph expansion queue, ensuring the semantic relevance and retrieval efficiency of path expansion. As can be seen from the frequency distribution in the figure, most nodes have a similarity below this threshold, indicating that only a small portion of the nodes obtained in the node matching and localization stage are highly relevant to the query semantic vector. Nodes that meet the filtering criteria are relatively rare, effectively filtering out irrelevant nodes and reducing redundant calculations in the path expansion process.
[0048] Example 4:
[0049] In its implementation, the graph neural network inference module includes a node feature initialization unit, a graph attention aggregation unit, a temporal path encoding unit, and a higher-order logic inference unit. The graph neural network inference module receives a set of candidate answer subgraphs output by the dynamic subgraph retrieval module as input. Each candidate answer subgraph in the set consists of a set of nodes, a set of edges, and a node attribute vector.
[0050] The node feature initialization unit initializes the features of each node in the candidate answer subgraph set, generating an initial node feature matrix. The unit iterates through each candidate answer subgraph, extracting the node attribute vectors of all nodes within that subgraph. These node attribute vectors are the initial vector representations of the corresponding entities in the hyper-entity knowledge graph, with a dimension of 768. The unit applies a linear transformation to the node attribute vector of each node. This linear transformation is implemented through a fully connected layer, which contains a weight matrix and a bias vector. The weight matrix has a size of 768 rows by 128 columns, and the bias vector has a length of 128. The activation function of the fully connected layer is the identity mapping. This linear transformation maps the 768-dimensional node attribute vector to 128-dimensional initial node features. After performing the above linear transformation on all nodes in the candidate answer subgraph, the unit arranges the generated initial node features by node to form an initial node feature matrix. The number of rows in the initial node feature matrix equals the number of nodes in the candidate answer subgraph, and the number of columns is 128. The weight matrix and bias vector of the fully connected layer within the node feature initialization unit are updated via backpropagation during end-to-end training of the overall question-answering system. The training data consists of 20,000 manually annotated question-answer pairs from the new energy field. The training objective is to minimize the cross-entropy loss of the answer generation output module. The Adam optimizer is used, and the learning rate is set to... The batch size is set to 8.
[0051] The graph attention aggregation unit aggregates neighbor node information from the initial node feature matrix using a multi-head attention mechanism, generating aggregated node feature vectors. Internally, the graph attention aggregation unit contains a multi-head graph attention layer. The core architecture of this layer consists of K parallel attention heads, with K being 4. Each attention head has an output dimension... The value is 64. For each node in the candidate answer subgraph, let the row vector in the initial node feature matrix corresponding to the node be denoted as . , This represents the initial node feature vector of node u. The The values of each dimension are denoted as , Integer and The graph attention aggregation unit, for each attention head, initializes the feature vector of the initial node. Through the linear projection matrix specific to the attention head and Perform linear projection to generate the query vector. Sum value vector ,in For attention head index, Take integer and At the same time, the initial node feature vector It also uses a linear projection matrix specific to another attention head. The projection is a key vector, but the calculation of the attention coefficients between nodes uses operations on the query vectors and key vectors between nodes. This is described here according to a typical graph attention mechanism. The graph attention aggregation unit calculates the attention weight coefficients of node u relative to its neighbor node v in the k-th attention head using the following formula. :
[0052]
[0053] in, Indicates the attention head index, Integer and ; This represents the initial node feature vector of node u. ; This represents the initial node feature vector of neighbor node v. Neighbor node v is a node in the candidate answer subgraph that has an edge connection with node u; Indicates the first The learnable weight matrix used to generate the query vector in each attention head; Indicates the first The learnable weight matrix used to generate the key vector in each attention head; This indicates a vector concatenation operation, which will... and Concatenate them into a vector with a dimension of 128; Indicates the first The learnable weight vector in each attention head is used to map the concatenated vector to a scalar score; express The transpose of ; LeakyReLU represents the linear unit activation function with leakage correction and a negative slope coefficient of 0.2; Indicates the first The attention weight coefficients between node u and its neighbor node v in each attention head. The values are real numbers. The graph attention aggregation unit calculates the values for all neighboring nodes of node u in the candidate answer subgraph. Then, the softmax function is used to evaluate all neighboring nodes. Normalization is performed to obtain normalized attention weights. , ,in Let represent the set of neighboring nodes of node u. The graph attention aggregation unit uses normalized attention weights and the value vectors of neighboring nodes to calculate the value of node u at the th . Aggregated output under individual attention ,in Indicates the first The learnable weight matrix used to generate the value vector in each attention head. The graph attention aggregation unit aggregates the outputs of the K attention heads. By concatenating the features, we obtain the aggregated node feature vector of node u. , The dimension is The graph attention aggregation unit performs the above operation on all nodes in all candidate answer subgraphs, generating a fully aggregated node feature vector. (Weight matrix of the multi-head graph attention layer) , , and weight vector During end-to-end training of the overall question-answering system, updates are performed via backpropagation, and the training settings are the same as those in the node feature initialization unit.
[0054] The temporal path encoding unit (TLU) serializes and encodes the aggregated node feature vectors based on the relational paths in the candidate answer subgraph set, generating path-level feature vectors. The TLU extracts all relational paths from the starting entity node to the ending entity node in each candidate answer subgraph. The starting entity node is the starting point of the path during multi-hop path expansion, and the ending entity node is the ending point. Each relational path is represented as an alternation of node sequences and relational edge sequences, with the node sequences arranged in the order the path is traversed. The TLU assembles the aggregated node feature vectors corresponding to each node in the node sequence into an input sequence. The length of the input sequence is the number of nodes on the relational path, and the vector dimension at each time step in the input sequence is 256. Internally, the TLU uses a bidirectional long short-term memory (LSTM) network, which includes a forward LSM layer and a backward LSM layer. Both the forward and backward LSM layers have 128 hidden units. The forward Long Short-Term Memory (LSTM) network layer processes the input sequence in the forward order of the node sequence, while the backward LSM network layer processes the input sequence in the reverse order of the node sequence. The bidirectional LSM network outputs forward and backward hidden states at each time step, and these are concatenated to obtain a hidden state vector of dimension 256. For the entire relation path, the temporal path encoding unit takes the forward hidden state of the last time step of the bidirectional LSM network and concatenates it with the backward hidden state of the first time step to obtain a path-level feature vector of dimension 256. The weight parameters of the bidirectional LSM network are updated through backpropagation during end-to-end training of the overall question-answering system, and the training settings are the same as those in the node feature initialization unit.
[0055] The higher-order logic reasoning unit (HRLU) inputs path-level feature vectors into the graph recurrent neural network (RNN) for multi-step iterative reasoning, generating a set of reasoning feature vectors. Internally, the HLU uses a gated recurrent unit (GRU) network as the core reasoning unit of the RNN, with an input dimension of 256 and a hidden state dimension of 256. For each path-level feature vector generated from a relation path, the HLU uses this feature vector as the initial hidden state of the GRU. The gated recurrent unit network receives the hidden state output from the previous inference step at each inference step. As input, a zero vector is also introduced as external input for the current step. The gated recurrent unit network performs a gated update and outputs the hidden state for the current step. The higher-order logic reasoning unit sets the total number of reasoning steps. The process involves three steps and three iterations to update the gated recurrent unit network, resulting in the output hidden state sequence. The higher-order logic reasoning unit will handle the three hidden states. The vectors are concatenated to generate a higher-order inference feature vector with a dimension of 768. The higher-order logic inference unit performs the above operation on the path-level feature vector of each relation path. The higher-order inference feature vectors corresponding to all relation paths are then aggregated to form the inference feature vector set. (Weight matrix of the gated recurrent unit network) The bias vectors are updated through backpropagation during end-to-end training of the overall question-answering system, and the training settings are the same as those in the node feature initialization unit.
[0056] See Figure 5 The figure shows the attention weight coefficients corresponding to the four attention heads of the multi-head graph attention layer in the graph neural network inference module. The distribution of attention heads is shown on the horizontal axis, which sequentially marks the 1st to 4th attention heads, and the vertical axis represents the corresponding attention weight coefficients. The values range from 0 to above 1. Each attention point uses scatter plots and box plots to present the specific data distribution and statistical characteristics.
[0057] As shown in the figure, the attention weight coefficients of the first attention head are relatively concentrated, ranging from approximately 0.25 to 0.40 in the box plot. The data points are dense and there are no obvious outliers, indicating that this attention head assigns relatively even weights to neighboring nodes with relatively low weights. The weight coefficients of the second attention head are slightly more dispersed than those of the first, ranging from approximately 0.35 to 0.50 in the box plot, with some points reaching higher values of approximately 0.74. This indicates that this attention head can assign higher weights to some nodes when aggregating neighboring node information, demonstrating a certain degree of differentiated attention capability. The weight coefficients of the third attention head are significantly increased, with a median value of approximately 0.60 and extending to approximately 0.90 in the box plot. The data points show that this head can give stronger attention to key neighboring nodes in the graph attention mechanism, and the overall weight distribution is more concentrated in the higher weight range than the first and second heads. The weight coefficient of the fourth attention head is further improved, with a median of close to 0.75 and a maximum value of over 1.0. The data points are also widely distributed, indicating that this attention head has the highest discriminative power and attention intensity when aggregating node features, and can significantly affect the node feature update.
[0058] Example 5:
[0059] In its implementation, the answer generation and output module includes a feature confidence calculation unit, an answer deduplication and sorting unit, and an answer formatting output unit. The answer generation and output module receives the set of inference feature vectors output by the graph neural network inference module as input. Each inference feature vector in the set corresponds to a relation path in the candidate answer subgraph, and the dimension of the inference feature vectors is 768. The answer generation and output module also receives query semantic vectors output by the query semantic parsing module. These query semantic vectors contain question semantic vectors, and the dimension of the question semantic vectors is 768.
[0060] The feature confidence calculation unit standardizes each inference feature vector in the inference feature vector set and calculates the matching confidence of each candidate answer using a preset scoring function. The feature confidence calculation unit then performs L2 normalization on each inference feature vector in the inference feature vector set and the question semantic vector in the query semantic vector. The L2 normalization process is as follows: for a vector... Calculate vector L2 norm ,vector The value of each dimension Divide by L2 norm We obtain the normalized vector components, and the normalized vector... The L2 norm is 1. The feature confidence calculation unit performs L2 normalization on each inference feature vector and question semantic vector, ensuring that the L2 norm of the normalized inference feature vector and the L2 norm of the normalized question semantic vector are both 1. The preset scoring function is a linear weighted function based on cosine similarity and Euclidean distance, which calculates the matching confidence of each candidate answer. , The calculation formula is:
[0061]
[0062] in, This represents the index number of the inference feature vector in the inference feature vector set. Integer and , This represents the total number of inference feature vectors in the inference feature vector set. This indicates the L2 normalized value of the first... Each inference feature vector , The Middle The values of each dimension are denoted as , Integer and ; This represents the question semantic vector within the query semantic vector after L2 normalization. , The Middle The values of each dimension are denoted as ; Representing vectors with vector Since both vectors have been L2 normalized, the result of the inner product operation is equal to the cosine similarity value. Representing vectors with vector The L2 norm of the difference, i.e., the Euclidean distance between two vectors, is calculated as follows: ; Represents the linear weighting coefficients. The value range is from 0 to 1. The value of is determined by performing a grid search on the validation set using answer accuracy as the evaluation metric, with a search step size of 0.05. The value is set to 0.65; Indicates the first The matching confidence of each candidate answer. The value range is from 0 to 1. The feature confidence calculation unit calculates the matching confidence for each inference feature vector in the inference feature vector set. All matching confidence scores are associated with and stored with their corresponding candidate answers.
[0063] The answer deduplication and sorting unit sorts candidate answers in descending order based on matching confidence and removes duplicate answers based on semantic similarity thresholds, generating a sorted answer sequence. The unit extracts all candidate answers and their corresponding matching confidence from the associated storage, sorting them in descending order of matching confidence value. The answer text for each candidate answer is composed of the name text and attribute value text of the endpoint entity node in the candidate answer subgraph's relational path. The name text and attribute value text of the endpoint entity node are extracted from the corresponding node attribute fields in the hyper-entity knowledge graph. The unit takes the candidate answer sequence sorted in descending order of matching confidence as input and initializes an empty list as the selected answer list. The unit directly moves the candidate answer with the highest matching confidence into the selected answer list and removes it from the candidate answer sequence. The unit then performs deduplication checks on the remaining candidate answers in the sequence one by one. The deduplication process is as follows: The answer text of the candidate answer to be determined is extracted and input into the same pre-trained language model in the text intent encoding unit. The hidden state vector corresponding to the "[CLS]" marker output from the last layer of the pre-trained language model's transformer encoder is taken as the answer text vector, with a dimension of 768. The answer deduplication ranking unit calculates the semantic similarity between the answer text vector of the candidate answer to be determined and the answer text vector of each answer in the selected answer list. The semantic similarity uses cosine similarity, calculated as the inner product of the two vectors divided by the product of their L2 norms. The answer deduplication ranking unit sets the semantic similarity threshold to 0.85, which is determined by scanning parameters on the validation set using answer deduplication accuracy as an indicator. When the cosine similarity between the answer text vector of the candidate answer to be determined and the answer text vector of any answer in the selected answer list is greater than or equal to 0.85, the answer deduplication ranking unit determines the candidate answer to be determined as a duplicate answer and removes it from the candidate answer sequence. When the cosine similarity between the text vector of the candidate answer and the text vectors of all answers in the selected answer list is less than 0.85, the answer deduplication and sorting unit moves the candidate answer to the end of the selected answer list and removes it from the candidate answer sequence. The answer deduplication and sorting unit repeats the deduplication process until the candidate answer sequence is empty. The answer deduplication and sorting unit outputs the selected answer list as the sorted answer sequence.
[0064] The answer formatting output unit concatenates the answer text with structured data from the sorted answer sequence to generate a readable question-and-answer result and outputs it. The unit iterates through each answer in the sorted sequence. For each answer, based on the node identifier of the endpoint entity node in the corresponding relationship path, it queries the hyper-entity knowledge graph for the structured data associated with the endpoint entity node. This structured data includes equipment model, rated parameters, operation status records, and timestamp information. The unit then concatenates the answer text with the structured data according to a predefined template. The predefined template format is: "Question-and-answer result: [answer text]; associated equipment parameters: [equipment model and rated parameters in structured data]; latest status: [operation status record and timestamp]". The unit returns the concatenated text string as the final readable question-and-answer result to the user interface via an application programming interface.
[0065] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. An AI-based intelligent question-and-answer system for the new energy field, characterized in that: The system includes: The knowledge graph construction module is used to extract entities, relationships, and attributes from multi-source heterogeneous data to build a super-entity knowledge graph containing knowledge of power generation, energy storage, and grid dispatch. The query semantic parsing module is used to receive natural language questions and perform semantic parsing on them to generate query semantic vectors containing question types and core entities. The dynamic subgraph retrieval module is used to retrieve and extract related subgraphs from the hyperentity knowledge graph based on the query semantic vector, and generate a set of candidate answer subgraphs; The graph neural network reasoning module is used to perform deep semantic reasoning on the candidate answer subgraph set and generate a set of reasoning feature vectors for the candidate answers. The answer generation and output module is used to sort the inference feature vector set by confidence and output the final answer.
2. The AI-based intelligent question-and-answer system for the new energy field according to claim 1, characterized in that, The knowledge graph construction module includes: A cross-modal data acquisition unit is used to collect technical documents, equipment parameter manuals, and operation log data in the field of new energy. The entity feature embedding unit is used to perform entity recognition and vectorization embedding processing on the technical documents, equipment parameter manuals and operation log data to generate an initial entity feature vector. The dynamic semantic relationship recognition unit is used to calculate the semantic relationship between entities based on the initial entity feature vector through a self-attention mechanism, and generate a set of relationship triples based on the semantic relationship. The hypergraph structure generation unit is used to map the entities and relations in the relation triple set to the hypergraph structure to generate the hyperentity knowledge graph.
3. The artificial intelligence-based intelligent question-and-answer system for the new energy field according to claim 1, characterized in that, The query semantic parsing module includes: The text intent encoding unit is used to perform word segmentation and part-of-speech tagging on natural language questions, and to extract semantic features of questions through a pre-trained language model to generate question semantic vectors; The entity type discrimination unit is used to identify the core entities and entity type labels in the problem based on the problem semantic vector and using a conditional random field model; The dependency extraction unit is used to analyze the dependency grammatical relationships between words in the question based on the core entity and entity type labels, and generate a question grammatical dependency tree. The intent type mapping unit is used to match the structural features of the question syntax dependency tree with a preset question-answer intent template to generate the query semantic vector.
4. The artificial intelligence-based intelligent question-answering system for the new energy field according to claim 1, characterized in that, The dynamic subgraph retrieval module includes: The entity matching and positioning unit is used to locate entity nodes in the hyper-entity knowledge graph based on the core entities in the query semantic vector and generate an initial set of matching nodes. A multi-hop path expansion unit is used to expand the path along the relation edge by a preset number of hops, starting from each node in the initial matching node set, to generate an expanded subgraph set. The graph similarity filtering unit is used to calculate the semantic similarity between each subgraph in the extended subgraph set and the query semantic vector, and to sort and filter according to the semantic similarity to generate the candidate answer subgraph set.
5. The artificial intelligence-based intelligent question-and-answer system for the new energy field according to claim 1, characterized in that, The graph neural network inference module includes: A node feature initialization unit is used to perform feature initialization processing on each node in the candidate answer subgraph set to generate an initial node feature matrix. The graph attention aggregation unit is used to aggregate neighbor node information of the initial node feature matrix through a multi-head attention mechanism to generate an aggregated node feature vector. The temporal path encoding unit is used to serialize and encode the aggregated node feature vector based on the relational paths in the candidate answer subgraph set to generate path-level feature vectors; A higher-order logic reasoning unit is used to input the path-level feature vector into a graph recurrent neural network for multi-step iterative reasoning to generate the inference feature vector set.
6. The artificial intelligence-based intelligent question-and-answer system for the new energy field according to claim 1, characterized in that, The answer generation output module includes: The feature confidence calculation unit is used to standardize each feature vector in the inference feature vector set and calculate the matching confidence of each candidate answer through a preset scoring function. The answer deduplication and sorting unit is used to sort the candidate answers in descending order according to the matching confidence and remove duplicate answers based on the semantic similarity threshold to generate a sorted answer sequence; The answer formatting output unit is used to concatenate the answer text in the sorted answer sequence with structured data to generate readable question-and-answer results and output them.
7. The artificial intelligence-based intelligent question-answering system for the new energy field according to claim 4, characterized in that, The preset number of hops in the multi-hop path expansion unit is 2 to 5, and a path pruning strategy is adopted during the path expansion process to remove paths with semantic similarity below a threshold.
8. The artificial intelligence-based intelligent question-and-answer system for the new energy field according to claim 5, characterized in that, The multi-head attention mechanism in the graph attention aggregation unit has 4 or 8 heads, and the output dimension of each attention head is 64 or 128 dimensions.
9. The artificial intelligence-based intelligent question-and-answer system for the new energy field according to claim 6, characterized in that, The preset scoring function is a linear weighted function based on cosine similarity or Euclidean distance, and the matching confidence value ranges from 0 to 1.
10. The artificial intelligence-based intelligent question-and-answer system for the new energy field according to claim 2, characterized in that, The cross-modal data acquisition unit is also used to acquire sensor time-series data and satellite remote sensing image data of new energy equipment, and to perform structured and semi-structured data fusion processing on them.
