Industrial intelligent question-answering method and system based on context perception and knowledge retrieval
By improving the context-aware algorithm and multi-source evidence graph technology, the problems of messy information fragments and insufficient logic in existing industrial intelligent question answering methods are solved, and structured answers that are more in line with the needs of industrial sites are generated.
Patent Information
- Application Number
- CN202610817860.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-08
- Publication Date
- 2026-07-03
AI Technical Summary
Existing industrial intelligent question answering methods fail to effectively combine user operation behavior with real-time equipment operating status, resulting in insufficient matching between search results and actual needs, and information fragments that are disorganized and lack logical consistency.
By integrating current dialogue history, user operation logs, and real-time operating status of industrial equipment through an improved context-aware algorithm, a context-enhanced query is generated. Information fragments are retrieved in parallel from multiple heterogeneous industrial knowledge sources, and credibility weighting and conflict resolution are performed to construct a multi-source evidence graph and simulate the logical chain of domain experts to generate answers.
It improves the relevance of the expression of query intent, filters out effective content that meets the query requirements, eliminates content contradictions between knowledge sources, generates answers that follow industrial professional logic, and makes the content connection more in line with industrial cognition.
Smart Images

Figure CN122334525A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial intelligent question answering technology, specifically an industrial intelligent question answering method and system based on context awareness and knowledge retrieval. Background Technology
[0002] Conventional industrial intelligent question-answering methods often rely on single or limited industrial knowledge sources for information retrieval. Their contextual processing of user queries is limited to historical dialogue text, failing to consider user actions and real-time equipment operating status within industrial scenarios. After retrieval, these methods directly concatenate the retrieved information fragments without conducting credibility assessments for multi-source information or addressing conflicts between different sources. Answer generation involves only simple text integration, failing to construct a complete reasoning chain based on the professional reasoning logic of industrial experts.
[0003] In industrial scenarios, question-and-answer needs are closely linked to equipment operating conditions and user behavior. Relying solely on dialogue history cannot fully reflect the user's true query intent, easily leading to insufficient matching between search results and actual needs. Information from heterogeneous industrial knowledge sources contains content differences and logical conflicts; using unprocessed information directly for answer generation results in disorganized content and insufficient professional logic. It is necessary to incorporate user operation logs and real-time operating status information of industrial equipment into the query processing stage to enhance context. Parallel retrieval of multiple heterogeneous industrial knowledge sources is required, along with credibility weighting and conflict resolution of the retrieved information, and the construction of an evidence graph. Simultaneously, simulating the logical chain of domain experts to complete internal reasoning supports answer generation. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art; To this end, this invention proposes an industrial intelligent question-answering method based on context awareness and knowledge retrieval, comprising: Obtain the initial natural language query statement input by the user; An improved context-aware algorithm is used to enhance the context of the initial natural language query statement to generate a context-enhanced query. The improved context-aware algorithm identifies and integrates the current dialogue history, user operation logs, and real-time operating status information of industrial equipment. Information fragments related to the context-enhanced query are retrieved in parallel from multiple heterogeneous industrial knowledge sources, including equipment manual databases, process flow diagram libraries, fault case knowledge bases, and expert experience document libraries. The retrieved information fragments are weighted by credibility and conflict resolution to construct a multi-source evidence map; Based on the multi-source evidence map, an internal reasoning process is generated, which simulates the logic chain of a domain expert; Based on the internal reasoning process described above, construct a preliminary draft of the answer; The initial draft answer is subjected to factual consistency verification and expression standardization processing to finally generate a structured answer text.
[0005] Furthermore, the step of using an improved context-aware algorithm to enhance the context of the initial natural language query statement and generate a context-enhanced query includes: Extract the core entities and core intents from the initial natural language query statement; Retrieve current dialogue history fragments associated with the core entity and calculate the semantic contribution of the current dialogue history fragments to the current query; Retrieve the operation log sequence of the user associated with the core entity within a preset time window, and extract the potential operation intent context from the operation log sequence; The operating status parameters of the physical equipment corresponding to the core entity are obtained in real time from the industrial equipment monitoring platform. The operating status parameters include the operating mode, key process variable values and alarm status. The core intent, the historical dialogue fragments with semantic contribution, the operational intent context, and the running state parameters are input into the fusion attention network. In the fusion attention network, the dynamic weights of the running state parameters and the operation intent context to the core intent are calculated, and the supplementary weights of the historical dialogue fragments to the current query semantics are calculated. By weighted fusion, the core intent is semantically expanded and conditionally constrained, and the context-enhanced query is output.
[0006] Furthermore, the improved context-aware algorithm employs the following steps when calculating the semantic contribution of historical dialogue fragments: The current dialogue history is segmented to obtain multiple historical dialogue fragments; Each historical dialogue segment is vectorized, and the core intent is also vectorized. In the vector space, calculate the cosine similarity between each historical dialogue segment vector and the core intent vector; The cosine similarity is multiplied by a dynamic decay factor, which is negatively correlated with the length of the timestamp of the corresponding historical dialogue segment from the current time. The product result is used as the semantic contribution of the corresponding historical dialogue fragment to the current query; Only historical dialogue segments with a semantic contribution exceeding a preset threshold are selected.
[0007] Furthermore, the parallel retrieval of information fragments related to the context-enhanced query from multiple heterogeneous industrial knowledge sources includes: Semantic parsing is performed on the context-enhanced query to extract multiple query sub-propositions; The query sub-propositions are converted into retrieval expressions that match various heterogeneous industrial knowledge sources. The retrieval expressions for the equipment manual database are based on equipment component codes, and the retrieval expressions for the fault case knowledge base are based on fault phenomenon keywords. The converted search terms are synchronously distributed to the corresponding heterogeneous industrial knowledge sources and search operations are executed concurrently. Receive the raw search result set returned by each heterogeneous industrial knowledge source. Each raw search result set contains several candidate information fragments and relevance scores. For candidate information fragments from different knowledge sources, preliminary sorting and deduplication are performed based on the authority level of the source knowledge source and the returned relevance score.
[0008] Furthermore, the process of weighting and resolving conflicts in the retrieved information fragments to construct a multi-source evidence map includes: Each candidate information fragment is assigned an initial credibility score, which is calculated based on the preset authority weight of its source heterogeneous industrial knowledge source, the relevance score, and the freshness of the information release time. Identify descriptions of the same fact or entity in different candidate information fragments; Comparing different descriptions of the same fact or entity, and if there are contradictions in numerical values, states, or logic, conflict resolution is triggered. The conflict resolution is accomplished through a voting mechanism, which calculates the weighted credibility sum of candidate information fragments supporting each description, and selects the description with the highest weighted credibility sum as the adopted fact; Using the adopted facts and entities as nodes, and the causal, temporal, or inclusion relationships between facts as edges, the multi-source evidence graph is constructed, and the nodes and edges in the graph are labeled with the source information fragments on which they are based and their credibility scores.
[0009] Furthermore, based on the multi-source evidence map, an internal reasoning process is generated, including: In the multi-source evidence graph, identify the starting fact nodes and the final conclusion nodes to be verified that are directly related to the context-enhanced query; In the multi-source evidence graph, search for all reachable reasoning paths from the starting fact node to the conclusion node; The coherence of each reachable reasoning path is evaluated, and the coherence is determined by the logical strength of the relationship between adjacent nodes on the path and the average credibility score of the nodes traversed by the path. Select the most coherent and accessible reasoning path as the main reasoning chain; The factual content, relationship types between nodes, and supporting evidence of each node in the main reasoning chain are extracted from the multi-source evidence graph and converted into natural language logical statements to form the internal reasoning process.
[0010] Furthermore, based on the aforementioned internal reasoning process, a preliminary draft answer is constructed, including: Design a domain-adaptive answer template library, which contains structured statement frameworks for different question and answer types; Based on the intent classification results of the context-enhanced query, a matching answer template is selected from the domain-adapted answer template library; Extract key facts, reasoning basis, and final conclusions from the internal reasoning process; Fill in the selected answer template slots with the extracted key facts, reasoning, and final conclusions. The filled template is then combined to achieve initial sentence coherence, generating the preliminary answer draft.
[0011] Furthermore, the preliminary draft answer undergoes factual consistency verification and expression standardization processing, including: Extract all core factual assertions that support the final conclusion from the aforementioned multi-source evidence map; Compare each factual statement in the preliminary draft with the core factual assertion; If a factual statement in the preliminary draft is found to directly contradict any core factual assertion, the factual statement will be replaced with the core factual assertion, and a correction log will be recorded. Check whether the wording of the preliminary draft conforms to the technical documentation standards of the industry, and replace colloquial and vague words with corresponding terms from the standard terminology database; Adjust the sentence structure to ensure that the presentation order of the answer conforms to the industrial logic expression habits of condition to conclusion and cause to effect, and generate the final structured answer text.
[0012] Furthermore, in the fusion attention network, the dynamic weights of the running state parameters and the operational intent context to the core intent are calculated, and the supplementary weights of the historical dialogue fragments to the current query semantics are calculated, including: The core intent, the running state parameters, the operation intent context, and the filtered historical dialogue fragments are respectively encoded into dense vector representations; The core intent vector is used as the attention query vector, and the running state parameter vector and the operation intent context vector are combined to form a set of key-value pairs, which are then input into a dynamic weight calculation subnetwork. In the dynamic weight calculation subnetwork, the interaction features between the running state parameter vector and the operation intention context vector and the core intention vector are calculated by a multilayer perceptron, and the interaction features are normalized into dynamic weights corresponding to the running state parameter and the operation intention context respectively based on the normalized exponential function. The vectors of the historical dialogue segments are combined into another set of key-value pairs and input into a supplementary weight calculation subnetwork. In the supplementary weight calculation subnetwork, the semantic relevance score between each historical dialogue segment vector and the core intent vector is calculated, and the score is weighted according to the time decay factor of the corresponding historical dialogue segment. Then, the weighted score is normalized to the supplementary weight of each historical dialogue segment through the normalized exponential function.
[0013] Furthermore, the present invention also includes an industrial intelligent question-answering system based on context awareness and knowledge retrieval, the system including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, it implements the steps of the industrial intelligent question-answering method based on context awareness and knowledge retrieval described above.
[0014] Compared with the prior art, the beneficial effects of the present invention are: The improved context-aware algorithm can identify and integrate current dialogue history, user operation logs, and real-time operating status information of industrial equipment. It enhances the context of the initial natural language query and generates context-enhanced queries. The contextual representation of the query can fit the actual application scenario in the industrial field, and the expression of query intent is more in line with the actual operation needs of users and the operating conditions of equipment. The context-enhanced query can more accurately connect to the retrieval dimensions of various industrial knowledge sources and reduce the problem of ambiguous query direction caused by the lack of contextual information.
[0015] This method involves parallel retrieval of relevant information fragments from multiple heterogeneous industrial knowledge sources, including equipment manual databases, process flow diagram libraries, fault case knowledge bases, and expert experience document libraries. The retrieved information fragments undergo credibility weighting and conflict resolution to construct a multi-source evidence graph. Based on this graph, the internal reasoning process of domain experts is simulated. This multi-source parallel retrieval method adapts to the heterogeneous distribution of industrial knowledge. Credibility weighting of information fragments filters out effective content that fits the query requirements. Conflict resolution eliminates content contradictions between different knowledge sources. The multi-source evidence graph integrates scattered industrial knowledge information. Simulating the internal reasoning process of expert logic chains ensures that answer generation follows the professional logic of the industrial field. The content coherence of the draft answer is more aligned with the professional cognitive logic of the industry. The factual consistency verification and expression standardization processes have a more standardized content foundation. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the steps of the industrial intelligent question-answering method based on context awareness and knowledge retrieval described in this invention. Figure 2 A flowchart for generating context-enhanced queries using an improved context-aware algorithm; Figure 3 A flowchart for parallel retrieval of information fragments from multiple heterogeneous industrial knowledge sources. Detailed Implementation
[0017] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and 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.
[0018] See Figure 1 This invention provides an industrial intelligent question-answering method based on context awareness and knowledge retrieval, the overall implementation scheme of which is as follows: The system acquires the initial natural language query input by the user through the interactive interface. An improved context-aware algorithm is activated, which enhances the context of the initial query by integrating current dialogue history, user operation logs, and real-time operating status information of industrial equipment to generate a more semantically rich and context-enhanced query with clearer constraints. Utilizing this context-enhanced query, the system simultaneously initiates retrieval requests to multiple heterogeneous industrial knowledge sources, including equipment manual databases, process flow diagram libraries, fault case knowledge bases, and expert experience document libraries, retrieving relevant information fragments in parallel. After retrieval, the system performs credibility assessment and weighting on the information fragments from different knowledge sources, resolving potential contradictions between them, and constructing a structured multi-source evidence graph. Based on this multi-source evidence graph, the system simulates the thinking process of domain experts, generating an internal reasoning process that reveals the logical chain from known facts to the final conclusion. Based on this internal reasoning process, the system constructs a preliminary draft answer. The initial draft answer needs to undergo factual consistency verification to ensure that its content is consistent with the core facts in the multi-source evidence map, and it needs to be standardized in terms of expression to conform to the technical document standards of the industry, so as to generate the final structured answer text and return it to the user.
[0019] In one embodiment of the present invention, see [reference] Figure 2The process involves extracting the core entities and core intents from the initial natural language query, using a pre-trained natural language processing model. It then retrieves the current dialogue history fragments associated with the core entities, stored in the dialogue management module's buffer. Next, it retrieves the user's operation log sequence within a preset time window, sourced from the industrial operating system's audit logs. Finally, it obtains real-time operating status parameters of the physical equipment corresponding to the core entities from the industrial equipment monitoring platform, read in real-time via industrial communication protocols, including operating modes, key process variable values, and alarm statuses. The core intent, semantically contributing historical dialogue fragments, operation intent context, and operating status parameters are input into a fusion attention network. Within this network, dynamic weights of the operating status parameters and operation intent context on the core intent are calculated, along with supplementary weights of historical dialogue fragments on the current query semantics. The dynamic weight calculation for the operating status parameters and operation intent context is performed through a dynamic weight calculation subnetwork. This subnetwork uses the core intent vector as the query and the operating status parameter vector and operation intent context vector as key-value pairs, calculating interaction features using a multilayer perceptron and then normalizing them using a normalized exponential function to obtain their respective weights. The supplementary weight calculation for historical dialogue fragments is completed through a supplementary weight calculation subnetwork. This subnetwork calculates the semantic relevance of each historical dialogue fragment vector to the core intent vector, and after weighting with a time decay factor, it is normalized through a normalized exponential function to obtain the supplementary weights. Through weighted fusion, the core intent is semantically expanded and conditionally constrained, outputting a context-enhanced query.
[0020] In the specific implementation, the core entities and core intents of the initial natural language query are extracted. This process relies on a named entity recognition model and an intent classification model that have been fine-tuned on an industrial corpus. The named entity recognition model identifies entities such as equipment codes, component names, and fault codes from the statement, while the intent classification model categorizes the query intent into predefined categories such as "fault diagnosis," "operation guidance," or "status query." The current dialogue history fragments associated with the core entities are retrieved. This is achieved by matching the core entity's identifier within a circular buffer maintained by the dialogue management module. The circular buffer stores the dialogue text and corresponding timestamps from the most recent rounds in chronological order, and the matched historical dialogue fragments are output as a text list. The operation log sequence of the user associated with the core entity within a preset time window is retrieved. The operation log sequence comes from the manufacturing execution system database, and the operation log records in the database include operator number, operating equipment identifier, operation action, operation parameters, and precise timestamps. A structured query language is used to filter out the most recent operation records related to the core entity in reverse chronological order. The system acquires real-time operational status parameters of the physical equipment corresponding to the core entity from the industrial equipment monitoring platform. This acquisition process involves subscribing to the equipment's data points via an industrial IoT gateway. The operational status parameters include enumerated values of the operating mode, real-time values of multiple key process variables, and a list of currently active alarm states. This data is transmitted after being encapsulated in key-value pair format. The core intent, semantically contributing historical dialogue fragments, operational intent context, and operational status parameters are then input into a fusion attention network, which is a customized neural network module based on the Transformer architecture.
[0021] The computation of the fusion attention network comprises two parallel sub-networks. In the dynamic weight computation sub-network, the core intent, runtime parameters, and operation intent context are first mapped by independent encoders into dense vectors of fixed dimensions, denoted as the query vector q_intent, runtime key vector k_state, operation intent context key vector k_operation, and their corresponding value vectors v_state and v_operation, respectively. The dynamic weight computation sub-network computes interaction features through a multilayer perceptron, and the formula for calculating the interaction features is: Where: symbol Indicates the first The interaction feature score between each contextual information (running status parameters or operation intent context) and the core intent, with symbols Represents a multilayer perceptron network, symbol This represents the vector concatenation operation, with the symbol... A query vector representing the core intent, symbol Indicates the first A key vector of contextual information, symbols This represents the element-wise multiplication operation of vectors. Subsequently, the interaction feature scores corresponding to the running state parameters and the operation intent context are normalized using a normalized exponential function to obtain their respective dynamic weights. and .
[0022] In the supplementary weight calculation subnetwork, the selected historical dialogue fragments are encoded into a series of fragment vectors. The supplementary weight calculation subnetwork calculates the vector for each historical dialogue segment. With core intent query vector semantic relevance base score The calculation method is vector dot product. This can be understood as the basic score for semantic relevance. It will be associated with a time decay factor Multiplication, time decay factor The calculation is based on the difference between the timestamp of the corresponding historical dialogue segment and the current time; the larger the difference, the better. The smaller the value, the higher the weighted score. After normalization using a normalized exponential function, supplementary weights for each historical dialogue segment are obtained. Optionally, time decay factor. It can be calculated using the exponential decay method.
[0023] The weighted fusion process applies the aforementioned weights to the corresponding value vectors. Information from the runtime state parameters and operational intent context is used to dynamically weight and sum their respective value vectors, thus constraining the core intent. Similarly, information from historical dialogue fragments is weighted and summed using supplementary weights to supplement the semantics of the current query. The fused representation vectors are then integrated and dimensionality-reduced via a feedforward neural network, outputting the final context-enhanced query vector representation, which will be used in subsequent knowledge retrieval steps.
[0024] In one embodiment of the present invention, the improved context-aware algorithm employs the following steps when calculating the semantic contribution of historical dialogue segments: The current dialogue history is segmented to obtain multiple historical dialogue segments, based on natural turn-taking or a preset time window. Each historical dialogue segment is vectorized, and the core intent is also vectorized. The vectorization process uses the same text encoder to ensure vector space consistency. In the vector space, the cosine similarity between each historical dialogue segment vector and the core intent vector is calculated. The cosine similarity is multiplied by a dynamic decay factor, which is negatively correlated with the length of the corresponding historical dialogue segment's timestamp from the current time; the longer the time, the smaller the decay factor. The product result is used as the semantic contribution of the corresponding historical dialogue segment to the current query. Only historical dialogue segments with semantic contributions exceeding a preset threshold are selected for subsequent fusion attention calculation.
[0025] In practice, the current dialogue history is segmented to obtain multiple historical dialogue fragments. Segmentation is based on the natural boundaries of dialogue turns. The system records each user query and system response pair in the interaction log, defining each query-response pair as an independent turn. The text content of one turn constitutes a historical dialogue fragment. Optionally, in long-duration dialogue scenarios, segmentation can also be performed based on a preset fixed time window, with the window length configured as five minutes. The system merges all continuous dialogue text occurring within the five-minute time window into a single historical dialogue fragment. Each historical dialogue fragment is vectorized, and the core intent is also vectorized. The vectorization process uses the same pre-trained sentence encoder model. The sentence encoder model maps text input of arbitrary length to a fixed-dimensional real-number vector, which represents the semantic information of the text. In the vector space, the cosine similarity between each historical dialogue segment vector and the core intent vector is calculated. The cosine similarity is calculated by dividing the dot product of the two vectors by the product of their magnitudes. The value of the cosine similarity ranges between negative one and positive one. The closer the value is to positive one, the more consistent the directions of the two vectors are and the more similar their semantics are.
[0026] The cosine similarity is multiplied by a dynamic decay factor, which is negatively correlated with the length of time elapsed between the timestamp of the corresponding historical dialogue segment and the current time. The time elapsed refers to the number of seconds elapsed from the end of the historical dialogue segment recording to the current time. In some embodiments, the dynamic decay factor is calculated using a linear decay function, defined as: Where: symbol The value of the dynamic decay factor, sign Indicates the length of time, symbol This represents a preset maximum effective time span. When the time length exceeds the maximum effective time span, the dynamic decay factor is zero. In some embodiments, the dynamic decay factor can also be calculated using an exponential decay form. It can be understood that the dynamic decay factor ensures that the semantic contribution of older dialogue history to the current query is attenuated. The product result is used as the semantic contribution of the corresponding historical dialogue segment to the current query. The product result is the arithmetic product of cosine similarity and dynamic decay factor, and this value comprehensively reflects the semantic relevance and temporal freshness of the historical dialogue segment.
[0027] Only historical dialogue segments with semantic contributions exceeding a preset threshold are selected. This preset threshold is a configurable floating-point parameter, the value of which is determined through offline experiments on a validation set. Optionally, the system maintains a contribution-ranked list, retaining only the top N historical dialogue segments with the highest semantic contributions, where N is a positive integer hyperparameter. In practice, the selected historical dialogue segments are output as a list, and these segments serve as inputs with semantic contributions, fed into the subsequent fusion attention network module for weighted fusion calculation.
[0028] In one embodiment of the present invention, information fragments related to context-enhanced queries are retrieved in parallel from multiple heterogeneous industrial knowledge sources, including the following operations. (See also...) Figure 3 The system performs semantic parsing on context-enhanced queries, extracting multiple query sub-propositions. This semantic parsing is based on domain-specific syntax rules and dependency parsing. Each query sub-proposition is then converted into a retrieval expression matching a different heterogeneous industrial knowledge source. The retrieval expression for the equipment manual database is constructed based on equipment component codes, while the retrieval expression for the fault case knowledge base is constructed based on fault phenomenon keywords and their synonyms. The converted retrieval expressions are synchronously distributed to the corresponding heterogeneous industrial knowledge sources, and the retrieval operations are executed concurrently through an asynchronous invocation mechanism. The system receives the raw retrieval result set returned by each heterogeneous industrial knowledge source. Each raw retrieval result set contains several candidate information fragments and relevance scores. For candidate information fragments from different knowledge sources, preliminary sorting and deduplication are performed based on the authority level of the source knowledge source and the returned relevance score.
[0029] In practice, context-enhanced queries undergo semantic parsing to extract multiple query sub-propositions. This parsing process is based on a parser that combines dependency parsing and semantic role labeling. The parser identifies the predicate-argument structure in the context-enhanced query and combines each core predicate and its directly associated arguments to form a query sub-proposition. For example, for the context-enhanced query "Please explain the cause of the outlet pressure fluctuation of centrifuge C-101A, currently its vibration value is too high," the parser might extract two query sub-propositions: "outlet pressure fluctuation of centrifuge C-101A" and "vibration value of centrifuge C-101A is too high." It can be understood that query sub-propositions are more granular units of information demand than the original query. These query sub-propositions are then converted into retrieval expressions that match various heterogeneous industrial knowledge sources. This conversion process relies on query builders customized for different knowledge sources. For the equipment manual database, the retrieval query is built based on equipment component codes. The query builder identifies the equipment tag number and component name mentioned in the query sub-propositions and maps them to standardized equipment component codes. Then, it constructs structured query language query conditions for the equipment manual database, such as using component codes as keywords for exact matching queries. For the fault case knowledge base, the retrieval query is built based on fault phenomenon keywords and their synonyms. The query builder uses an industry-specific thesaurus to standardize and expand the terminology of the fault phenomena described in the query sub-propositions, generating a list of query keywords for full-text search or vector search.
[0030] The transformed search query is synchronously distributed to the corresponding heterogeneous industrial knowledge sources. The distribution mechanism is implemented through a message queue or task orchestrator. The system creates an independent search task for each heterogeneous industrial knowledge source and submits these tasks in parallel to a thread pool or asynchronous task execution framework to achieve concurrent execution of search operations. The system receives the raw search result set returned by each heterogeneous industrial knowledge source. Each raw search result set contains several candidate information fragments and relevance scores. The system defines a result parsing adapter for each knowledge source. The adapter is responsible for parsing the raw data format returned by different knowledge sources and encapsulating it into a unified internal standard format. Each record in the internal standard format contains the text content of the candidate information fragment, a source identifier, and a floating-point relevance score. For candidate information fragments from different knowledge sources, preliminary sorting and deduplication are performed based on the authority level of the source knowledge source and the returned relevance score. The preliminary sorting is achieved through a weighted score. To achieve this, the calculation formula is as follows: Where: symbol The initial weighted score of the candidate information fragments is represented by the symbol. The coefficient representing the authority weight of the knowledge source, with the symbol... The symbol represents the normalized value of the authority level of the source knowledge. The coefficient representing the weight of the relevance score, with the symbol... This represents the relevance score returned from the knowledge source after max-min normalization. The system pre-assigns an authority level to each knowledge source, and the search results from different knowledge sources are initially ranked and weighted by score. They are not directly comparable. The deduplication operation is based on the semantic vector representation of candidate information fragments. By calculating the cosine similarity between vectors, fragments with similarity exceeding a threshold are considered duplicate content, and only the fragment with the highest initial weighted score is retained, as shown in Table 1.
[0031] Table 1: Configuration and Weight Setting Table for Heterogeneous Knowledge Source Retrieval In one embodiment of the present invention, each candidate information fragment is assigned an initial credibility score. This initial credibility score is calculated based on a preset authority weight of its heterogeneous industrial knowledge source, a relevance score, and the freshness of its publication time, using a weighted summation method. Descriptions of the same fact or entity in different candidate information fragments are identified, based on entity linking and attribute alignment techniques. Different descriptions of the same fact or entity are compared; if numerical, state, or logical contradictions exist, conflict resolution is triggered. Conflict resolution is accomplished through a voting mechanism, calculating the weighted credibility sum of candidate information fragments supporting each description, and selecting the description with the highest weighted credibility sum as the adopted fact. Using the adopted facts and entities as nodes, and the causal, temporal, or inclusion relationships between facts as edges, a multi-source evidence graph is constructed, and the nodes and edges in the graph are labeled with the source information fragments they are based on and their credibility scores. In the multi-source evidence graph, the starting fact node and the final conclusion node to be verified, directly related to the context-enhanced query, are identified. In the multi-source evidence graph, all reachable reasoning paths from the starting fact node to the conclusion node are searched using a graph traversal algorithm. The coherence of each reachable reasoning path is evaluated. Coherence is determined by the logical strength of the relationships between adjacent nodes on the path and the average credibility score of the nodes traversed by the path. The evaluation function is a weighted calculation. The reachable reasoning path with the highest coherence is selected as the main reasoning chain. The factual content, relationship types between nodes, and supporting evidence of each node on the main reasoning chain are extracted from the multi-source evidence graph and converted into natural language logical statements to form the internal reasoning process.
[0032] In practice, each candidate information fragment is assigned an initial credibility score. The initial credibility score is calculated based on three factors: the pre-defined authority weight of the heterogeneous industrial knowledge source, the relevance score returned by the retrieval, and the freshness of the information's publication time. The calculation method is a weighted summation, and the specific formula is as follows: Where: symbol Represents the initial credibility score, symbol This represents the normalized value of the preset authority weight of the source knowledge, with the symbol... This represents the normalized relevance score returned by the retrieval, with the symbol... Represents the freshness score based on the information's publication time, with the symbol... , , These are preset weighting coefficients. This can be understood as a score for the freshness of the information's publication time. The calculation depends on the document timestamp; the closer the timestamp is to the current time, the higher the freshness score. The higher the threshold, the better. This process identifies descriptions of the same fact or entity in different candidate information fragments. First, named entity recognition and relation extraction are performed on the candidate information fragments to construct a triplet with entities and relations as basic units. Then, entity linking technology is used to align entities pointing to the same real-world object in different fragments. The set of entity-aligned triples can be used to determine whether they describe the same fact. Different descriptions of the same fact or entity are compared. If numerical, state, or logical contradictions exist, conflict resolution is triggered. The comparison operation is performed on the entity-linked aligned triples. Contradictions include numerical values exceeding the allowable error range, mismatched state enumeration values, and inconsistent logical relations.
[0033] Conflict resolution is achieved through a voting mechanism. The weighted sum of credibility of candidate information fragments supporting each description is calculated, and the description with the highest weighted credibility sum is selected as the adopted fact. (Weighted credibility sum) The calculation formula is: in: This is the first one that supports this description. The initial credibility score of each candidate information fragment. This represents the total number of fragments supporting the description. In specific implementations, for numerical contradictions, the supporting description is defined as a set of information fragments whose values fall within the same quantification range; for state or logical contradictions, the supporting description is defined as a set of information fragments whose statements are completely consistent. Using adopted facts and entities as nodes, and causal, temporal, or inclusion relationships between facts as edges, a multi-source evidence graph is constructed. The nodes and edges in the graph are labeled with the source information fragments they are based on and their credibility scores. Causal, temporal, and inclusion relationships are extracted from the text of candidate information fragments through a relation extraction model, or inferred by the system based on rules defined in the industry domain ontology library during graph construction.
[0034] In practical implementation, the starting fact nodes and the final conclusion nodes to be verified, directly related to the context-enhanced query, are identified in the multi-source evidence graph. Starting fact nodes are those graph nodes corresponding to known conditions or observed phenomena in the context-enhanced query, while conclusion nodes are those corresponding to the final target of the query. In the multi-source evidence graph, all reachable reasoning paths from the starting fact nodes to the conclusion nodes are searched. The search algorithm employs either a depth-first search algorithm or a breadth-first search algorithm with cycle detection. The coherence of each reachable reasoning path is evaluated. The evaluation function is a weighted calculation, determined by the logical strength of the relationships between adjacent nodes along the path and the average credibility score of the nodes traversed by the path. Where: symbol The symbol represents the coherence score of the reachable reasoning path. It is a hyperparameter that balances logic strength and credibility weights, with the symbol... Indicates the first in the path The logical strength of the relationship between edges is determined by taking a value from a preset mapping table based on the relationship type, and the symbol is... Indicates the first in the path The credibility score of each node, symbol This indicates the number of nodes contained in the path. The most coherent reachable reasoning path is selected as the main reasoning chain. The factual content, relationship types between nodes, and supporting evidence for each node in the main reasoning chain are extracted from the multi-source evidence graph, and converted into natural language logical statements to form an internal reasoning process. Supporting evidence refers to a list of candidate information fragments adopted in the conflict resolution stage that support the factual description of that node. The conversion process follows a preset statement template, such as "Based on [supporting evidence], [node A fact] will lead to [node B fact]", thus forming a structured reasoning text, see Table 2.
[0035] Table 2: Conflict Resolution and Credibility Weighted Calculation Table In practice, based on the calculation results in the table above, the weighted confidence score of description 1 "wear of component A" is 1.60, which is higher than that of description 2 "aging of the sealing ring" (1.50). Therefore, "wear of component A" is adopted as a fact node. Optionally, when the difference between the weighted confidence scores of the two descriptions is less than a preset threshold, both fact descriptions can be adopted simultaneously, and parallel reasoning branches can be constructed in the multi-source evidence graph.
[0036] In one embodiment of the present invention, a domain-adaptive answer template library is designed. This library contains structured statement frameworks for different question-and-answer types, such as fault diagnosis, operation guidance, and parameter explanation templates. Based on the intent classification results of context-enhanced queries, a matching answer template is selected from the domain-adaptive answer template library. Key facts, reasoning basis, and final conclusions are extracted from the internal reasoning process. The extracted key facts, reasoning basis, and final conclusions are then filled into the slots of the selected answer templates. The filled templates undergo preliminary statement coherence combination to generate a preliminary answer draft. All core factual assertions supporting the final conclusion are extracted from a multi-source evidence graph. All factual statements in the preliminary answer draft are compared one by one with the core factual assertions. If a factual statement in the preliminary answer draft is found to directly contradict any core factual assertion, the factual statement is replaced with the core factual assertion, and a correction log is recorded. The expression in the preliminary answer draft is checked to ensure it conforms to the technical documentation specifications of the industry domain, and colloquial or vague terms are replaced with corresponding terms from a standard terminology library. Adjust the sentence structure to ensure that the presentation order of the answer conforms to the industrial logic expression habits of condition to conclusion and cause to effect, and generate the final structured answer text.
[0037] In practical implementation, a domain-adapted answer template library is designed. This library contains structured statement frames for different question-and-answer types, defined by an intent classification model, including fault diagnosis, parameter query, operation steps, cause explanation, and status description. The structured statement frames are predefined text templates containing fixed text sections and variable slots represented by placeholders. Based on the intent classification results of the context-enhanced query, a matching answer template is selected from the domain-adapted answer template library. This selection process is achieved through precise matching of query intent type and template labels. Key facts, reasoning basis, and final conclusions are extracted from the internal reasoning process. The extraction is performed on the natural language logical statements based on the internal reasoning process, completed through pattern matching and rule extraction. Key facts correspond to conditional clauses in the statements, reasoning basis corresponds to supporting evidence identifiers, and the final conclusion corresponds to the conclusion clauses in the statements.
[0038] The extracted key facts, reasoning, and final conclusions are filled into the slots of the selected answer template. In practice, key facts are filled into slots such as "Fault Phenomenon" and "Current Status," reasoning is converted to citation format and filled into the "Analysis Basis" slot, and the final conclusion is filled into slots such as "Cause" and "Result." The filled template undergoes preliminary sentence coherence combination to generate a preliminary answer draft. This preliminary sentence coherence combination includes automatic addition of conjunctions, correction of singular and plural forms, and adjustment of tense consistency to eliminate potential awkward sentences or grammatical inconsistencies in the filled template. All core factual assertions supporting the final conclusion are extracted from the multi-source evidence graph. These core factual assertions are the content stated by factual nodes that form the basis of the final conclusion and are adopted by the multi-source evidence graph, existing in the form of triples or short sentences. All factual statements in the preliminary answer draft are compared one by one with the core factual assertions. During the comparison, the preliminary answer draft is segmented and entity relations are extracted. The semantic similarity of the resulting sub-statements with the core factual assertions is calculated.
[0039] In practice, if a direct contradiction is found between the factual statements in the initial draft and any core factual assertion, the factual statements are replaced with the core factual assertions, and a correction log is recorded. The criterion for a direct contradiction is a semantic similarity score exceeding a threshold, but inconsistent entity attribute values or relationships. The initial draft is checked for compliance with industry-specific technical documentation standards, replacing colloquial or vague terms with corresponding terms from a standard terminology database. This database is a predefined industry dictionary containing mapping rules such as replacing "missed" with "leaked" and "stopped" with "stopped." The sentence structure is adjusted to ensure the answer's presentation order conforms to industry logic, moving from condition to conclusion and from cause to effect, generating the final structured answer text. This adjustment is based on preset text generation rules, which stipulate that when expressing multiple causes or steps, they should be arranged according to importance or chronological order. The process of generating the final structured answer text from the initial draft can be achieved through a standardized scoring system. To guide the direction of optimization: Where: symbol Represents standardized scoring, symbol The weighting coefficient representing the consistency of facts, with the symbol... This represents the quantitative score of factual consistency obtained through comparison, with the symbol... The symbol represents the weighting coefficient for the normativity of terms. The symbol represents the quantitative score indicating the coverage of standard terms in the text. Weighting coefficients representing logical structure, symbol This represents a quantitative score indicating whether the sentence structure conforms to a pre-defined industrial logical order. It can be understood that the system iteratively performs minor text substitutions and word order adjustments on the initial draft answer, with the goal of standardizing the scoring. Reaching a preset threshold or a local optimum.
[0040] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. An industrial intelligent question-answering method based on context awareness and knowledge retrieval, characterized in that, The method includes: Obtain the initial natural language query statement input by the user; An improved context-aware algorithm is used to enhance the context of the initial natural language query statement to generate a context-enhanced query. The improved context-aware algorithm identifies and integrates the current dialogue history, user operation logs, and real-time operating status information of industrial equipment. Information fragments related to the context-enhanced query are retrieved in parallel from multiple heterogeneous industrial knowledge sources, including equipment manual databases, process flow diagram libraries, fault case knowledge bases, and expert experience document libraries. The retrieved information fragments are weighted by credibility and conflict resolution to construct a multi-source evidence map; Based on the multi-source evidence map, an internal reasoning process is generated, which simulates the logic chain of a domain expert; Based on the internal reasoning process described above, construct a preliminary draft of the answer; The initial draft answer is subjected to factual consistency verification and expression standardization processing to finally generate a structured answer text.
2. The industrial intelligent question answering method based on context awareness and knowledge retrieval as described in claim 1, characterized in that, The step of using an improved context-aware algorithm to enhance the context of the initial natural language query statement and generate a context-enhanced query includes: Extract the core entities and core intents from the initial natural language query statement; Retrieve current dialogue history fragments associated with the core entity and calculate the semantic contribution of the current dialogue history fragments to the current query; Retrieve the operation log sequence of the user associated with the core entity within a preset time window, and extract the potential operation intent context from the operation log sequence; The operating status parameters of the physical equipment corresponding to the core entity are obtained in real time from the industrial equipment monitoring platform. The operating status parameters include the operating mode, key process variable values and alarm status. The core intent, the historical dialogue fragments with semantic contribution, the operational intent context, and the running state parameters are input into the fusion attention network. In the fusion attention network, the dynamic weights of the running state parameters and the operation intent context to the core intent are calculated, and the supplementary weights of the historical dialogue fragments to the current query semantics are calculated. By weighted fusion, the core intent is semantically expanded and conditionally constrained, and the context-enhanced query is output.
3. The industrial intelligent question answering method based on context awareness and knowledge retrieval as described in claim 2, characterized in that, The improved context-aware algorithm employs the following steps when calculating the semantic contribution of historical dialogue fragments: The current dialogue history is segmented to obtain multiple historical dialogue fragments; Each historical dialogue segment is vectorized, and the core intent is also vectorized. In the vector space, calculate the cosine similarity between each historical dialogue segment vector and the core intent vector; The cosine similarity is multiplied by a dynamic decay factor, which is negatively correlated with the length of the timestamp of the corresponding historical dialogue segment from the current time. The product result is used as the semantic contribution of the corresponding historical dialogue fragment to the current query; Only historical dialogue segments with a semantic contribution exceeding a preset threshold are selected.
4. The industrial intelligent question answering method based on context awareness and knowledge retrieval as described in claim 1, characterized in that, The parallel retrieval of information fragments related to the context-enhanced query from multiple heterogeneous industrial knowledge sources includes: Semantic parsing is performed on the context-enhanced query to extract multiple query sub-propositions; The query sub-propositions are converted into retrieval expressions that match various heterogeneous industrial knowledge sources. The retrieval expressions for the equipment manual database are based on equipment component codes, and the retrieval expressions for the fault case knowledge base are based on fault phenomenon keywords. The converted search terms are synchronously distributed to the corresponding heterogeneous industrial knowledge sources and search operations are executed concurrently. Receive the raw search result set returned by each heterogeneous industrial knowledge source. Each raw search result set contains several candidate information fragments and relevance scores. For candidate information fragments from different knowledge sources, preliminary sorting and deduplication are performed based on the authority level of the source knowledge source and the returned relevance score.
5. The industrial intelligent question answering method based on context awareness and knowledge retrieval as described in claim 4, characterized in that, The process of weighting and resolving conflicts in the retrieved information fragments to construct a multi-source evidence map includes: Each candidate information fragment is assigned an initial credibility score, which is calculated based on the preset authority weight of its heterogeneous industrial knowledge source, the relevance score, and the freshness of the information release time. Identify descriptions of the same fact or entity in different candidate information fragments; Comparing different descriptions of the same fact or entity, and if there are contradictions in numerical values, states, or logic, conflict resolution is triggered. The conflict resolution is accomplished through a voting mechanism, which calculates the weighted credibility sum of candidate information fragments supporting each description, and selects the description with the highest weighted credibility sum as the adopted fact; Using the adopted facts and entities as nodes, and the causal, temporal, or inclusion relationships between facts as edges, the multi-source evidence graph is constructed, and the nodes and edges in the graph are labeled with the source information fragments on which they are based and their credibility scores.
6. The industrial intelligent question answering method based on context awareness and knowledge retrieval as described in claim 5, characterized in that, Based on the multi-source evidence map, an internal reasoning process is generated, including: In the multi-source evidence graph, identify the starting fact nodes and the final conclusion nodes to be verified that are directly related to the context-enhanced query; In the multi-source evidence graph, search for all reachable reasoning paths from the starting fact node to the conclusion node; The coherence of each reachable reasoning path is evaluated, and the coherence is determined by the logical strength of the relationship between adjacent nodes on the path and the average credibility score of the nodes traversed by the path. Select the most coherent and accessible reasoning path as the main reasoning chain; The factual content, relationship types between nodes, and supporting evidence of each node in the main reasoning chain are extracted from the multi-source evidence graph and converted into natural language logical statements to form the internal reasoning process.
7. The industrial intelligent question answering method based on context awareness and knowledge retrieval as described in claim 6, characterized in that, Based on the internal reasoning process, a preliminary draft answer is constructed, including: Design a domain-adaptive answer template library, which contains structured statement frameworks for different question and answer types; Based on the intent classification results of the context-enhanced query, a matching answer template is selected from the domain-adapted answer template library; Extract key facts, reasoning basis, and final conclusions from the internal reasoning process; Fill in the selected answer template slots with the extracted key facts, reasoning, and final conclusions. The filled template is then combined to achieve initial sentence coherence, generating the preliminary answer draft.
8. The industrial intelligent question answering method based on context awareness and knowledge retrieval as described in claim 7, characterized in that, The preliminary draft answer was subjected to factual consistency verification and expression standardization processing, including: Extract all core factual assertions that support the final conclusion from the aforementioned multi-source evidence map; Compare each factual statement in the preliminary draft with the core factual assertions; If a factual statement in the preliminary draft is found to directly contradict any core factual assertion, the factual statement will be replaced with the core factual assertion, and a correction log will be recorded. Check whether the wording of the preliminary draft conforms to the technical documentation standards of the industry, and replace colloquial and vague words with corresponding terms from the standard terminology database; Adjust the sentence structure to ensure that the presentation order of the answer conforms to the industrial logic expression habits of condition to conclusion and cause to effect, and generate the final structured answer text.
9. The industrial intelligent question answering method based on context awareness and knowledge retrieval as described in claim 3, characterized in that, In the fusion attention network, the dynamic weights of the running state parameters and the operation intent context to the core intent are calculated, and the supplementary weights of the historical dialogue fragments to the current query semantics are calculated, including: The core intent, the running status parameters, the operation intent context, and the filtered historical dialogue fragments are respectively encoded into dense vector representations; The core intent vector is used as the attention query vector, and the running state parameter vector and the operation intent context vector are combined to form a set of key-value pairs, which are then input into a dynamic weight calculation subnetwork. In the dynamic weight calculation subnetwork, the interaction features between the running state parameter vector and the operation intention context vector and the core intention vector are calculated by a multilayer perceptron, and the interaction features are normalized into dynamic weights corresponding to the running state parameter and the operation intention context respectively based on the normalized exponential function. The vectors of the historical dialogue segments are combined into another set of key-value pairs and input into a supplementary weight calculation subnetwork. In the supplementary weight calculation subnetwork, the semantic relevance score between each historical dialogue segment vector and the core intent vector is calculated, and the score is weighted according to the time decay factor of the corresponding historical dialogue segment. Then, the weighted score is normalized to the supplementary weight of each historical dialogue segment through the normalized exponential function.
10. An industrial intelligent question-answering system based on context awareness and knowledge retrieval, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the industrial intelligent question answering method based on context awareness and knowledge retrieval as described in any one of claims 1 to 9.
