An intelligent question and answer interaction service optimization method based on artificial intelligence
Patent Information
- Application Number
- CN202611228301.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]针对现有技术的不足,本发明提供了一种基于人工智能的智能问答交互服务优化方法,解决了现有大语言模型在多轮问答推演中逻辑容易发散导致诊断难以收敛,生成操作指引时缺乏完整性与时序验证导致容易下发错误指令以及在输出内容异常时缺少底层降级隔离机制从而无法保障高危场景交互安全性的问题
[0069]1、本发明通过将自然语言交互映射至本体状态图,并执行无环化拓扑变换与级联失效传播计算生成残余诊断图,进而结合信息熵降幅指标与动态核查代价确定追问目标节点,利用图谱拓扑推导与数学代价计算机制,将非确定的自然语言意图转换为可量化的状态推演过程,使得多轮问答交互直接收敛于目标诊断路径,隔离了大语言模型在逻辑推理阶段的发散缺陷,提升了复杂工况下故障定位的准确度与问答效率。
Smart Images

Figure CN123012114A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to an optimization method for intelligent question-and-answer interaction services based on artificial intelligence. Background Technology
[0002] In recent years, large language models have been widely used in various intelligent question-and-answer interaction services, providing corresponding answers and guidance based on the natural language input by users. However, when dealing with intelligent question-and-answer interactions under complex conditions, existing models rely on probability distributions for semantic generation, lacking a deterministic logical guidance mechanism when facing multi-round diagnostic deductions. Because the investigation costs and information gains during the deduction process cannot be quantified, the model is prone to divergence in the logical reasoning stage, making it difficult for multi-round question-and-answer interactions to quickly converge to the true target diagnostic path, thus reducing the accuracy of fault location and question-and-answer efficiency under complex conditions.
[0003] When generating specific standard operating instructions, existing models rely on semantic associations of context to concatenate text, lacking numerical verification of the underlying operational logic and execution order. This results in frequent omissions of operational steps, generation of irrelevant instructions, or reversed execution order in the natural language responses output by the models. Because the system directly outputs the text generated by the model, it lacks integrity and temporal conflict detection based on underlying partial order relationships. When incorrect text is generated, erroneous operating instructions are directly sent to the human-computer interaction terminal.
[0004] Existing question-and-answer interaction architectures lack underlying degradation and isolation mechanisms for model output anomalies. When logical errors or non-compliance with specifications are detected in the content generated by the model, the system can only request the model to regenerate the text, failing to block the transmission of unreliable data at the physical or system link level. In high-risk operations or specialized scenarios, this approach cannot avoid the risk of erroneous data residing in the system cache, making it difficult to guarantee the physical safety of equipment and operators under extreme conditions. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an optimization method for intelligent question-and-answer interaction services based on artificial intelligence. This method solves the problems of existing large language models, such as logical divergence in multi-round question-and-answer deduction leading to difficulty in convergence of diagnosis, lack of completeness and timing verification in generating operation instructions leading to easy issuance of erroneous instructions, and lack of underlying degradation isolation mechanism when output content is abnormal, thus failing to guarantee the security of interaction in high-risk scenarios.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] This invention provides a method for optimizing intelligent question-answering interaction services based on artificial intelligence, comprising the following steps:
[0008] Receive the natural language interaction sequence from the human-computer interaction terminal and map it to the pre-constructed ontology state graph, and output the positive activation node set and the negative state node set;
[0009] Perform a topology transformation on the ontology state diagram, and use the negative state node set to perform cascaded failure propagation calculations to generate a residual diagnostic diagram;
[0010] In the residual diagnostic graph, a set of candidate diagnostic paths is extracted using the set of positively activated nodes. A set of unconfirmed state dependent nodes is extracted based on the set of candidate diagnostic paths. When the set of unconfirmed state dependent nodes is not empty, the target node for follow-up inquiry is determined and a prompt is initiated. The state update is performed repeatedly to make the set of candidate diagnostic paths converge until the target diagnostic path is locked.
[0011] Extract the structured SOP sequence associated with the target diagnostic path, construct an action identifier set, and constrain the large language model to generate candidate natural language response text containing the action identifier set;
[0012] The candidate natural language response text is subjected to action identifier consistency verification and timing reverse order conflict detection. If the verification passes, the candidate natural language response text is output to complete the question-and-answer interaction. If the verification fails, the output link is cleared and the structured SOP form is forcibly downgraded based on the structured SOP sequence and output. The human-computer interaction terminal presents the form to the user for confirmation and reference to perform the corresponding standard operation.
[0013] Preferably, the step of receiving the natural language interaction sequence from the human-computer interaction terminal and mapping it to a pre-constructed ontology state graph, and outputting a set of positively activated nodes and a set of negatively activated nodes, includes:
[0014] Feature extraction and intent classification are performed on the natural language interaction sequence, and the classification results are mapped to the ontology state graph;
[0015] The pre-trained intent classification model outputs a classification probability distribution vector. When the label with the highest output probability is the intent label of an abnormal occurrence, the corresponding mapping node is assigned to the set of positive activation nodes.
[0016] When the label with the highest output probability is a normal intent label or an abnormal intent label is excluded, the corresponding mapping node is assigned to the initial negative node candidate set.
[0017] Calculate the semantic confidence scalar of the nodes within the initial negative node candidate set, and after filtering by the confidence threshold, merge the nodes that meet the deterministic filtering threshold into the negative state node set.
[0018] Preferably, performing a topological transformation on the ontology state diagram includes:
[0019] Perform strongly connected component contraction and acyclic topology transformation on the ontology state graph;
[0020] A graph search algorithm is used to extract all strongly connected component combinations from the ontology state graph to generate a strongly connected component set.
[0021] For each strongly connected component in the set of strongly connected components, construct a corresponding equivalent macro node;
[0022] A node shrinking mapping function is constructed to map the nodes in the ontology state graph to the corresponding equivalent macro nodes;
[0023] By retaining directed edges that span different equivalent macro nodes and removing directed edges inside strongly connected components, a directed acyclic graph with equivalent macro nodes is generated.
[0024] Preferably, the residual diagnostic map is generated by performing cascading failure propagation calculations using the set of negative state nodes, including:
[0025] Each node in the negative state node set is transformed into a negative macro node set through the node shrinking mapping function;
[0026] Perform state initialization operation on the directed acyclic graph of the equivalent macro nodes, and retrieve the causal dependency type identifier of the internal nodes of the ontology state graph;
[0027] Taking the nodes in the negative macro node set as the starting point of derivation, the applicable joint triggering causal logic or any triggering causal logic is determined according to the causal dependency type identifier, and cascaded state derivation is performed on the nodes to update the node propagation state value.
[0028] A set of security interception nodes is generated by selecting the nodes whose propagation state value is normal after derivation.
[0029] The passage cost weight of the directed edge whose starting node is located inside the set of security interception nodes is forcibly updated to an infinite value, and the residual diagnostic graph is generated based on the updated passage cost weight distribution.
[0030] Preferably, the set of unconfirmed state dependent nodes is extracted based on the candidate diagnostic path set, including:
[0031] The nodes in the set of positively activated macro nodes generated by the mapping transformation are used as traversal source points to trigger a depth-first search in the residual diagnostic graph;
[0032] When the passage cost weight of the extended edge is detected to be equal to positive infinity, the forward search operation of the current branch is stopped and the state backtracking logic is triggered.
[0033] The directed node sequence recorded when the search path reaches the corresponding endpoint is encapsulated and integrated to generate the candidate diagnostic path set;
[0034] Extract the equivalent macro nodes contained in the candidate diagnostic path set and restore and unpack them to generate a global dependency node set based on the basic physical nodes;
[0035] Read the set of instantiated nodes from the session state cache;
[0036] After performing an intersection operation between the global dependency node set and the predefined queryable node set, the instantiated node set is stripped to generate the unconfirmed state dependency node set.
[0037] Preferably, when the set of nodes dependent on the unconfirmed state is not empty, determining the target node for follow-up inquiry and initiating a prompt includes:
[0038] Obtain real-time operating condition data to calculate dynamic verification costs and information entropy reduction indicators;
[0039] Calculate the basic information entropy of the current diagnostic space based on the total number of candidate paths, and calculate the conditional information entropy after assuming the acquisition of the state of the nodes that depend on the unconfirmed state.
[0040] The numerical difference between the basic information entropy and the conditional information entropy is calculated as the information entropy reduction index.
[0041] The dangerous operating condition characteristic values collected in real time by the sensor are retrieved as the real-time operating condition data, and the dynamic penalty coefficient combined with the engineering safety critical threshold is calculated using the operating condition mapping formula.
[0042] Obtain the pre-quantized basic verification cost of the corresponding node, and perform a multiplication operation between the basic verification cost and the dynamic penalty coefficient to obtain the dynamic verification cost;
[0043] Calculate the ratio of the information entropy reduction index to the expected cost of the dynamic verification cost, and extract the node with the largest expected cost ratio as the target node for follow-up inquiry.
[0044] Preferably, the structured SOP sequence associated with the target diagnostic path is extracted, an action identifier set is constructed, and a large language model is constrained to generate candidate natural language response text containing the action identifier set, including:
[0045] Extract the standard operating procedure parameters and handling instruction text that must be performed to address the cause of the fault, and arrange them in chronological order to generate the structured SOP sequence;
[0046] For each independent operation instruction in the structured SOP sequence, a corresponding action identifier is generated by combining a hash function with the order index and the system timestamp;
[0047] Combine all action identifiers to construct an immutable set of action identifiers within the session and assign them to corresponding independent operation instructions;
[0048] Construct a key-value pair mapping table to bind the action identifier with the independent operation instruction;
[0049] The structured SOP sequence and the action identifier set are assembled into a structured prompt word text, which is then input into the large language model to constrain the large language model to generate the candidate natural language response text.
[0050] Preferably, performing action identifier consistency verification on the candidate natural language response text includes:
[0051] The regular expression matching unit is invoked to perform a full scan of the candidate natural language response text, extracting strings to construct the actual generated identifier set;
[0052] The actual generated identifier set and the action identifier set are loaded into the computation cache and a bidirectional set difference operation is performed.
[0053] Obtain the set of omitted identifiers and the set of redundant identifiers in the output after the operation;
[0054] When the set of missing identifiers or the set of redundant identifiers is not empty, the consistency check of the action identifier is determined to have failed and an entity check exception signal is triggered.
[0055] Preferably, the timing reversal conflict detection includes:
[0056] The dependency parser is invoked to parse the candidate natural language response text and generate a dependency parsing tree representing the dominance relationships between words;
[0057] Locate the lexical node containing the action identifier in the dependency syntax tree, and extract the modification features by tracing upwards along the dependency arc;
[0058] The modification features are converted into time offsets according to a preset time sequence rule mapping table;
[0059] Extract the initial position index of the action identifier in the original text stream and sum it with the time offset to generate a comprehensive time weight;
[0060] All action identifiers are rearranged in ascending order based on the comprehensive time weight, and an execution sequence number is assigned to each action.
[0061] Parse the internal operational dependencies of the structured SOP sequence to generate a standard partial order relation set;
[0062] For the standard partial order relation set, compare the action execution order label to perform reverse order conflict calculation. When the total number of reverse order conflicts is greater than zero, trigger a reverse order conflict exception signal.
[0063] Preferably, the step of performing output link clearing processing and forcibly downgrading the output structured SOP form based on the structured SOP sequence when the pass is not achieved includes:
[0064] When the action identifier consistency check or the timing reverse conflict detection fails, the candidate natural language response text is forcibly deleted from the internal output queue, session state cache and front-end pending send buffer of the intelligent question answering interaction service system, and data overwrite and reference release operations are performed to complete the output link clearing process.
[0065] Extract the underlying hard-coded data of action names, safety operation parameter thresholds, and physical execution locations contained within the structured SOP sequence;
[0066] The underlying hard-coded data is sequentially filled into a preset static structured SOP form template to generate the structured SOP form.
[0067] The structured SOP form is output to the human-computer interaction terminal for user confirmation and reference, and downlink communication link isolation is performed in the read-only data acquisition channel.
[0068] This invention provides an optimization method for intelligent question-answering interaction services based on artificial intelligence, which has the following beneficial effects:
[0069] 1. This invention maps natural language interactions to an ontology state graph, performs acyclic topology transformation and cascaded failure propagation calculation to generate a residual diagnostic graph, and then combines information entropy reduction index and dynamic verification cost to determine the target node for follow-up questioning. By using graph topology derivation and mathematical cost calculation mechanism, the uncertain natural language intent is transformed into a quantifiable state deduction process, so that multi-round question-and-answer interactions directly converge to the target diagnostic path. This isolates the divergence defects of large language models in the logical reasoning stage and improves the accuracy of fault location and question-and-answer efficiency under complex working conditions.
[0070] 2. This invention generates response text by extracting structured SOP sequences to construct action identifier sets to constrain a large language model, and calls a dependency parser to generate a comprehensive time weight based on time offsets. Then, it compares the standard partial order relation set to perform reverse order conflict calculation. By using identifier set difference operations and a conflict detection mechanism based on temporal partial order relations, the system can determine whether there are missing steps, fabricated steps, or reversed execution order in the natural language response through numerical verification, thereby avoiding the issuance of erroneous operation guidance to the human-computer interaction terminal.
[0071] 3. When the consistency check of the action identifier or the timing reversal conflict detection fails, the present invention performs data overwriting and reference release to complete the output link clearing process, and extracts the underlying hard-coded data to forcibly downgrade and generate a static structured SOP form. Combined with the read-only data acquisition channel to perform downlink communication link isolation, a forced security degradation mechanism is constructed at the underlying level. When the model-generated content does not conform to the logical specifications, the system blocks the transmission of natural language text and degrades the output of the basic static form, ensuring the physical bottom-line safety of human-computer interaction in high-risk operations or professional operation scenarios. Attached Figure Description
[0072] Figure 1 This is a schematic diagram of the structure of an intelligent question-answering interaction service optimization system based on artificial intelligence according to the present invention;
[0073] Figure 2 This is a flowchart illustrating the overall process of an AI-based intelligent question-answering interaction service optimization method according to the present invention.
[0074] Figure 3 This is a flowchart illustrating the natural language intent parsing and graph state entity filtering performed by the present invention;
[0075] Figure 4 This is a flowchart illustrating the generation of residual diagnostic maps based on topological transformation and cascade failure calculation in this invention.
[0076] Figure 5 This is a flowchart illustrating the process of candidate path search and reverse query closed-loop scheduling to lock the target path in this invention.
[0077] Figure 6 This is a flowchart illustrating the generation of an interaction draft based on an action identifier-injected constraint large language model according to the present invention.
[0078] Figure 7 This is a flowchart illustrating the output consistency check and security degradation decision-making process of this invention.
[0079] Figure 8 This is a graph showing the change of the dynamic penalty coefficient of this invention with environmental characteristic values;
[0080] Figure 9 This is a comparison chart of various evaluation indicators for candidate nodes in this invention. Detailed Implementation
[0081] The technical solutions in 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, 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.
[0082] See attached document Figure 1 This invention provides an AI-based intelligent question-and-answer interaction service optimization system. The system specifically includes an intelligent question-and-answer server, a semantic parsing module, a graph computing module, a follow-up question scheduling module, a text generation module, and a consistency verification module. The system execution environment is deployed on the intelligent question-and-answer server outside the industrial isolation gateway. A read-only data acquisition channel is established between the intelligent question-and-answer server and the industrial control network. The intelligent question-and-answer server is configured with this read-only data acquisition channel to continuously collect real-time operating condition data of physical devices, and at the network configuration level, sending device control commands or execution messages to the industrial control system is prohibited.
[0083] The semantic parsing module is used to receive natural language interaction sequences from the human-computer interaction terminal, extract text features and map them to the ontology state graph, perform confidence threshold filtering, and output a set of positively activated nodes and a set of negatively activated nodes.
[0084] The graph computation module is used to perform strongly connected component shrinkage and acyclic topology transformation on the ontology state graph, and to perform cascaded failure propagation computation based on the negative state node set and the causal dependency type identifier of the nodes to generate a residual diagnostic graph.
[0085] The follow-up scheduling module is used to obtain the set of candidate diagnostic paths and the set of unconfirmed state dependent nodes. When the set of unconfirmed state dependent nodes is not empty, it calculates the dynamic verification cost and information entropy reduction index by combining real-time operating condition data, determines the target node for follow-up, and outputs the status confirmation prompt to the human-computer interaction terminal. The scheduling is executed in a loop until the target diagnostic path or the set of candidate target diagnostic paths is determined.
[0086] The text generation module is used to extract the structured standard operating procedure (SOP) sequence associated with the target diagnostic path, construct an in-session immutable action identifier set, and constrain the large language model to generate candidate natural language response text containing the action identifier set.
[0087] The consistency verification module is used to perform action identifier consistency verification and timing reverse order conflict detection on the candidate natural language response text. When the verification passes, the candidate natural language response text is output. When the verification fails, the output link of the candidate natural language response text is cleared and the structured SOP sequence is forcibly downgraded to the form of a structured SOP form.
[0088] See attached document Figure 2 This invention provides a method for optimizing intelligent question-answering interaction services based on artificial intelligence, comprising the following steps:
[0089] S100 performs natural language intent parsing and graph state entity filtering. It receives natural language interaction sequences from the human-computer interaction terminal, performs feature extraction and intent classification on the natural language interaction sequences, maps the results to the ontology state graph, and outputs a set of positively activated nodes and a set of negatively state nodes after filtering by a confidence threshold.
[0090] S200 generates a residual diagnostic graph based on topology transformation and cascade failure calculation. It performs strongly connected component contraction and acyclic topology transformation on the ontology state graph, and uses the set of negative state nodes and the causal dependency type identifiers of the nodes to perform cascade failure propagation calculation, generating a residual diagnostic graph associated with the current diagnostic task.
[0091] S300 executes candidate path search and reverse inquiry closed-loop scheduling to lock the target path. A depth-first search is performed in the residual diagnostic graph to extract a set of candidate diagnostic paths. An unconfirmed state dependency node set is extracted by comparing system state cache records. The diagnostic conclusion generation process is paused when the unconfirmed state dependency node set is not empty. Real-time operating condition data is obtained to calculate the dynamic verification cost and information entropy reduction index. The target node for inquiry is determined, and a status confirmation prompt is output to the interactive terminal. Status updates are performed repeatedly until the target diagnostic path or the set of target diagnostic paths is locked.
[0092] S400 generates candidate response text based on a large language model constrained by action identifier injection. It extracts the structured SOP sequence associated with the target diagnostic path, constructs a session-invariant set of action identifiers and assigns them to corresponding independent operation instructions, and combines this with a large language model constrained by structured prompt text to generate candidate natural language response text containing the action identifier set.
[0093] The S500 performs output consistency checks and security degradation decisions. It uses a regular expression matching unit to perform action identifier consistency checks on candidate natural language response texts. It calls a dependency parsing algorithm to extract the action execution order and performs temporal inversion conflict detection against a standard partial order relation set. If all detection indicators meet the passing standards, the candidate natural language response text is output to the human-computer interaction terminal. If any step fails, the output link of the candidate natural language response text is cleared, and a forced degradation is performed, outputting a structured SOP sequence in the form of a structured SOP form. This sequence is presented to the user on the human-computer interaction terminal for confirmation and reference before executing the corresponding standard operation.
[0094] The following section will elaborate on the specific implementation details of the technical solution of this invention, based on the working principles of each module of the system.
[0095] See attached document Figure 3 The specific implementation of the method provided by the present invention in step S100, which performs natural language intent parsing and graph state entity filtering, includes the following execution steps:
[0096] S101, Construct and initialize the ontology state diagram. The system's underlying layer constructs an ontology state diagram to represent the physical operating logic of industrial equipment, defined as follows: ,in Represents the set of vertices. Represents the set of edges.
[0097] Body state diagram vertex set in Configured as a union of multiple entity types, the specific logic is as follows:
[0098] ;
[0099] In the formula, The union operation represents the set representation; A set of nodes representing fault phenomena; The set of nodes representing environmental parameters; The set of nodes representing device status; Represents the set of root cause nodes; This represents the set of nodes for standard operating procedures. The basic entity type boundaries of the ontology state diagram are established through the above union partitioning, enabling a structured digital mapping of the underlying physical devices.
[0100] Body state diagram edge set in Used to characterize causal transitive dependencies or execution-time dependencies between vertices. The system targets a set of vertices. Each node in All have a pre-defined causal dependency type identifier. Here, Representing the set of vertices A positive integer index identifier for the internal node. The range of values for the causal dependency type identifier is limited to:
[0101] ;
[0102] In the formula, A mathematical representation of the membership of an element in a set; The joint triggering causal logic is used to define a node as failing only if all upstream associated nodes maintain the possibility of failure propagation (i.e., triggering failure). It represents any triggering causal logic, used to define that a node can be determined as failed when any of the upstream associated nodes maintains the possibility of fault propagation.
[0103] S102, performs feature extraction and initial state classification of the natural language interaction sequence. The semantic parsing module receives the natural language interaction sequence from the human-computer interaction terminal. Then, on the natural language interaction sequence Execution feature extraction and intent classification.
[0104] The semantic parsing module incorporates a pre-trained sequence labeling model and an intent classification model. The sequence labeling model employs a network structure including a word embedding layer, a bidirectional long short-term memory network layer, and a conditional random field layer. The word embedding layer stores natural language interaction sequences... The mapping is performed as a sequence of word vectors with fixed dimensions. A bidirectional long short-term memory network layer extracts the contextual temporal features of the word vector sequence, and a conditional random field layer outputs the corresponding entity label sequence. The entity labels adopt the BIO annotation strategy, and the label categories correspond one-to-one with the basic entity types of the ontology state graph, including fault phenomenon labels, environmental parameter labels, equipment status labels, root cause labels, and standard operating procedure labels.
[0105] The intent classification model employs a network structure comprising an attention encoding layer, a fully connected layer, and a softmax output layer. The intent classification model classifies natural language interaction sequences. The mapping is applied to a global feature vector, and the softmax output layer outputs a classification probability distribution vector for each type of preset intent label. The preset intent label set includes at least intent labels for abnormal occurrences, intent labels for normal states, and intent labels for excluding abnormalities.
[0106] The training samples for the sequence labeling model and intent classification model were derived from text data extracted from historical industrial operation and maintenance logs and standard operating manuals. The entity labels and intent labels in the training samples were manually verified and labeled. The training process of the sequence labeling model used the negative log-likelihood loss function to calculate the loss value and backpropagate to update the parameters, while the training process of the intent classification model used the cross-entropy loss function for iterative parameter optimization.
[0107] The semantic parsing module uses the extracted entity features as a comparison benchmark in the vertex set of the ontology state graph. The process involves performing a node mapping search and classifying the states of the nodes matched by the mapping based on the parsed underlying features.
[0108] When the intent classification model outputs the label with the highest probability as the intent label of anomaly occurrence, the semantic parsing module assigns the corresponding mapping node to the set of positive activation nodes. Set of positively activated nodes Composition of the ontology state diagram A subset of the set is used as the starting source point for subsequent depth-first search topological paths. If the natural language interaction sequence... No mappable node entities were found in the data. The system triggered an exception interception and instructed the human-computer interaction terminal to require the user to re-enter the text.
[0109] When the intent classification model outputs the label with the highest probability as a normal intent label or excludes abnormal intent labels, the semantic parsing module assigns the corresponding mapping node to the initial negative node candidate set. Initial negative node candidate set Similarly, it constitutes the ontology state diagram. A subset of the initial negative node candidate set generated at this stage. It will not participate in the forward graph calculation for the time being, but will only serve as a basic data set for subsequent system execution of deterministic comparison and failure link pruning.
[0110] The specific implementation of the method provided by the present invention in step S100, which performs natural language intent parsing and graph state entity filtering, further includes the following execution steps:
[0111] S103, Calculate the semantic confidence of the nodes. The semantic parsing module performs this calculation on the initial negative node candidate set. The internal nodes are traversed, and the initial negative node candidate set is processed. Each node in The semantic parsing module calculates the corresponding semantic confidence scalar. Here, A positive integer index identifier representing an internal node in the initial negative node candidate set.
[0112] The semantic parsing module extracts the classification probability distribution vector generated after the natural language interaction sequence has been processed by the aforementioned intent classification model. It then extracts the probability values corresponding to either the normal intent label or the excluded abnormal intent label from this vector. When both intent labels exist in the classification probability distribution vector, the semantic parsing module takes the higher probability value for subsequent calculations. The semantic parsing module directly uses the extracted values as nodes. The corresponding semantic confidence scalar. After the above mapping, the semantic confidence scalar... The range of values is limited to [0, 1].
[0113] For obtaining the classification probability distribution vector and normalizing the numerical values, those skilled in the art can use conventional deep learning frameworks and call the classification function of the model output layer to calculate it. The underlying numerical processing logic is a well-known technology in this field and will not be elaborated here.
[0114] S104: A confidence threshold-based streamlining process is performed using a preset security threshold to generate the final state set. The semantic parsing module triggers the confidence threshold filtering logic after obtaining the semantic confidence scalars of all candidate nodes. The system's underlying memory is pre-configured with deterministic filtering thresholds. This deterministic filtering threshold is used to define the numerical boundaries by which the semantic parsing results have factual certainty.
[0115] In scenarios requiring high reliability for troubleshooting physical equipment, deterministic filtering thresholds are used to avoid incorrect pruning due to algorithmic misjudgments. The value range is configured to be between [0.8, 1.0). Deterministic filtering threshold. The specific value is set by the system administrator based on the security level of the underlying devices and the accuracy distribution of the system's historical operation and maintenance logs.
[0116] The semantic parsing module compares the semantic confidence scalar of each node with the deterministic filtering threshold. The threshold-based filtering logic is used to perform a threshold-based traffic splitting operation, generating a set of negative state nodes. The above truncation logic process is represented by the following formula:
[0117] ;
[0118] In the formula, Represents the set of nodes in negative states; Represents the nodes within the initial negative node candidate set; A mathematical representation of the membership of an element in a set; Represents the initial negative node candidate set; Delimiters that characterize the conditions in the definition of mathematical sets; Representation Nodes The corresponding semantic confidence scalar; Characterize the deterministic filtering threshold.
[0119] The semantic parsing module merges all nodes that satisfy a deterministic filtering threshold greater than or equal to the negative state node set. This set of negative state nodes This will then be output to the graph calculation module, serving as the starting point for subsequent graph calculation module operations to perform cascading failure path pruning.
[0120] For nodes in the initial negative node candidate set that do not meet the deterministic filtering threshold condition, i.e., whose semantic confidence scalar is less than the deterministic filtering threshold. In cases where the semantic parsing module removes a node from the current computation sequence, the system intercepts nodes that do not meet the threshold conditions and stores them in the system's pending confirmation node queue. Nodes in the pending confirmation queue do not participate in the forward computation of the graph computation module but reside in the cache, awaiting subsequent status confirmation from the user via the human-computer interaction terminal by the query scheduling module. Through the above truncation and diversion mechanism, the system completes deterministic filtering of the input entity states.
[0121] See attached document Figure 4The specific implementation of the method provided by the present invention in step S200, which generates a residual diagnostic map based on topological transformation and cascade failure calculation, includes the following execution steps:
[0122] S201, Perform directed feedback loop detection on the ontology state diagram. The graph calculation module receives the ontology state diagram initialized in the preceding steps. In complex industrial physical control networks, closed-loop control links often exist between underlying physical devices due to automatic adjustment mechanisms or signal feedback logic. These closed-loop links are mapped to the body state diagram. This manifests as a directed feedback loop, which prevents topology sorting from being performed directly and increases the risk of repeated visits during graph traversal. To eliminate the impact of directed loops on topology derivation, the graph computation module utilizes a graph search algorithm on the ontology state graph. Search for strongly connected components in the middle.
[0123] The graph search algorithm uses the Tarjan algorithm. For the specific execution logic of the depth-first search traversal order timestamp allocation, backtracking value update, and using the stack structure to maintain the current search path in the Tarjan algorithm, those skilled in the art can directly call and implement it using conventional graph theory algorithm libraries. Its underlying stack operations and state backtracking logic are well-known technologies in this field and will not be elaborated here.
[0124] The graph computation module extracts all strongly connected components in the network by traversing the ontology state graph, generating a set of strongly connected components. The set of strongly connected components The structure is represented as follows:
[0125] ;
[0126] In the formula, Characterizes the set of strongly connected components; Characterizing the first One strongly connected component; Characterizes the total number of strongly connected components; In order to be in A positive integer index within the interval. Each strongly connected component contains at least one node, and there is a bidirectional topological path between any two nodes within the component.
[0127] S202, performs macro-node mapping and graph acyclic topology shrinking. The graph computation module performs equivalent macro-node shrinking based on the extracted strongly connected component set, targeting the strongly connected component set... Each strongly connected component in Construct the corresponding equivalent macro nodes Specifically, for strongly connected components containing multiple nodes, corresponding feedback closed-loop macro nodes are constructed; these feedback closed-loop macro nodes represent independent functional subsystems with internal closed-loop feedback control in industrial physical scenarios. The graph calculation module constructs equivalent ordinary nodes for strongly connected components containing a single node to unify the global node data structure.
[0128] The graph computation module constructs a node shrinkage mapping function. For the vertex set of the ontology state graph Each node in The graph computation module queries the identifiers of its strongly connected components and maps them to the corresponding equivalent ordinary nodes or feedback loop macro nodes. Based on this mapping relationship, it constructs the vertex set after acyclic topological transformation. With edge set .
[0129] Vertex set It is composed of all generated equivalent ordinary nodes and feedback loop macro nodes. (For the edge set...) The construction of the graph computation module involves scanning the edge set of the ontology state graph. For each directed edge in the graph, determine whether the equivalent macro nodes to which the two endpoints of the directed edge belong are the same. The graph computation module retains directed edges that cross different equivalent macro nodes and removes directed edges within strongly connected components. Edge set The construction logic is represented by the following formula:
[0130] ;
[0131] In the formula, Represents the set of edges after topological transformation; The set of edges representing the ontology state graph Any directed edge in the array; Represents the starting node of the original directed edge; Represents the target node of the original directed edge; Characterize the starting node The equivalent macro node after mapping; Characterize the target node The equivalent macro node after mapping; A mathematical representation of the membership of an element in a set; Delimiters that characterize the conditions in the definition of mathematical sets; Representational logic and operations.
[0132] The graph computation module generates an equivalent macro-node directed acyclic graph by reconstructing cross-domain edges and merging internal loop edges. Equivalent macro-node directed acyclic graph All circular dependency paths in the ontology state graph were eliminated, and a definite model transfer generation space was defined for the unidirectional propagation calculation of subsequent cascading failures without changing the causal transmission chain of the original industrial system.
[0133] The method provided by this invention, in step S200, generates a residual diagnostic map based on topological transformation and cascade failure calculation. The specific implementation of this method further includes the following execution steps:
[0134] S203, execute the failure state initialization and logic gate derivation calculation of the equivalent macronodes. The graph calculation module obtains the directed acyclic graph of the equivalent macronodes generated in the previous steps. and the set of negative state nodes after deterministic filtering. Set the negative state nodes Each node in the process is transformed by substituting it into a node shrinking mapping function.
[0135] For an equivalent macro node generated by merging multiple basic nodes, the graph computation module performs an inclusion determination: the equivalent macro node is considered only if all the basic nodes it contains exist in the negative state node set. Only then will the graph computation module add it to the negative macro node set. If only some of its basic nodes belong to To avoid missing any faults due to the conservative principle of troubleshooting, the graph calculation module does not include it in the negative macro node set. For the equivalent macro node of a single-node mapping, if its only base node belongs to... If it is, it will be directly included in the set of negative macro nodes. .
[0136] The graph computation module defines node propagation state values. Used to characterize the internal nodes of an equivalent macro-node directed acyclic graph. The logical state of a failure. The state value is limited to Boolean type, where the value 0 indicates that the node is in a deterministic state of normal operation, that is, the physical conditions for the failure to propagate downstream are not met; the value 1 indicates that the node is in a potential failure or a certain failure state.
[0137] The graph computation module calculates the equivalent macronode directed acyclic graph. Execution state initialization. For those belonging to the set of negative macro nodes. For nodes that do not belong to the negative macro node set, the graph computation module initializes their node propagation state value to 0. For each node, the graph calculation module uniformly sets the initial value of its node propagation state to 1.
[0138] The graph computation module is based on an equivalent macro-node directed acyclic graph. Given a topologically sorted sequence, perform cascaded state derivation on the nodes along the directed edges. For each node visited... The graph computation module extracts its set of direct predecessor nodes. The set of direct predecessor nodes consists of all nodes that point to it. It is composed of the starting nodes of directed edges.
[0139] Before performing logic gate computation, the graph computation module determines the set of direct predecessor nodes. Is it an empty set? If it is the set of direct predecessor nodes. An empty set, i.e., nodes For a topological source node with no upstream input, the graph computation module skips the logical derivation of the current node, allowing its state value to propagate. Keep the initial settings.
[0140] If the set of direct predecessor nodes Not an empty set, the graph computation module retrieves nodes. Preset causal dependency type identifier If the causal dependency type identifier To jointly trigger causal logic The failure state derivation formula called by the graph calculation module is as follows:
[0141] ;
[0142] In the formula, Representation Nodes The node propagation state value; Mathematical operations that represent taking the minimum value; Represents the predecessor node in the set of direct predecessor nodes; A mathematical representation of the membership of an element in a set; Representation Nodes The set of direct predecessor nodes; Characterizing the predecessor node The node propagation state value. According to this formula, under joint triggered causal logic, as long as any predecessor node is in a normal deterministic state, the node... That is, it is judged to be in normal state 0.
[0143] If the causal dependency type identifier For any triggering causal logic The failure state derivation formula called by the graph calculation module is as follows:
[0144] ;
[0145] In the formula, This represents the mathematical operation of maximizing the value. According to this formula, under any triggered causal logic, a node only becomes maximally ... A node can be classified as being in normal state 0; if any predecessor node is in a failed state, the node... Maintain state 1.
[0146] Based on the above formula, the graph calculation module establishes the following state derivation logic: For a joint triggering node, its state value is derived as 1 if and only if all predecessor nodes have a state value of 1, otherwise it is 0; For any triggering node, its state value is derived as 1 if any predecessor node has a state value of 1, and its state value is derived as 0 only if all predecessor nodes have a state value of 0.
[0147] S204, perform connectivity blocking and residual diagnostic graph generation for unreachable paths. After completing the cascade derivation of failure states for all nodes, the graph calculation module traverses all nodes in the equivalent macro-node directed acyclic graph and selects the node propagation state values after derivation. The nodes are combined to generate a set of security interception nodes. The nodes within the security interception node set have been logically prevented from further propagating the fault.
[0148] The graph computation module calculates the edge set of a directed acyclic graph with equivalent macronodes. Perform edge weight update operations to implement path pruning. The graph computation module defines the passage cost weights. This is used to define the travel cost of a directed edge in subsequent graph search algorithms. For the edge set... any directed edge in The weight update formula is as follows:
[0149] ;
[0150] In the formula, Representing directed edges Updated passage cost weights; A positive infinity value representing the blocking of connectivity; Represents the starting node of a directed edge; A mathematical representation of the membership of an element in a set; Represents the set of security interception nodes; The weights representing the original travel cost of the directed edges; The mathematical exclusion relation that represents an element not belonging to a set. Passage cost weight. During the system's ontology state diagram construction phase, the probability of fault transfer between adjacent devices is extracted from historical operation and maintenance data. The negative logarithm of this probability value is then added to the preset communication impedance value of the physical connection line to generate the passage cost weight, and its value is always a positive real number greater than 0.
[0151] The graph computation module generates a residual diagnostic graph based on the updated edge weight distribution. Residual diagnostic diagram The original node topology of the equivalent macro-node directed acyclic graph is preserved, but the travel cost of all directed edges whose starting nodes are located within the set of safe intercepting nodes is forcibly configured to infinity. In the underlying logic of the graph search algorithm, edges with infinite weights are considered physically disconnected. Through the aforementioned weight update mechanism, the graph calculation module cuts off the downlink propagation branches derived from the identified normal nodes, completing the pruning of unreachable propagation paths. Residual diagnostic graph It is then output as a path search graph data structure to subsequent processing links for performing depth search within the reduced candidate path space.
[0152] See attached document Figure 5 The specific implementation of the method provided by the present invention, which performs candidate path search and reverse inquiry closed-loop scheduling in step S300 to lock the target path, includes the following execution steps:
[0153] S301, Perform candidate diagnostic path search based on the residual diagnostic map. The graph calculation module obtains the residual diagnostic map generated in the previous steps. and the set of positively activated nodes Call the previously constructed node shrinking mapping function to positively activate the node set. All internal basic physical nodes are transformed. During the multi-node shrinking process towards the equivalent macronode, the graph computation module extracts all basic physical nodes contained within each equivalent macronode and determines their relationship to the set of positively activated nodes. Does the intersection exist?
[0154] If an intersection exists, meaning that the macronode contains at least one positively active node, the graph calculation module determines that the region exhibits fault characteristics and uniformly classifies its corresponding equivalent macronodes into the set of positively active macronodes. .
[0155] The graph computation module positively activates the macro node set. Each node in the graph is used as the source point for traversal, in the residual diagnostic graph The depth-first search algorithm is triggered within the topology. During the layer-by-layer downward traversal of the depth-first search, the graph computation module reads the travel cost weight of the currently expanding edge in real time. When it is detected that the travel cost weight of the currently expanding directed edge is equal to positive infinity (i.e., ...), the algorithm is activated. When the graph calculation module determines that the downlink propagation branch has been blocked in physical logic, it stops the forward search operation of the current branch and triggers the state backtracking logic.
[0156] When the search path reaches the equivalent macro node corresponding to the root cause node or standard operation step node preset in the ontology state graph, the graph calculation module encapsulates the recorded directed node sequence from the source node to the destination into a complete candidate path. The graph calculation module integrates all candidate paths that meet the connectivity conditions to generate a candidate diagnostic path set. The structure of this set is represented as:
[0157] ;
[0158] In the formula, Characterize the set of candidate diagnostic pathways; Characterizing the first Candidate paths; Characterizes the total number of candidate paths generated by the search; In order to be in Positive integer indices within the range.
[0159] For the recursive stack maintenance, node access status marking, and dead end path backtracking mechanism in the depth-first search process, those skilled in the art can directly implement them using conventional graph traversal program logic. The underlying pathfinding logic is a well-known technology in this field and will not be elaborated here.
[0160] S302, Perform session state comparison and extract nodes dependent on unconfirmed states. The system's underlying memory maintains an independently allocated session state cache, which continuously records entity node data with clearly acquired physical states during multiple rounds of human-computer interaction. The follow-up scheduling module reads the set of instantiated nodes at the current moment from the session state cache. An instantiated collection of nodes. It consists of all positively activated nodes in the current diagnostic task, negative status nodes that have been deterministically filtered, and nodes whose status has been confirmed by the user through the terminal in historical follow-up rounds.
[0161] The scheduling module iterates through the set of candidate diagnostic paths. Each candidate path in Extract the equivalent macro nodes contained in all candidate paths, and use the inverse mapping logic of the node shrinking mapping function to restore and unpack the equivalent macro nodes into the underlying basic physical nodes, generating a global dependency node set. This global dependency node set includes all associated device nodes and status parameter nodes that are currently causing the fault.
[0162] To ensure that the target of the reverse inquiry is verifiable by humans, the system predefines a set of queryable nodes. This set consists of a set of environmental parameter nodes, a set of equipment status nodes, a set of sensor nodes, and a set of manually verifiable status nodes, while strictly excluding fault phenomenon nodes, root cause nodes, and standard operating procedure nodes themselves.
[0163] The follow-up scheduling module will query the global dependency node set. With the set of queryable nodes Perform an intersection operation to filter out nodes that meet the actual observation and verification conditions, and then combine them with the set of instantiated nodes. Load the data into memory and perform set difference operations. The follow-up scheduling module extracts nodes whose states have been confirmed in the current environment, generating a set of nodes with unconfirmed state dependencies. The above node state filtering logic is represented by the following formula:
[0164] ;
[0165] In the formula, Represents the intersection operation in mathematical sets; Represents the set of queryable nodes; The set of nodes representing unconfirmed state dependencies; Represents the set of globally dependent nodes; The difference operation in mathematical sets is used to retain elements that exist in the subtracted set but not in the minuend set; Represents the set of instantiated nodes.
[0166] Unconfirmed state dependent node set Internally, it contains basic physical device nodes that possess potential triggering conditions in the causal chain, but whose exact state is currently lacking external observation data to confirm. The inquiry scheduling module uses this set of nodes with unconfirmed state dependencies as the computational foundation for subsequent calculations of dynamic inquiry value, defining an accurate candidate data space for subsequent scheduling of reverse inquiry initiated by the human-computer interaction terminal.
[0167] The specific implementation of the method provided by the present invention, which performs candidate path search and reverse query closed-loop scheduling in step S300 to lock the target path, further includes the following execution steps:
[0168] S303, calculate the reduction index of diagnostic information entropy for nodes with unconfirmed state dependencies. The follow-up scheduling module obtains the set of candidate diagnostic paths output from the previous steps. Set of nodes dependent on unconfirmed state Based on Shannon's information entropy principle, the basic information entropy of the current diagnostic space is calculated. The basic information entropy characterizes the uncertainty of the current system in determining the final cause of the failure, and its calculation formula is as follows:
[0169] ;
[0170] In the formula, Entropy represents the basic information. Characterizing the set of candidate diagnostic pathways The total number of candidate paths included; Represents the logarithmic operation with base 2.
[0171] The follow-up scheduling module targets the set of nodes with unconfirmed state dependencies. Each node in Calculate the conditional information entropy assuming the exact physical state of the node is obtained. Here, The positive integer index identifier representing the node within the set of nodes whose unconfirmed state depends. The calculation logic of conditional information entropy is as follows:
[0172] ;
[0173] In the formula, Representation Nodes The corresponding conditional information entropy; The nodes are characterized by their historical operation and maintenance statistics extracted from the underlying equipment. The prior probability of being in a normal state; Representation Nodes The prior probability of being in an abnormal state; Characterization of hypothesis nodes Under normal input conditions, the number of remaining paths in the candidate diagnostic path set after the system re-executes path pruning; Characterization of hypothesis nodes The number of remaining paths under abnormal input conditions. To avoid logarithmic overflow dead zones in the underlying mathematical calculations of the algorithm, when... or When the value is 0, the scheduling module will force the corresponding logarithmic operation result to be assigned the value 0.
[0174] After obtaining the above entropy value, the scheduling module is asked to calculate the basic information entropy. With conditional information entropy The numerical difference between them is used as the node. Diagnostic information entropy reduction index The larger the value of this indicator, the more erroneous candidate paths can be eliminated after confirming the status of the node, meaning the higher the mathematical contribution of the corresponding node to the convergence diagnosis range.
[0175] S304, Evaluate the dynamic verification cost under real-time operating conditions. Obtaining the actual status of physical nodes in an industrial control field consumes manual verification time and equipment start-up and shutdown costs, and these costs fluctuate dynamically with the real-time environment. During the ontology state diagram construction phase, the system administrator pre-quantifies and calibrates the basic verification cost based on the complexity of disassembling and assembling the physical devices corresponding to unconfirmed state-dependent nodes and the degree of spatial constraints they occupy. The cost value is always a positive real number greater than 0.
[0176] Simultaneously, the scheduling module retrieves environmental parameters transmitted from field sensors in real time and maps them to generate dynamic penalty coefficients. When the site is under normal safe shutdown conditions, the dynamic penalty coefficient remains constant at 1.0. When the surrounding environment is in a hazardous operating condition range such as high temperature, high pressure, or radiation, the scheduling module uses the following operating condition mapping formula to calculate this coefficient:
[0177] ;
[0178] In the formula, Characterizes the dynamic penalty coefficient; The sensitivity adjustment constant for the operating condition is preset to 2.0; Characterizes hazardous operating conditions that are collected in real time by the sensor, such as real-time ambient temperature or radiation dose rate; The safety critical threshold that characterizes the corresponding physical quantity; The maximum value is used to avoid coefficient decay caused by negative deviations. After the calculation is complete, the follow-up scheduling module will... The value is forcibly truncated to the maximum limit of 5.0.
[0179] The follow-up scheduling module will extract the basic verification cost. With dynamic penalty coefficient Perform multiplication operations to calculate and obtain nodes. Current dynamic verification cost .
[0180] S305, construct the expected cost ratio data table and determine the target node for follow-up inquiry. The follow-up inquiry scheduling module completes the process for determining the set of nodes with unconfirmed state dependencies. After calculating the data for all internal nodes, each node will be... Diagnostic information entropy reduction index In addition to its corresponding dynamic verification cost The expected cost ratio of each node is obtained through quotient calculation. The expected cost ratio reflects the diagnostic certainty gain that can be obtained by the unit investigation cost when initiating on-site verification for a specific node.
[0181] The follow-up scheduling module aggregates the expected cost ratio data of all nodes, performs an array optimization traversal, and extracts the node with the largest ratio as the follow-up target node. The extraction logic is as follows:
[0182] ;
[0183] In the formula, The identified target node for further inquiry is represented; The mathematical operation that represents the search for the elements of the independent variable that maximize the expected cost ratio function.
[0184] S306, execute reverse inquiry closed-loop scheduling and target diagnostic path locking. The inquiry scheduling module locks the inquiry target node. Subsequently, the diagnostic conclusion generation process was suspended.
[0185] Before issuing instructions, the follow-up scheduling module extracts the target node for follow-up. The corresponding expected cost ratio. If the maximum expected cost ratio is equal to 0, the large language model will no longer be called to generate a single interactive draft. Instead, the remaining multiple underlying candidate paths will be extracted, and the associated root cause, confirmed status, pending status and corresponding standard operation step number will be displayed independently for each candidate path. These will be merged to generate a structured candidate target diagnostic path set form, which will be directly output through the human-computer interaction terminal to avoid the system falling into an infinite loop and incorrect fusion of multiple path operation steps.
[0186] If the maximum expected cost ratio is greater than 0, the scheduling module will query the target node. The node attributes are converted into natural language confirmation commands, and the status confirmation prompts are presented to the user through the human-computer interaction terminal.
[0187] After receiving the exact physical status data from the user via the terminal, the follow-up scheduling module will then follow up with the target node. Its state is written to the session state cache, and the set of instantiated nodes is updated synchronously. The system re-triggers the aforementioned graph state entity filtering and topology pruning logic based on the updated set of instantiated nodes, and performs a new round of candidate path search calculations.
[0188] The follow-up scheduling module monitors the newly generated set of candidate diagnostic paths in real time. Number of internal paths .
[0189] If the number of paths If the value equals 1, the follow-up query scheduling module determines that the diagnostic convergence is complete, terminates the reverse follow-up query closed-loop scheduling loop, and transfers the unique remaining path as the determined target diagnostic path to the subsequent text generation module for output.
[0190] If the number of paths A set of nodes with a state greater than 1 and unconfirmed status An empty set indicates that the current fault characterization has multiple causes and one effect overlapping in physical terms under existing sensor and manual detection methods. The follow-up scheduling module also terminates the scheduling loop and generates a set of structured candidate target diagnostic paths. This set is then handed over to on-site personnel for confirmation and selection of a specific path before triggering the subsequent text generation process of the large language model.
[0191] If the number of paths A set of nodes with a state greater than 1 and an unconfirmed status If the set is not empty, the system rolls back to step S303 and proceeds to the next round of dynamic evaluation and follow-up scheduling of the expected cost ratio. Through the above-mentioned iterative interaction and cost pruning, the system achieves convergence of candidate diagnostic paths under physical security constraints.
[0192] See attached document Figure 6 The specific implementation of the method provided by the present invention in step S400, which generates an interaction draft based on the action identifier injection constraint large language model, includes the following execution steps:
[0193] S401, execute the feedback closed-loop macro node direct output rule determination. The text generation module receives the target diagnostic path output from the previous step, extracts all nodes contained in the target diagnostic path, and retrieves the attribute field data corresponding to each node from the ontology state diagram.
[0194] The text generation module verifies whether the attribute field of any node on the path contains a preset pass-through output identifier. This pass-through output identifier is used to mark non-removable closed component units (such as feedback closed-loop macro nodes) in the industrial field or to mark closed macro nodes with high risk levels that are prohibited from any semantic rewriting. If any node on the path contains a pass-through output identifier, the text generation module determines that the current diagnostic task hits the macro node pass-through output rule. At this time, the text generation module directly retrieves the standard emergency plan text or preset internal state machine process pre-configured in the database for the node that hits the pass-through output identifier, outputs it downstream as the final response text, and terminates the current large language model intervention process. The above bypass blocking mechanism avoids the large language model from erroneously modifying high-risk standard procedures.
[0195] S402, extract the original structured operation procedure of the target diagnostic path. If none of the nodes on the target diagnostic path contain a pass-through output identifier, i.e., the macro node pass-through output rule is not hit, the text generation module determines that it is necessary to call the large language model to perform natural language interactive assembly of the investigation or repair actions.
[0196] The text generation module traverses each node on the target diagnostic path, initiates a structured query to the underlying industrial equipment knowledge base using node identifiers, extracts the standard operating procedure parameters and handling instruction text required to address the cause of the fault, and arranges the extracted operation instructions in chronological order according to the topological direction of the target diagnostic path to generate a structured SOP sequence. The mathematical structure of this sequence is as follows:
[0197] ;
[0198] In the formula, Characterizing structured SOP sequences; The first in the characterization sequence Each independent operation instruction; This represents the total number of independent operation instructions contained in the sequence; Representing the index of the current independent operation instruction in the sequence, for in Positive integers within the range. Each independent operation instruction. It contains deterministic structured data such as the name of the device action, the threshold of the safe operation parameter, and the physical execution location.
[0199] S403 constructs and assigns a set of immutable action identifiers within the session. Directly outputting structured SOP sequences is difficult for non-experts to quickly understand, while freely generating them from a large language model risks omitting key operational parameters. To establish deterministic constraint boundaries, the text generation module targets structured SOP sequences... Each independent operation instruction in Use a hash function to generate the corresponding action identifier. The generation logic of this identifier is represented by the following formula:
[0200] ;
[0201] In the formula, Characteristic allocation to independent operation instructions Action identifier; The hash function is characterized. In practice, those skilled in the art can directly implement it using the SHA-256 algorithm. Its underlying digest operation logic is a well-known technology in the field and will not be described in detail here. Represents string concatenation operations; Represents the index of the current independent operation instruction in the sequence; The system timestamp represents the execution of the currently assigned computational task. Introducing the order index and system timestamp ensures that even if two operation instructions have identical text content, the generated action identifiers are unique within the current diagnostic session.
[0202] The text generation module combines all generated action identifiers to construct a session-invariant set of action identifiers. .
[0203] ;
[0204] In the formula, A set of identifiers representing actions.
[0205] Simultaneously, the text generation module constructs a key-value pair mapping table in system memory, which uses action identifiers... As a key for data retrieval, it has its corresponding independent operation instructions. This data is stored as a data store. Throughout the lifecycle of the current session, this mapping table and its internal set of action identifiers are set to a read-only and immutable state. This set of action identifiers is then passed as a data anchor to the prompt word project of the large language model, providing a structural benchmark for implementing closed-loop verification of the natural language text subsequently generated by the large language model.
[0206] The method provided by this invention, in step S400, generates an interaction draft based on the action identifier injection constraint large language model, and further includes the following execution steps:
[0207] S404, performs structured construction and action identifier injection of the large language model prompt text. The text generation module extracts the previously generated structured SOP sequence and the set of immutable action identifiers within the session, and assembles the above data into structured prompt text according to the preset system engineering template.
[0208] In practice, the structured prompt text is divided into a role setting section, an input data section, and a format constraint section. In the role setting section, the text generation module injects the role constraints and knowledge scope constraints of an industrial field diagnostic assistant into the large language model. In the input data section, it injects, in parallel and sequentially, the original operation instructions containing action names, parameter thresholds, and action identifiers hard-bound through a mapping table. In the format constraint section, the text generation module writes mandatory output instructions, stipulating that when the large language model rewrites the underlying structured instructions into a natural language description sequence, it must append an action identifier enclosed in a specific closing symbol to the end of the corresponding description statement.
[0209] S405 invokes a format-constrained large language model and performs restricted text generation. The large language model configured in the text generation module adopts a causal language model based on a Transformer decoder architecture. The hierarchical structure of the large language model includes word embedding layers, multiple stacked multi-head self-attention mechanism layers, feedforward neural network layers, and output projection layers.
[0210] To ensure the large language model's ability to adhere to identifier insertion rules, it underwent domain-specific instruction fine-tuning training before deployment. During training, historical industrial maintenance logs were used as sample sources to construct an instruction fine-tuning dataset. In this dataset, the model input data consisted of structured cue text containing action instructions and action identifier pairs, while the output target labels were manually annotated, standardized natural language descriptions with the corresponding action identifiers inserted in the correct positions. Model training updated network weights using backpropagation, and the loss function used during training was the autoregressive cross-entropy loss function, calculated as follows:
[0211] ;
[0212] In the formula, Characterizes the cross-entropy loss value; Represents the summation operation in mathematics; The total length of the tokens contained in the target tag text; A positive integer index representing the current time step; Characterizing target labels in the first The true lexical units of the step; This represents the sequence of lexical units generated in all previous steps; A structured sequence of prompt words representing the input; This represents the internal trainable parameter network of a large language model. By minimizing this loss function, the model establishes a mapping relationship for adherence to instructions in a specific format.
[0213] For the preprocessing logic of the model input data, the text generation module uses a pre-built word segmenter to encode the constructed structured prompt word text, converting it into a one-dimensional sequence of word integers to adapt to the tensor computation dimension of the underlying model. Within the model's data flow, the one-dimensional sequence of word integers enters the word embedding layer and is mapped into a high-dimensional dense vector matrix. This matrix then passes through multi-head self-attention mechanism layers, extracting semantic features of the context through the inner product operation of the query matrix, key matrix, and value matrix. After non-linear mapping by the feedforward neural network layer, the output projection layer finally calculates the generation probability distribution of each word in the vocabulary space at the current step.
[0214] The text generation module uses an autoregressive decoding strategy to generate target text word by word until a termination identifier is output, at which point the calculation ends. The output target text is represented in terms of business meaning as candidate natural language response text. This candidate natural language response text converts equipment operating parameters into easily understandable handling suggestions for on-site maintenance personnel, and retains the previously assigned action identifiers within its text.
[0215] S406 performs format integrity checks and downgrades the output of candidate natural language response texts. Due to the generation uncertainty of the large language model during autoregressive generation, which is limited by statistical probability distribution, some operation steps are lost or identifiers are incorrect. The text generation module calls the regular expression engine to scan the generated candidate natural language response texts, extract all identifiers actually contained within the text, and construct a validation set.
[0216] The text generation module compares the verification set with the immutable action identifier set within the session to check for format integrity. It verifies whether the verification set completely contains all elements of the action identifier set. If any identifiers are missing, duplicated, or unknown, the format verification fails. The execution order between identifiers is not determined in this step but is handled by the subsequent consistency verification module, which performs partial order checks.
[0217] If the format integrity check passes, the text generation module determines that the candidate natural language response text meets the constraints and allows it to proceed to the downstream module. If the check fails, it indicates that a step in the model generation process was omitted or fabricated, posing a physical safety hazard due to on-site misoperation. The text generation module then triggers a degradation intervention mechanism, discarding the currently generated abnormal draft text and directly generating a templated degradation text as an alternative output based on the structured SOP sequence and key-value pair mapping table using a hard-coded text template. This text then directly enters the forced degradation output process. The above post-checking and degradation logic eliminates system logic dead zones caused by the uncertainty of large language models, ensuring the safety and integrity of the on-site diagnostic operation procedures.
[0218] See attached document Figure 7 The specific implementation of the method provided by the present invention in step S500, which performs output consistency verification and security degradation decision-making, includes the following execution steps:
[0219] S501, Extract generated identifiers and perform action identifier consistency verification. The consistency verification module receives the candidate natural language response text generated and passed in from the previous step, calls the internally configured regular expression matching unit to perform a full scan of the text stream, matches and extracts all strings wrapped by specific closing symbols, and thus constructs the actual generated identifier list. And based on this list, generate the actual set of generated identifiers. .
[0220] The consistency verification module reads the set of immutable action identifiers locked within the session from the system memory. The actual set of generated identifiers will be With action identifier set Load the computation cache, perform a bidirectional set difference operation, and verify the consistency of the action identifiers between the two. Simultaneously, based on the actual generated identifier list... The system checks for duplicate identifiers. The specific equivalence verification logic is represented by the following formula:
[0221] ;
[0222] ;
[0223] In the formula, A set of missing identifiers is used to capture standard device operation steps that are discarded during the generation process of a large language model; The difference operation in mathematical sets is used to retain elements that exist in the subtracted set but not in the minuend set; A set of redundant identifiers is used to capture spurious operation steps caused by generation bias in large language models.
[0224] The consistency check module detects missing identifier sets. With redundant identifier set Whether both sets are empty. If either set is not empty, the consistency check module determines that the action identifier consistency check has failed and generates an entity check exception signal. If both sets are empty, it indicates that the text generated by the model is consistent with the baseline requirements in terms of the number and content of action identifiers, and the consistency check module proceeds to the subsequent timing detection process.
[0225] S502, construct the dependency parsing tree and extract the action execution order. There is an objective difference between the written order of natural language and its actual physical execution order. The consistency verification module calls the dependency parser to perform syntactic parsing on the candidate natural language response text, generating a dependency parsing tree representing the dominance relationships between words. For the construction of the dependency parsing tree and semantic parsing of natural language text, those skilled in the art can directly implement it using graph-based dependency parsing algorithms. The underlying part-of-speech tagging and dependency arc prediction logic are well-known technologies in the field and will not be elaborated upon here.
[0226] The consistency verification module locates all lexical nodes containing action identifiers within the dependency syntax tree's topology. For each lexical node, the consistency verification module traces upwards along the dependency arc, extracting time adverbs, time prepositional phrases, and coordinating conjunctions that modify the verb corresponding to that action identifier.
[0227] The consistency verification module retrieves a pre-set timing rule mapping table, which internally stores the correspondence between timing modification features and time offsets:
[0228] Specifically, when the time sequence modifier contains word words like "first," "firstly," or "before," which represent preceding execution logic, the mapping table configures it with a negative time offset; when the time sequence modifier contains word words like "then," "subsequently," or "after completion," which represent delayed execution logic, it configures it with a positive time offset; and when the time sequence modifier contains word words like "simultaneously" or "in parallel," which represent synchronous execution logic, it configures it with a zero offset. Furthermore, during parsing, if mutually exclusive time sequence modifiers are extracted for the same action identifier, or if the corresponding dependency action predicate node cannot be determined in the dependency syntax tree, the consistency check module determines that the action execution order label extraction failed and directly triggers a reverse order conflict anomaly signal.
[0229] After successfully matching the corresponding relationship, the actual set of identifiers is generated. For each action identifier in the original text stream, the consistency check module extracts its initial position index in the original text stream and adds the initial position index to the time offset extracted through the dependency syntax tree to generate a comprehensive time weight.
[0230] After calculating the comprehensive time weight, the consistency verification module rearranges all action identifiers in ascending order based on the weight values. Then, according to the rearranged sequence, it assigns each action identifier an action execution order number at the text semantic level. The sequence number is a positive integer; the smaller the value, the earlier the action is required to be executed in the physical operating space.
[0231] S503 performs timing inversion conflict detection on the standard partial order relation set. The consistency verification module extracts the baseline timing logic of the structured SOP sequence. To avoid forcibly constraining independent operations without any relationship to be executed serially, the consistency verification module extracts action pairs that must have a sequential execution relationship from the execution timing edges of the ontology state diagram, security interlocking rules, and standard operation specifications, and constructs the standard partial order relation set. Each element in the standard partial order relation set represents a pair of actions that must be performed sequentially. Used to represent action identifiers The corresponding physical action must be earlier than The corresponding action is executed.
[0232] The consistency verification module compares the action execution order labels extracted from the candidate natural language response text with the baseline timing logic, and performs reverse order conflict calculation. If a unique execution order label cannot be extracted during dependency syntax tree parsing, or if there are parallel conditional relationships that cannot be parsed, the consistency verification module directly determines that the timing verification has failed and triggers an reverse order conflict exception signal. When the label extraction is successful, the formula for calculating reverse order conflicts is as follows:
[0233] ;
[0234] In the formula, Represents the total number of inversion conflicts; Represents the summation operation in mathematics; Characterizes the pairs of actions that must be performed sequentially in a set of standard partial order relations. A mathematical representation of the membership of an element in a set; Characterizes the set of standard partial order relations; Characterizes the conflict indicator function.
[0235] The conditional operation logic of this conflict indicator function is as follows: when When the function outputs a value of 1, it means that the natural language text has semantically moved a step that should have been later forward, thus creating a physical temporal reversal; when When the function outputs a value of 0, it means that the temporal sequence of the text has not been reversed.
[0236] The consistency check module counts the total number of reverse order conflicts. To ensure standardized operation during on-site inspections, the system sets the reverse order tolerance threshold to 0. When the total number of reverse order conflicts... When the total number of reverse order conflicts is greater than 0, the consistency check module determines that there is a temporal logic error in the text semantics, triggering an inversion conflict exception signal. Only when the total number of inversion conflicts is greater than 0... When the value equals 0, the consistency check module determines that the dependency syntax tree timing reverse order detection has passed. Through the above checks based on syntactic parsing and partial order relations, the system eliminates the interference of natural language expression on execution timing, ensuring the security and determinism of the underlying device action logic.
[0237] The specific implementation of the method provided by the present invention in step S500, which performs output consistency verification and security degradation decision, further includes the following execution steps:
[0238] S504, comprehensively judges the detection indicators and outputs the decision. The consistency verification module summarizes the verification status data output by the previous steps, extracts the set operation results of the entity equivalence verification step and the reverse conflict calculation results of the dependency syntax tree temporal reverse detection step.
[0239] The consistency verification module evaluates the above detection indicators according to preset security judgment rules. The consistency verification module determines that the candidate natural language response text generated by the large language model conforms to the preset action integrity rules and temporal partial order rules, and confirms its output legality, only if both the missing identifier set and the redundant identifier set are empty, and the total number of reverse order conflicts equals the preset reverse order tolerance threshold value of zero. At this time, the candidate natural language response text containing the action identifier set is allowed to proceed and sent to the human-computer interaction terminal via the network communication interface for on-site personnel to confirm and use.
[0240] S505, capturing abnormal indicators and executing output link cleanup. During the indicator aggregation phase, if the consistency verification module captures any one of the entity verification abnormal signal or reverse order conflict abnormal signal, the system determines that the text generated by the large language model has security risks such as missing actions, fictitious instructions, or reversed execution sequence, and triggers the security degradation mechanism.
[0241] To prevent guidance text containing incorrect steps from leaking to the front-end business system, the consistency verification module performs output link cleanup on candidate natural language response texts when a verification fails. Specifically, the consistency verification module forcibly deletes the candidate natural language response text from the system's output queue, session state cache, and front-end pending-send buffer.
[0242] For memory buffers within system permissions, data overwrite and reference release operations are performed. Simultaneously, the system prohibits writing the exception draft to persistent business logs at the network communication layer, retaining only the exception code, hash value, or audit event record. This output link cleanup and restriction mechanism removes exception candidate text from the system's controllable output links, ensuring that text that fails validation will not be presented to the human-computer interaction terminal due to system network latency or illegal cache read vulnerabilities.
[0243] S506, the structured SOP form is forced to degrade and is isolated from read-only communication. Along with the output link cleanup, the consistency verification module enters the forced degradation output state. The consistency verification module directly bypasses the text generation mechanism of the large language model, retrieves the structured SOP sequence locked in step S400 from system memory, extracts the deterministic underlying hard-coded data such as action names, safety operation parameter thresholds, and physical execution locations contained in each operation instruction of the original sequence, and sequentially fills them into the preset static structured SOP form template.
[0244] The consistency verification module outputs the completed structured SOP form to the human-computer interaction terminal. In scenarios where model generation fails, this structured form directly displays the original structured operation procedure through forced degradation, improving the accuracy and completeness of the troubleshooting prompts.
[0245] Simultaneously, at the end of the current diagnostic Q&A session loop, the intelligent Q&A server, in conjunction with the underlying industrial isolation gateway, executes a read-only communication isolation mechanism. A read-only data acquisition channel is established between the intelligent Q&A server and the underlying industrial control network at the hardware configuration level. This system-configured read-only data acquisition channel only allows the intelligent Q&A server to obtain real-time operating status data of the physical devices from the underlying layer. The consistency verification module, by default at the system architecture level, isolates any downlink communication links that send device execution commands or control messages to the underlying physical control system.
[0246] Through this mechanism, the intelligent question-and-answer server converts all fault repair decisions into display prompts or forms for human-machine interaction terminals, requiring on-site human confirmation and manual equipment operation. This read-only communication isolation mechanism limits the intelligent question-and-answer server's ability to send control messages to the industrial control system, reducing the risk of equipment malfunctions directly caused by errors in large language model generation or software logic calculations.
[0247] To aid in understanding the technical solution of this invention, a complete application example is provided below, taking into account a specific troubleshooting scenario of abnormally rising cooling water temperature in a chemical reactor.
[0248] On-site maintenance personnel discovered an abnormal temperature in the reactor. Through the human-machine interface terminal, they input a natural language interaction sequence: "The current cooling water return temperature of reactor No. 2 is above the limit, accompanied by a decrease in flow rate, but the cooling water circulation pump has not shown any abnormal alarms." The system's semantic parsing module extracted entity labels based on this and mapped them to the ontology state graph. Among these, nodes representing the fault phenomena... (Return water temperature exceeds limit) and (Decreased flow rate) is included in the set of positively activated nodes. For the initial negative node candidate set (Cooling water circulation pump), the intent classification model outputs a probability of 0.95 that it is in a normal state, which is the semantic confidence scalar. The system's preset deterministic filtering threshold Since 0.95 ≥ 0.85, the confidence level truncation condition is met. Therefore Formally added to the set of negative state nodes .
[0249] Subsequently, the graph calculation module will The node propagation state value is initialized to And derive it along the directed acyclic graph. After the derivation is complete, Nodes whose causal dependencies are not triggered by other fault sources are included in the set of security interception nodes. When updating the passage cost weights, use All directed edges of the starting node The weights are forcibly updated to positive infinity. This disconnects the topology link containing the "circulation pump failure" branch, generating a reduced residual diagnostic map. .
[0250] Next, the graph calculation module extracts a set of candidate diagnostic paths containing three fault paths from the residual diagnostic graph. Its basic information entropy The system also extracts the set of nodes with unconfirmed state dependencies. ,Include (Tower top cooling fan) (Main cooling water valve) and (Backup branch valve) Three nodes.
[0251] The scheduling module then calculates the dynamic verification cost and information entropy reduction index of the aforementioned nodes based on real-time operating conditions. For each node... (Tower top cooling fan), assuming that after verification, the remaining paths are all divided into 2 or 1, calculate the conditional information entropy. Diagnostic information entropy reduction index This node is located at the top of the tower, and the basic verification cost is... On that day, the sensors collected characteristic values of the hazardous operating conditions at the top of the tower. Safety threshold .
[0252] Call the dynamic penalty coefficient calculation formula:
[0253] ;
[0254] Based on this, the cost of dynamic verification is calculated. Expected cost ratio .
[0255] For nodes (Main cooling water valve), calculated It is located in a regular ground area, and the cost of basic verification is high. Characteristic values of hazardous working conditions Below 35℃, therefore The cost of its dynamic verification Expected cost ratio For nodes (Spare branch valve), calculated This node is located in a regular area on the ground. , ,but Expected cost ratio .
[0256] Comparison The node with the highest expected cost ratio (1.25) is designated as the target node for further inquiry by the system. The system outputs a status confirmation message to the terminal: "Please confirm on-site whether the main cooling water valve opening is abnormal?" After the on-site response is "Valve stuck and not fully open," the target diagnostic path is locked.
[0257] Upon entering the consistency verification and decision-making phase, the system extracts the associated structured SOP sequence, which contains three operation instructions, and generates a set of action identifiers. After the large language model generates candidate natural language response texts, the consistency verification module intervenes to perform entity verification. The system extracts identifiers from the generated text using regular expressions and identifies the actual set of generated identifiers. The set of missing identifiers is obtained using set operation formulas. .because The non-empty set triggered an entity verification exception signal.
[0258] Subsequently, the consistency verification module performs output link clearing, deleting any text containing missing security risks from the cache and directly retrieving the original structured SOP form, then forcibly degrading the structured SOP form output. Simultaneously, the system initiates read-only communication isolation to prevent erroneous control commands from being sent to the underlying physical control system, ensuring the absolute physical safety of the field equipment.
[0259] To verify the technical effect of the present invention, the system was tested and verified using 1,000 historical industrial system fault repair records.
[0260] See attached document Figure 8 The graph displays real-time hazardous condition characteristic values on the horizontal axis, ranging from 20 to 100; and dynamic penalty coefficients on the vertical axis, ranging from 0 to 6. The legend and graph content include two lines: a solid line representing the dynamic penalty coefficient curve, and a dashed line perpendicular to the horizontal axis at 35 representing the safety threshold. The trend of the solid line shows that when the real-time hazardous condition characteristic value on the horizontal axis is within the range of 20 to 35, the solid line remains horizontal, and the corresponding vertical axis value is constant at 1.0; when the characteristic value on the horizontal axis exceeds the safety threshold, the solid line shows a linear upward trend as the horizontal axis increases.
[0261] The reason for the aforementioned curve trend is that the dynamic penalty coefficient calculation formula configured in the system incorporates a comparison logic between the maximum value boundary constraint and the difference between the feature exceeding the limit. When the actual environmental feature value does not exceed the safety critical threshold, the difference is negative, the formula extracts a value of 0, and the penalty coefficient maintains a basic weight of 1.0; when the feature value is greater than the threshold, the difference is positive, and the penalty coefficient increases with the increase of the feature value, thereby increasing the dynamic verification cost weight of equipment in hazardous operating areas and limiting the system from generating on-site manual verification instructions for equipment in high-risk areas.
[0262] See attached document Figure 9 The chart uses a grouped bar chart format. The horizontal axis displays the labels of three candidate nodes: the tower top cooling fan, the main cooling water valve, and the backup branch valve. The vertical axis represents the calculated index values, ranging from 0 to 6. According to the legend, each candidate node is above three bars: dark gray bars represent the diagnostic information entropy reduction index, medium gray bars represent the dynamic verification cost, and light gray bars represent the expected cost ratio. The data at the top of the bars shows that the diagnostic information entropy reduction index for the tower top cooling fan is 1.00, the dynamic verification cost is 5.00, and the expected cost ratio is 0.20; the diagnostic information entropy reduction index for the main cooling water valve is 1.50, the dynamic verification cost is 1.20, and the expected cost ratio is 1.25; and the diagnostic information entropy reduction index for the backup branch valve is 0.90, the dynamic verification cost is 1.50, and the expected cost ratio is 0.60.
[0263] from Figure 9 The trend and comparison of the columnar distribution show that the gray column (dynamic verification cost) of the tower top cooling fan has the largest value. This is because the real-time ambient temperature at the location of this equipment exceeds the limit, triggering [the process / mechanism]. Figure 8 The dynamic penalty mechanism of this system results in a lower calculated value for the light gray bar (expected cost ratio) due to the increased verification cost. The main cooling water valve operates under safe conditions, maintaining a basic verification cost. Simultaneously, its diagnostic information entropy reduction index is the largest, making its expected cost ratio bar the highest among the three nodes. The inquiry scheduling algorithm designed in this system comprehensively calculates the information entropy reduction and the on-site verification cost, selecting the main cooling water valve with the highest expected cost ratio as the inquiry target node, thus achieving a balance between diagnostic path convergence efficiency and manual verification cost.
[0264] Furthermore, a data comparison was conducted between this system and the text generation method of the basic large language model. Test data shows that, by implementing consistency checks and forced degradation output mechanisms, this system reduced the entity omission anomaly rate in natural language response text from 14.2% in the basic large language model to 0%, and reduced the total number of inversion conflicts from an average of 7.5 per 100 operations to 0. These test results demonstrate that this system improves the completeness of output instructions and the accuracy of execution timing for the intelligent question-answering server in industrial scenarios.
[0265] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these specific embodiments are merely illustrative. Those skilled in the art can omit, substitute, and modify the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, combining the above method steps to perform substantially the same function and achieve substantially the same result using substantially the same method falls within the scope of the present invention.
Claims
1. A method for optimizing intelligent question-answering interaction services based on artificial intelligence, characterized in that, Includes the following steps: Receive the natural language interaction sequence from the human-computer interaction terminal and map it to the pre-constructed ontology state graph, and output the positive activation node set and the negative state node set; Perform a topology transformation on the ontology state diagram, and use the negative state node set to perform cascaded failure propagation calculations to generate a residual diagnostic diagram; In the residual diagnostic graph, a set of candidate diagnostic paths is extracted using the set of positively activated nodes. A set of unconfirmed state dependent nodes is extracted based on the set of candidate diagnostic paths. When the set of unconfirmed state dependent nodes is not empty, the target node for follow-up inquiry is determined and a prompt is initiated. The state update is performed repeatedly to make the set of candidate diagnostic paths converge until the target diagnostic path is locked. Extract the structured SOP sequence associated with the target diagnostic path, construct an action identifier set, and constrain the large language model to generate candidate natural language response text containing the action identifier set; The candidate natural language response text is subjected to action identifier consistency verification and timing reverse order conflict detection. If the verification passes, the candidate natural language response text is output to complete the question-and-answer interaction. If the verification fails, the output link is cleared and the structured SOP form is forcibly downgraded based on the structured SOP sequence and output. The human-computer interaction terminal presents the form to the user for confirmation and reference to perform the corresponding standard operation.
2. The method for optimizing intelligent question-answering interaction services based on artificial intelligence according to claim 1, characterized in that, The natural language interaction sequence received from the human-computer interaction terminal is mapped to a pre-constructed ontology state graph, and a set of positively activated nodes and a set of negatively activated state nodes are output, including: Feature extraction and intent classification are performed on the natural language interaction sequence, and the classification results are mapped to the ontology state graph; The pre-trained intent classification model outputs a classification probability distribution vector. When the label with the highest output probability is the intent label of an abnormal occurrence, the corresponding mapping node is assigned to the set of positive activation nodes. When the label with the highest output probability is a normal intent label or an abnormal intent label is excluded, the corresponding mapping node is assigned to the initial negative node candidate set. Calculate the semantic confidence scalar of the nodes within the initial negative node candidate set, and after filtering by the confidence threshold, merge the nodes that meet the deterministic filtering threshold into the negative state node set.
3. The method for optimizing intelligent question-answering interaction services based on artificial intelligence according to claim 1, characterized in that, Performing a topological transformation on the ontology state diagram includes: Perform strongly connected component contraction and acyclic topology transformation on the ontology state graph; A graph search algorithm is used to extract all strongly connected component combinations from the ontology state graph to generate a strongly connected component set. For each strongly connected component in the set of strongly connected components, construct a corresponding equivalent macro node; A node shrinking mapping function is constructed to map the nodes in the ontology state graph to the corresponding equivalent macro nodes; By retaining directed edges that span different equivalent macro nodes and removing directed edges inside strongly connected components, a directed acyclic graph with equivalent macro nodes is generated.
4. The method for optimizing intelligent question-answering interaction services based on artificial intelligence according to claim 3, characterized in that, Using the set of negative state nodes, perform cascaded failure propagation calculations to generate a residual diagnostic map, including: Each node in the negative state node set is transformed into a negative macro node set through the node shrinking mapping function; Perform state initialization operation on the directed acyclic graph of the equivalent macro nodes, and retrieve the causal dependency type identifier of the internal nodes of the ontology state graph; Taking the nodes in the negative macro node set as the starting point of derivation, the applicable joint triggering causal logic or any triggering causal logic is determined according to the causal dependency type identifier, and cascaded state derivation is performed on the nodes to update the node propagation state value. A set of security interception nodes is generated by selecting the nodes whose propagation state value is normal after derivation. The passage cost weight of the directed edge whose starting node is located inside the set of security interception nodes is forcibly updated to an infinite value, and the residual diagnostic graph is generated based on the updated passage cost weight distribution.
5. The method for optimizing an intelligent question-answering interaction service based on artificial intelligence according to claim 4, characterized in that, Based on the candidate diagnostic path set, an unconfirmed state dependency node set is extracted, including: The nodes in the set of positively activated macro nodes generated by the mapping transformation are used as traversal source points to trigger a depth-first search in the residual diagnostic graph; When the passage cost weight of the extended edge is detected to be equal to positive infinity, the forward search operation of the current branch is stopped and the state backtracking logic is triggered. The directed node sequence recorded when the search path reaches the corresponding endpoint is encapsulated and integrated to generate the candidate diagnostic path set; Extract the equivalent macro nodes contained in the candidate diagnostic path set and restore and unpack them to generate a global dependency node set based on the basic physical nodes; Read the set of instantiated nodes from the session state cache; After performing an intersection operation between the global dependency node set and the predefined queryable node set, the instantiated node set is stripped to generate the unconfirmed state dependency node set.
6. The method for optimizing an intelligent question-answering interaction service based on artificial intelligence according to claim 5, characterized in that, When the set of nodes dependent on the unconfirmed state is not empty, determine the target node for follow-up inquiry and initiate a prompt, including: Obtain real-time operating condition data to calculate dynamic verification costs and information entropy reduction indicators; Calculate the basic information entropy of the current diagnostic space based on the total number of candidate paths, and calculate the conditional information entropy after assuming the acquisition of the state of the nodes that depend on the unconfirmed state. The numerical difference between the basic information entropy and the conditional information entropy is calculated as the information entropy reduction index. The dangerous operating condition characteristic values collected in real time by the sensor are retrieved as the real-time operating condition data, and the dynamic penalty coefficient combined with the engineering safety critical threshold is calculated using the operating condition mapping formula. Obtain the pre-quantized basic verification cost of the corresponding node, and perform a multiplication operation between the basic verification cost and the dynamic penalty coefficient to obtain the dynamic verification cost; Calculate the ratio of the information entropy reduction index to the expected cost of the dynamic verification cost, and extract the node with the largest expected cost ratio as the target node for follow-up inquiry.
7. The method for optimizing intelligent question-answering interaction services based on artificial intelligence according to claim 1, characterized in that, Extract the structured SOP sequence associated with the target diagnostic path, construct an action identifier set, and constrain the large language model to generate candidate natural language response text containing the action identifier set, including: Extract the standard operating procedure parameters and handling instruction text that must be performed to address the cause of the fault, and arrange them in chronological order to generate the structured SOP sequence; For each independent operation instruction in the structured SOP sequence, a corresponding action identifier is generated by combining a hash function with the order index and the system timestamp; Combine all action identifiers to construct an immutable set of action identifiers within the session and assign them to corresponding independent operation instructions; Construct a key-value pair mapping table to bind the action identifier with the independent operation instruction; The structured SOP sequence and the action identifier set are assembled into a structured prompt word text, which is then input into the large language model to constrain the large language model to generate the candidate natural language response text.
8. The method for optimizing intelligent question-answering interaction services based on artificial intelligence according to claim 7, characterized in that, Perform action identifier consistency verification on the candidate natural language response text, including: The regular expression matching unit is invoked to perform a full scan of the candidate natural language response text, extracting strings to construct the actual generated identifier set; The actual generated identifier set and the action identifier set are loaded into the computation cache and a bidirectional set difference operation is performed. Obtain the set of omitted identifiers and the set of redundant identifiers in the output after the operation; When the set of missing identifiers or the set of redundant identifiers is not empty, the consistency check of the action identifier is determined to have failed and an entity check exception signal is triggered.
9. The method for optimizing an intelligent question-answering interaction service based on artificial intelligence according to claim 8, characterized in that, The temporal reverse collision detection includes: The dependency parser is invoked to parse the candidate natural language response text and generate a dependency parsing tree representing the dominance relationships between words; Locate the lexical node containing the action identifier in the dependency syntax tree, and extract the modification features by tracing upwards along the dependency arc; The modification features are converted into time offsets according to a preset time sequence rule mapping table; Extract the initial position index of the action identifier in the original text stream and sum it with the time offset to generate a comprehensive time weight; All action identifiers are rearranged in ascending order based on the comprehensive time weight, and an execution sequence number is assigned to each action. Parse the internal operational dependencies of the structured SOP sequence to generate a standard partial order relation set; For the standard partial order relation set, compare the action execution order label to perform reverse order conflict calculation. When the total number of reverse order conflicts is greater than zero, trigger a reverse order conflict exception signal.
10. The method for optimizing an intelligent question-answering interaction service based on artificial intelligence according to claim 9, characterized in that, The step of performing output link clearing processing when the pass is not achieved and forcibly downgrading the output structured SOP form based on the structured SOP sequence includes: When the action identifier consistency check or the timing reverse conflict detection fails, the candidate natural language response text is forcibly deleted from the internal output queue, session state cache and front-end pending send buffer of the intelligent question answering interaction service system, and data overwrite and reference release operations are performed to complete the output link clearing process. Extract the underlying hard-coded data of action names, safety operation parameter thresholds, and physical execution locations contained within the structured SOP sequence; The underlying hard-coded data is sequentially filled into a preset static structured SOP form template to generate the structured SOP form. The structured SOP form is output to the human-computer interaction terminal for user confirmation and reference, and downlink communication link isolation is performed in the read-only data acquisition channel.
