Artificial intelligence-based decision fault-tolerant method, device and equipment

CN122779302BActive Publication Date: 2026-10-27BEIJING UMU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611250227.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-27
Estimated Expiration
2046-08-18

AI Technical Summary

Technical Problem

[0007]本申请实施例提供的基于人工智能的决策容错方法,通过将人工智能决策容错应用于包括外层循环、嵌套于外层循环内部的内层循环以及多组独立信号通道的双层智能体循环架构,通过外层循环获取会话历史数据、用户输入数据以及工具配置数据构成的会话相关数据,再通过内层循环结合会话相关数据生成数据查询指令并确定对应的目标数据,读取当前会话的推理深度档位数据,将推理深度档位数据、目标数据以及会话相关数据输入内层循环搭载的神经网络模型中完成推理决策得到推理输出结果,并根据双层智能体循环架构对推理输出结果进行有效性校验,在推理输出结果不符合预设有效条件时,通过内层循环识别推理运行过程中的各类异常场景并匹配对应的纠错恢复策略完成决策容错修正,有效克服了相关技术中人工智能决策系统采用单层线性执行架构、依靠固定单次推理链路完成决策输出,仅能通过默认处理方式统一应对推理深度档位不兼容、数据异常等各类异常场景、无法匹配适配纠错处理逻辑而导致决策结果不准确的技术缺陷,从而提高决策结果的准确性

Benefits of technology

[0017]本申请实施例提供的基于人工智能的决策容错方法,通过内层循环监测神经网络模型进行推理后输出的字符长度,结合字符长度与预设的输出字符阈值识别是否存在输出字符超限的模型输出截断异常,在识别到输出字符超限的情况下,由于第一输出字符完整,其指示可正常输出、无截断缺陷的合规推理内容,因此可以输出未超限的第一输出字符,由于第二输出字符指示无法完整输出的推理内容,因此需要将第二输出字符输入神经网络模型继续推理以实现决策容错修正,能够有效解决模型输出字符超限导致的内容截断、推理输出不完整的问题,保障模型推理输出内容的完整性与连续性,避免因模型输出截断异常处理方式单一笼统而造成决策内容缺失、决策结果不准确的情况。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122779302B_ABST
    Figure CN122779302B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, and discloses a decision fault-tolerant method, device and equipment based on artificial intelligence, which are applied to a double-layer intelligent agent circulation architecture, the double-layer intelligent agent circulation architecture comprises an outer layer circulation, an inner layer circulation nested in the inner part of the outer layer circulation, and multiple groups of independent signal channels, the method comprises the following steps: obtaining conversation-related data through the outer layer circulation; generating a data query instruction based on preset program logic and the conversation-related data through the inner layer circulation, and determining target data based on the data query instruction; reading reasoning depth gear data of a current conversation through the inner layer circulation, inputting the reasoning depth gear data, the target data and the conversation-related data into a neural network model carried by the inner layer circulation to perform reasoning and decision, and obtaining reasoning output results; performing effectiveness verification on the reasoning output results through the double-layer intelligent agent circulation architecture; and matching a corresponding error correction recovery strategy based on an abnormal scene, so that decision fault tolerance correction is realized based on the error correction recovery strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to a decision-making fault-tolerant method, apparatus, and device based on artificial intelligence. Background Technology

[0002] In intelligent agent decision-making scenarios driven by large language models, the intelligent agent needs to complete instruction generation, data query, parameter matching and model inference decision-making based on multi-dimensional conversation data such as conversation history, user input, and tool configuration, and output the decision results.

[0003] In related technologies, artificial intelligence decision-making systems adopt a single-layer linear execution architecture, which completes intelligent decision output based on a fixed single inference link.

[0004] However, in actual operation, intelligent agents are prone to problems such as incompatibility of inference depth levels and data anomalies. Using the default processing method to deal with all anomalies is not possible because it is impossible to match and adapt error correction logic for various abnormal scenarios, resulting in inaccurate decision-making results. Summary of the Invention

[0005] In view of this, this application provides an artificial intelligence-based decision-making fault-tolerant method to solve the problems in related technologies.

[0006] Firstly, this application provides an AI-based decision-making fault-tolerance method. This AI-based decision-making fault-tolerance method is applied to a two-layer intelligent agent loop architecture, which includes an outer loop, an inner loop nested within the outer loop, and multiple independent signal channels. The method includes: acquiring session-related data through the outer loop; wherein, session-related data includes session history data, user input data, and tool configuration data; generating data query instructions through the inner loop based on preset program logic and session-related data, and determining the corresponding target data based on the data query instructions; reading the inference depth level data of the current session through the inner loop, inputting the inference depth level data, target data, and session-related data into the neural network model mounted on the inner loop to perform inference decision-making, and obtaining inference output results; validating the inference output results through the two-layer intelligent agent loop architecture; wherein, if the inference output results do not meet the preset valid conditions, identifying abnormal scenarios in the inference process through the inner loop, and matching corresponding error correction and recovery strategies based on the abnormal scenarios, so as to achieve decision-making fault-tolerance correction based on the error correction and recovery strategies.

[0007] The AI-based decision-making fault-tolerance method provided in this application applies AI decision-making fault tolerance to a two-layer intelligent agent loop architecture, including an outer loop, an inner loop nested within the outer loop, and multiple independent signal channels. The outer loop acquires session-related data, consisting of session history data, user input data, and tool configuration data. The inner loop then combines this session-related data to generate a data query command and determine the corresponding target data. It reads the inference depth level data of the current session and inputs the inference depth level data, target data, and session-related data into the neural network model mounted in the inner loop to complete the inference decision and obtain the inference result. The system outputs results and verifies the validity of the inference output based on a two-layer intelligent agent loop architecture. When the inference output does not meet the preset validity conditions, the inner loop identifies various abnormal scenarios in the inference process and matches corresponding error correction and recovery strategies to complete the decision-making fault tolerance correction. This effectively overcomes the technical defects of related technologies, such as artificial intelligence decision-making systems that adopt a single-layer linear execution architecture, rely on a fixed single inference link to complete decision output, can only uniformly deal with various abnormal scenarios such as incompatibility of inference depth levels and data anomalies through default processing methods, and cannot match and adapt error correction processing logic, resulting in inaccurate decision results. This improves the accuracy of decision results.

[0008] In one possible implementation, abnormal scenarios during inference execution include inference depth incompatibility anomalies. The decision-making fault tolerance correction is implemented based on an error correction and recovery strategy, which includes: capturing incompatibility error data reported by the neural network model during the invocation process through an inner loop; detecting whether the inference depth level exceeds the inference depth range based on the incompatibility error data; if the inference depth level exceeds the inference depth range, determining the adjusted inference depth level parameters based on a preset inference depth gradient degradation sequence, in descending order of priority; and implementing decision-making fault tolerance correction based on the adjusted inference depth level parameters.

[0009] The AI-based decision-making fault-tolerance method provided in this application captures incompatibility error data reported by the neural network model during the invocation process through an inner loop. Based on the incompatibility error data, it detects whether the inference depth level exceeds the inference level range. When the inference depth level exceeds the range, it determines the downgraded inference depth level parameter according to a preset inference depth gradient degradation sequence in descending priority order. Based on the downgraded inference depth level parameter, it realizes decision-making fault-tolerance correction. It can perform specific adaptation and correction for inference depth level incompatibility anomalies during inference operation, replacing the processing mode of using a uniform default processing method to deal with various abnormal scenarios in related technologies. It can solve the inference anomaly problem caused by the mismatch between the inference depth level and the model inference level range, and effectively improve the pertinence and adaptability of decision-making fault-tolerance correction in inference depth level incompatibility anomaly scenarios.

[0010] In one possible implementation, abnormal scenarios during inference operation include agent operation message anomalies. Based on the abnormal scenario, a corresponding error correction and recovery strategy is matched, including: collecting message data during agent operation through an inner loop; parsing and classifying the message data to determine the target error type; wherein the target error type includes context overflow error type, inference gear incompatibility error type, and transient network error type; and determining the error correction and recovery strategy corresponding to the target error type based on the target error type.

[0011] The AI-based decision-making fault-tolerance method provided in this application collects message data during the operation of the intelligent agent through an inner loop, parses and classifies the message data, and determines target error types, including context overflow error types, inference gear incompatibility error types, and transient network error types. Based on the target error types, it determines the corresponding error correction and recovery strategies. This method can identify and match the types of abnormal intelligent agent operation messages during inference operation, replacing the coarse handling mode of using a uniform default processing method to deal with various abnormal scenarios in related technologies. It can match appropriate error correction and recovery logic according to different error types of intelligent agent operation messages, effectively improving the accuracy and adaptability of abnormal handling in abnormal intelligent agent operation message scenarios, and avoiding the problem of inaccurate decision results caused by a single and untargeted message abnormality handling method.

[0012] In one possible implementation, based on the abnormal scenario, a corresponding error correction and recovery strategy is matched, including: checking the preceding data query and tool execution process through an inner loop to identify whether there is a tool execution result carrying an error flag; if there is a tool execution result carrying an error flag, injecting the error flag and the current valid content data of the tool back into the session context; using a neural network model, determining the type of abnormality based on the injected error flag and the current valid content data of the tool; and generating an error correction and recovery strategy corresponding to the determined abnormality type based on the determined abnormality type.

[0013] The AI-based decision-making fault-tolerance method provided in this application detects the preceding data query and tool execution process through an inner loop to identify whether there are tool execution results carrying error flags. When such results exist, the error flags and the current valid content data of the tool are injected back into the session context. A neural network model determines the anomaly type based on the injected error flags and the current valid content data of the tool, and generates a corresponding error correction and recovery strategy based on the anomaly type. This method can identify, inject context, and generate customized strategies for anomalies generated during tool execution, replacing the unified default processing mode used in related technologies to handle various anomaly scenarios. It solves the shortcomings of traditional solutions in not being able to perform fine-grained tracing and strategy adaptation for tool execution anomalies, effectively improving the targeting of anomaly handling in preceding data query and tool execution anomaly scenarios, and avoiding inaccurate decision results caused by generalized handling of tool execution anomalies.

[0014] In one possible implementation, the method further includes: collecting incremental event data generated segment by segment during the inference process of the neural network model through an inner loop; identifying the content attributes of the incremental event data to obtain event identification results; dividing the event identification results into key decision event results and non-key display event results based on a preset event weight standard; pushing key decision event results using a blocking push mode; and pushing non-key events using a non-blocking push mode.

[0015] The AI-based decision-making fault-tolerance method provided in this application collects incremental event data generated segment by segment during the inference process of a neural network model through an inner loop. It identifies the content attributes of the incremental event data to obtain event identification results. Based on preset event weights, the event identification results are divided into key decision event results and non-key display event results. A blocking push mode is used to push key decision event results, while a non-blocking push mode is used for non-key events. This differentiated and hierarchical push control is implemented to address the incremental data transmission characteristics of the model's streaming inference output process. This replaces the coarse processing mode in related technologies that uses a uniform default push method to handle all streaming event data. It ensures the complete and reliable push of key decision event results, avoids the loss of core decision data, and improves the push efficiency of non-key display event results. This effectively improves the stability and standardization of the model's streaming inference output process, and avoids the problems of missing decision information and inaccurate decision results caused by a single, undifferentiated streaming event push method.

[0016] In one possible implementation, abnormal scenarios during the inference process include model output truncation anomalies. A decision-making fault-tolerance correction strategy is implemented based on error correction and recovery, including: monitoring the character length output by the neural network model after inference through an inner loop; identifying whether there is an output character limit exceeding the limit based on the character length and a preset output character threshold; if there is an output character limit exceeding the limit, outputting a first output character that does not exceed the limit, and inputting a second output character into the neural network model for inference to achieve decision-making fault-tolerance correction; wherein, the first output character indicates the inference content that can be output normally, and the second output character indicates content that cannot be completely generated and cannot be output normally.

[0017] The AI-based decision-making fault-tolerance method provided in this application monitors the character length output by the neural network model after inference through an inner loop. It combines the character length with a preset output character threshold to identify whether there is a model output truncation anomaly due to excessive output characters. If an excessive output character is detected, since the first output character is complete, it indicates compliant inference content that can be output normally without truncation defects. Therefore, the first output character that does not exceed the threshold can be output. Since the second output character indicates incomplete inference content, it needs to be input into the neural network model to continue inference to achieve decision-making fault-tolerance correction. This effectively solves the problem of content truncation and incomplete inference output caused by excessive model output characters, ensuring the integrity and continuity of the model's inference output content and avoiding situations where decision content is missing or decision results are inaccurate due to a single and general approach to handling model output truncation anomalies.

[0018] In one possible implementation, the target data is determined based on the data query command, including: retrieving the initial target data through an inner loop based on the data query command; performing redundant field screening, format validation, and invalid data filtering on the initial target data to obtain the target data to be processed; and removing duplicate data, garbled data, and invalid data from the target data to be processed to determine the target data.

[0019] The decision-making fault-tolerance method based on artificial intelligence provided in this application retrieves initial target data based on data query instructions through an inner loop. The initial target data is then subjected to redundant field screening, format verification, and invalid data filtering to obtain the target data to be processed. Duplicate data, garbled data, and invalid data in the target data to be processed are removed to determine the target data. The target data required for model inference is subjected to pre-normalization cleaning and screening processing, which replaces the coarse processing mode of directly using the raw retrieved data to participate in model inference in related technologies. It can effectively avoid the interference of redundant fields, abnormal formats, duplicate data, garbled data, and various invalid data on the inference process.

[0020] In one possible implementation, the method further includes: calculating the confidence score of the inference output of the neural network model; detecting whether the confidence score is less than a preset confidence threshold; if the confidence score is less than the preset confidence threshold, determining that the current inference output does not meet the preset validity conditions. If the confidence score is not less than the preset confidence threshold, determining that the current inference output meets the preset validity conditions.

[0021] The decision-making fault-tolerant method based on artificial intelligence provided in this application calculates a confidence score by performing confidence calculation on the inference output of the neural network model. It then detects whether the confidence score is less than a preset confidence threshold. If the confidence score is less than the preset confidence threshold, the current inference output is determined to not meet the preset validity conditions. If the confidence score is not less than the preset confidence threshold, the current inference output is determined to meet the preset validity conditions. By using a confidence scoring mechanism to verify the validity of the inference output, this method replaces the crude processing mode in related technologies that relies solely on fixed rules or directly outputs inference results without any verification mechanism. It can identify hidden anomalies such as low credibility and substandard inference quality in the model's inference output, and avoids the problem of directly using low-confidence and unreliable inference output as the decision result.

[0022] Secondly, this application provides an AI-based decision-making fault-tolerant device. This device is applied to a two-layer intelligent agent loop architecture, which includes an outer loop, an inner loop nested within the outer loop, and multiple independent signal channels. The device includes: an acquisition module for acquiring session-related data through the outer loop; wherein the session-related data includes session history data, user input data, and tool configuration data; a generation module for generating data query instructions based on preset program logic and session-related data through the inner loop, and determining the corresponding target data based on the data query instructions; a reading module for reading the inference depth level data of the current session through the inner loop, inputting the inference depth level data, target data, and session-related data into the neural network model mounted on the inner loop to execute inference decision-making and obtain inference output results; and a verification decision module for validating the inference output results through the two-layer intelligent agent loop architecture. If the inference output results do not meet preset valid conditions, the inner loop identifies abnormal scenarios during the inference process and matches corresponding error correction and recovery strategies based on the abnormal scenarios to achieve decision-making fault tolerance correction.

[0023] Thirdly, this application provides an electronic device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the artificial intelligence-based decision-making fault-tolerant method described in the first aspect or any corresponding embodiment.

[0024] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the artificial intelligence-based decision-making fault-tolerant method described in the first aspect or any corresponding embodiment thereof.

[0025] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the artificial intelligence-based decision-making fault-tolerant method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0026] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0027] Figure 1 This is a flowchart illustrating an AI-based decision-making fault-tolerant method according to an embodiment of this application. Figure 2 This is a structural block diagram of an AI-based decision-making fault-tolerant device according to an embodiment of this application; Figure 3 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] According to an embodiment of the present invention, an embodiment of a decision-making fault-tolerant method based on artificial intelligence is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0030] This embodiment provides an AI-based decision-making fault-tolerant method that can be applied to a two-layer intelligent agent loop architecture, which includes an outer loop, an inner loop nested within the outer loop, and multiple independent signal channels. Figure 1 This is a flowchart illustrating an AI-based decision-making fault-tolerant method according to an embodiment of this application, as shown below. Figure 1 As shown, this AI-based decision-making fault-tolerance method may include the following steps: Step S101: Obtain session-related data through an outer loop; wherein, session-related data includes session history data, user input data, and tool configuration data.

[0031] The outer loop can indicate the outer coordination and scheduling unit of the two-layer intelligent agent loop architecture. It can serve as the top-level execution link of the architecture and can be used for global session management, data acquisition, session context locking, and persistent data storage.

[0032] Session-related data can indicate the set of valid data generated by an agent within a single complete interaction session. Session-related data can include session history data, user input data, tool configuration data, etc.

[0033] Session history data can indicate the data retained from multiple rounds of interaction before the current session. Specifically, it can include historical user commands, historical model decision outputs, past tool call records, historical error correction logs, and other data.

[0034] User input data can indicate the raw interactive data that the user enters in real time during the current round. Specifically, it can include user-initiated information such as text commands, parameter requirements, task requirements, and constraints.

[0035] Tool configuration data can indicate the preset configuration parameters of various functional tools carried by the intelligent agent. Specifically, it can include data such as tool call permissions, execution thresholds, running rules, parameter format requirements, start and stop conditions, and preset error reporting rules.

[0036] Specifically, the outer loop listens to the current agent's session state and captures session-related data when a session starts or a new round of inference tasks is triggered.

[0037] For example, in an intelligent question-and-answer interaction scenario, the outer loop listens to the conversation process. When a user initiates a consultation command, it collects relevant data for this conversation. This includes historical conversation data such as past question-and-answer records and historical tool call error correction logs within the current dialogue round; user input data such as the user's current text consultation command and requirement constraints; and tool configuration data such as preset call thresholds, format specifications, and error triggering rules for question-and-answer retrieval tools and data validation tools.

[0038] For example, in a smart office automation task processing scenario, the outer loop periodically polls the session task status. When a new office task instruction is detected, a data collection process is triggered. Session history data includes past document processing records, task approval history, and tool call execution logs; user input data includes user-uploaded files to be processed, task approval instructions, and task priority settings; tool configuration data includes permission configurations, execution thresholds, and abnormal triggering conditions for document parsing tools, format validation tools, and approval process tools.

[0039] For example, in the intelligent operation and maintenance decision-making scenario of industrial equipment, the outer loop is bound to a dedicated operation and maintenance session for the equipment, and operation and maintenance session data is collected in real time. The session history data includes the equipment's historical operation and maintenance records, past fault reasoning logs, and tool debugging history data; user input data includes equipment detection commands, fault diagnosis requirements, and parameter adjustment commands input by operation and maintenance personnel; tool configuration data includes the operating thresholds, calling rules, and anomaly judgment criteria of equipment data acquisition tools, fault identification tools, and parameter calibration tools.

[0040] Step S102: Generate a data query instruction based on preset program logic and session-related data through an inner loop, and determine the corresponding target data based on the data query instruction.

[0041] Inner loops can instruct fine-grained operations and fault-tolerant execution units nested within outer loops, specifically for data processing, instruction generation, model reasoning, anomaly detection, and error correction.

[0042] The preset program logic can instruct the agent on the standardized data processing and instruction generation rules built in, which may include data matching rules, query instruction generation syntax rules, data filtering logic rules, parameter adaptation rules, etc.

[0043] Data query commands can instruct inner loops to generate executable commands based on session requirements, which are used to retrieve business data, tool data, and model support data that match the current session task.

[0044] The target data can refer to the standardized and effective data that has been retrieved, cleaned, verified, and filtered through the inner loop and can be directly input into the neural network model.

[0045] Specifically, the inner loop calls built-in preset program logic to perform semantic parsing, requirement matching, and parameter adaptation on the collected session history data, user input data, and tool configuration data. It then generates data query instructions based on the current session's task objectives, retrieving initial data that matches the task requirements. Simultaneously, the inner loop performs standardized cleaning processes on the retrieved initial data, including redundant field screening, format validation, invalid data filtering, and removal of duplicate and garbled data. This filters out various types of dirty and invalid data, resulting in target data that is formatted correctly and has valid content.

[0046] As an example, the inner loop, based on pre-defined data query logic, parses conversational data related to user Q&A, identifies core user consultation needs and tool call requirements, generates targeted business data query instructions, and retrieves the corresponding initial data from the business knowledge base. Subsequently, the retrieved initial knowledge base data is screened for redundant advertising fields and invalid remarks, its text format is verified for consistency, and duplicate knowledge points, garbled characters, and invalid blank data are removed, completing data cleaning to obtain the target data.

[0047] As an example, the inner loop parses user office approval and document processing session-related data according to the preset office task processing logic, identifies the current office task type, processing requirements, and tool adaptation rules, generates document data query and approval record query instructions, and retrieves the corresponding initial office document data and historical approval initial data. The initial data retrieved by the inner loop is then screened for redundant headers, invalid comments, and incorrectly formatted data. Duplicate file copies, garbled text, and invalid cached data are removed, and the data format is standardized to obtain the target data.

[0048] As an example, the inner loop, based on pre-defined equipment operation and maintenance program logic, parses session-related data related to equipment fault diagnosis, identifies the equipment model, fault diagnosis dimensions, and parameter detection requirements, generates equipment parameter query and fault log query commands, and retrieves initial data such as real-time equipment operating parameters and historical fault records. The initial data undergoes redundancy collection point data and abnormal null value data screening, removing duplicate parameter records, garbled data, invalid or expired data, completing data standardization processing to obtain the target data.

[0049] Step S103: Read the inference depth level data of the current session through the inner loop, input the inference depth level data, target data and session-related data into the neural network model carried by the inner loop to perform inference decision-making, and obtain the inference output result.

[0050] The inference depth level data can indicate the preset model inference level parameters, which are used to define the computational depth, analysis dimension, and number of iterations of the neural network model in this inference, and are divided into high, medium, and low gradient levels.

[0051] The inference output can indicate the initial decision result output by the neural network model after processing based on multi-dimensional input data. Specifically, it can include initial inference information such as business decision content, data analysis conclusions, and tool call instructions, and is divided into two categories: valid results and abnormal invalid results.

[0052] Specifically, the inner loop retrieves the inference depth level data matched by the current session, and synchronously inputs the preprocessed target data, session-related data, and inference depth level data into the neural network model to achieve multi-dimensional data fusion inference.

[0053] As an example, the inner loop reads the high-order inference depth level data corresponding to the current question-and-answer session, and inputs the cleaned target data, user consultation session-related data, and level parameter data into the neural network model. Based on the high-deep inference level, the model comprehensively analyzes the user's consultation needs, knowledge base matching content, and conversation history logic, and completes semantic matching, answer deduction, and logical verification operations. Finally, it outputs standardized question-and-answer inference results for subsequent validity verification.

[0054] Step S104: The validity of the inference output is verified by a two-layer intelligent agent loop architecture. If the inference output does not meet the preset validity conditions, the inner loop identifies abnormal scenarios in the inference process and matches the corresponding error correction and recovery strategy based on the abnormal scenarios to achieve decision-making fault tolerance correction based on the error correction and recovery strategy.

[0055] Validity verification can instruct the two-layer intelligent agent loop architecture to check the compliance of the model inference output results, which can include multi-dimensional judgments such as confidence verification, format verification, content integrity verification, and logical compliance verification.

[0056] Preset valid conditions can indicate the preset criteria for judging the validity of inference results. Specifically, these can include multi-dimensional judgment conditions such as pre-set reliability thresholds, output character thresholds, logical compliance standards, and format specification standards.

[0057] Abnormal scenarios during inference operation can indicate various abnormal conditions that occur in the model inference process, including incompatibility of inference depth levels, agent message abnormalities, tool execution abnormalities, model output truncation abnormalities, low confidence abnormalities, etc.

[0058] Error correction and recovery strategies can indicate pre-defined repair schemes for different abnormal scenarios, which may include gear gradient degradation strategies, message classification repair strategies, tool anomaly back-injection strategies, output continuation inference strategies, and iterative re-push strategies.

[0059] Decision fault tolerance correction can instruct the inner loop to adaptively repair, iteratively re-push, and adjust parameters for abnormal inference results and abnormal inference processes according to the matching error correction and recovery strategy, and output a valid and compliant decision result.

[0060] Specifically, after determining the inference output, the validity of the inference output can be verified through a two-layer intelligent agent loop architecture, so as to achieve decision-tolerance correction based on the error correction and recovery strategy.

[0061] As an example, the two-layer intelligent agent loop architecture validates the question-answering inference output by calculating the confidence score of the inference result and comparing it with a preset confidence threshold, while also checking the output character length and content completeness. If an inference depth level is detected to be too high, causing a level incompatibility anomaly, an output character truncation anomaly, or a confidence score that does not meet the preset validity conditions, the inference result is determined to be invalid. The inner loop accurately identifies the corresponding abnormal scenario, matches a level gradient degradation strategy, a character continuation inference strategy, and an iterative re-inference strategy, performs fault-tolerant correction on the abnormal inference process, re-completes the inference calculation, and outputs a compliant question-answering decision result.

[0062] As an example, the two-layer intelligent agent loop architecture validates the output of office approval inference, checking the confidence level of the approval result, the completeness of document parsing, and the compliance of the process. If tool execution errors, message context overflow anomalies, or low confidence anomalies are detected, the current office inference result is determined to be invalid. The inner loop collects abnormal message data and tool error marker data, classifies and identifies the anomaly type, matches the tool data back-injection, message repair, and iterative inference error correction and recovery strategies, corrects the office inference anomalies, and regenerates compliant office approval decision results.

[0063] As an example, the two-layer intelligent agent loop architecture validates the results of device fault diagnosis inference by checking the confidence level of the inference, the completeness of parameter matching, and the standardization of the output content. If transient network packet anomalies, model output truncation anomalies, or inference level incompatibility anomalies occur, the fault inference results are determined to be invalid. The inner loop locates the abnormal scenario, matches the corresponding network packet repair, segmented continuation inference, and level downgrade adaptation error correction strategies, and outputs the device fault diagnosis decision results.

[0064] The AI-based decision-making fault-tolerance method provided in this application applies AI decision-making fault tolerance to a two-layer intelligent agent loop architecture, including an outer loop, an inner loop nested within the outer loop, and multiple independent signal channels. The outer loop acquires session-related data, consisting of session history data, user input data, and tool configuration data. The inner loop then combines this session-related data to generate a data query command and determine the corresponding target data. It reads the inference depth level data of the current session and inputs the inference depth level data, target data, and session-related data into the neural network model mounted in the inner loop to complete the inference decision and obtain the inference result. The system outputs results and verifies the validity of the inference output based on a two-layer intelligent agent loop architecture. When the inference output does not meet the preset validity conditions, the inner loop identifies various abnormal scenarios in the inference process and matches corresponding error correction and recovery strategies to complete the decision-making fault tolerance correction. This effectively overcomes the technical defects of related technologies, such as artificial intelligence decision-making systems that adopt a single-layer linear execution architecture, rely on a fixed single inference link to complete decision output, can only uniformly deal with various abnormal scenarios such as incompatibility of inference depth levels and data anomalies through default processing methods, and cannot match and adapt error correction processing logic, resulting in inaccurate decision results. This improves the accuracy of decision results.

[0065] In one possible implementation, abnormal scenarios during inference execution include incompatibility issues related to inference depth levels. Specifically, step S104 above, which implements decision-making fault tolerance correction based on an error correction and recovery strategy, includes: Step a1: Capture gear incompatibility error data reported by the neural network model during the invocation process through the inner loop.

[0066] Gear incompatibility error data can indicate that the neural network model actively feeds back standardized abnormal data during the initialization phase of receiving and loading the current session inference depth gear parameters and starting inference operations, due to the gear parameters not matching the current running version, computing permissions, and resource configuration of the model. Specifically, it can include key information such as gear parameter values, reasons for mismatch, model adaptation range, and error timestamp.

[0067] Specifically, the inner loop monitors the neural network model's call and inference initialization process. At the moment the model loads the inference depth level parameters corresponding to the current session and initiates inference decisions, the inner loop listens for the model's feedback messages and runtime logs. If it detects that the inference level parameters are incompatible with its own runtime configuration and computational rules, it outputs incompatibility error data.

[0068] As an example, in an intelligent question-answering reasoning scenario, the inner loop starts the neural network model and loads the high-order reasoning depth level parameters of the current session. It identifies that the current high-order level exceeds the operational adaptation range of the model's standard version and generates level incompatibility error data, including level parameter exceeding limits, adaptation level range, and session identifier.

[0069] As an example, in a long-text intelligent creative reasoning scenario, a user initiates a text generation task, matching the highest-level reasoning depth parameter. The inner loop calls a lightweight neural network model to perform creative reasoning. The lightweight model is only adapted to low-to-medium-level reasoning and cannot recognize high-level parameters, returning incompatibility error data, including information such as level mismatch and model computing power adaptation threshold.

[0070] Step a2: Based on the gear incompatibility error data, check whether the inference depth gear exceeds the inference gear range.

[0071] The inference level range can indicate the range of legal inference depth levels that are preset and fixedly adapted by the neural network model at the factory. Specifically, it can include the lowest adaptation level, the highest adaptation level, and the intermediate gradient level.

[0072] Specifically, the inner loop retrieves the preset standard inference level range of the neural network model, compares and verifies the current session inference depth level parameter carried in the error data with the inference level range, and determines whether the detected inference depth level exceeds the inference level range.

[0073] Step a3: If the inference depth level exceeds the inference level range, determine the adjusted inference depth level parameter based on the preset inference depth gradient degradation sequence and in descending priority order.

[0074] The inference depth gradient degradation sequence can indicate a preset set of degradation rules for each gear level. It is a list of inference depth gear levels arranged in descending order, specifying the degradation priority and adaptation logic for ultra-high-order, high-order, medium-order, and low-order gear levels.

[0075] The adjusted inference depth level parameter can indicate the range of inference levels that match the neural network model after being adjusted step by step according to the gradient degradation sequence and priority.

[0076] Specifically, if the inference depth level exceeds the inference level range, the inference depth level parameter can be further determined based on the preset inference depth gradient degradation sequence, in order of priority from high to low.

[0077] As an example, the inner loop calls the system's built-in inference depth gradient degradation sequence, which is strictly sorted from high to low according to the level of fineness, and matches the standard inference level range of the model step by step, giving priority to the compliant level parameter with the highest accuracy after degradation and the best fit for the original task's inference requirements.

[0078] As an example, the preset inference depth gradient degradation sequence is high-order, mid-order, and low-order. The high-order level in the current session is outside the range of the lightweight model. The inner loop degrades the gradient level step by step according to priority, skipping incompatible high-order levels and matching the next-lower mid-order level parameters.

[0079] Step a4: Based on the adjusted inference depth level parameter, implement decision-making fault tolerance correction.

[0080] The inner loop discards the original out-of-limit anomaly level parameters, reloads the reduced compliance inference depth level parameters into the neural network model, replaces the anomaly parameter configuration, restarts the model initialization and inference operation process, and re-executes the fusion inference decision based on the compliance level parameters, the original target data, and the session-related data.

[0081] As an example, the inner loop reloads the corrected standard higher-order parameters into the question-answering inference neural network model, replacing the original out-of-limit ultra-high-order parameters, and restarts the model's inference process. The model is then initialized normally based on compliant parameters, adapts its computational logic, and re-executes question-answering inference by combining session data and target data from the knowledge base.

[0082] As an example, the inner loop reconfigures the adapted intermediate-level inference parameters for the lightweight text creation model, restarting the copywriting generation inference process. The model loads its computational logic normally based on the compliant parameters, fully parses the user's creative needs and source data, and successfully completes the long text creation inference.

[0083] This method captures incompatibility error data from the neural network model during invocation via an inner loop. Based on this error data, it detects whether the inference depth level exceeds the inference level range. When the inference depth level exceeds the range, it determines the adjusted inference depth level parameters according to a preset inference depth gradient degradation sequence, prioritizing them from high to low. Based on these adjusted parameters, it implements decision-making fault tolerance correction. This method can specifically adapt and correct inference depth level incompatibility anomalies during inference operation, replacing the uniform default processing method used in related technologies to handle various abnormal scenarios. It can solve inference anomaly problems caused by mismatch between the inference depth level and the model's inference level range, effectively improving the targeting and adaptability of decision-making fault tolerance correction in inference depth level incompatibility anomaly scenarios.

[0084] In one possible implementation, abnormal scenarios during the inference process include agent operation message anomalies; wherein, step S104 above, based on the abnormal scenario, matching the corresponding error correction and recovery strategy may include the following steps: Step b1 involves collecting message data during the operation of the intelligent agent through an inner loop.

[0085] An intelligent agent can instruct an artificial intelligence execution entity equipped with a two-layer intelligent agent loop architecture and based on a neural network model to realize conversational interaction, data query, reasoning decision-making, and tool invocation.

[0086] Message data can indicate the structured interactive data streams generated during the operation of the intelligent agent, specifically including time-series operational data such as model call request messages, context transmission messages, tool call feedback messages, network interaction response messages, and parameter loading feedback messages.

[0087] Specifically, in the process of running a two-layer intelligent agent loop architecture, where the intelligent agent performs data query, parameter loading, model inference, tool interaction, and network transmission, the inner loop captures message data generated by the interaction between the upstream and downstream of the intelligent agent in real time based on multiple independent signal channels.

[0088] As an example, in an intelligent question-answering interactive reasoning scenario, the agent continuously performs business question answering, knowledge base querying, and model reasoning operations. The inner loop listens to the agent's operation process through an independent signal channel, collects complete message data such as model parameter loading messages, context data transmission messages, knowledge base tool call feedback messages, and network response interaction messages, and retains the time-series interaction messages of the entire question-answering reasoning process.

[0089] As an example, in intelligent document processing and automated approval workflow scenarios, the intelligent agent continuously performs operations such as document parsing, process verification, approval node push, and parameter configuration invocation. The inner layer continuously collects file transfer messages, process invocation messages, parameter loading feedback messages, and service interaction response messages during the operation of the office intelligent agent.

[0090] Step b2 involves parsing and classifying the message data to determine the target error type; the target error types include context overflow error type, inference gear incompatibility error type, and transient network error type.

[0091] The target error type indicates the type of error that matches the abnormal operating condition of the agent after being parsed and categorized by the inner loop. The target error type can include context overflow error type, inference gear incompatibility error type, and transient network error type.

[0092] Context overflow error types can indicate error types such as excessive use of session terms in message data, overflow of context data stacking, and excessive accumulation of multi-round session data. These manifest as the amount of session data exceeding the model's capacity limit and the inability to load historical context normally.

[0093] The inference gear incompatibility error type can indicate the error type in the message data that carries anomaly markers such as failure to adapt inference depth gear parameters, unrecognizable gear parameters, and mismatch between gear and model version, corresponding to abnormal model parameter loading conditions.

[0094] Transient network error types can indicate the type of error in the message data that carries abnormal identifiers such as network timeout, packet loss, link jitter, and transient transmission interruption. These are temporary anomalies caused by transient fluctuations in the external link.

[0095] Specifically, the inner loop parses the message data frame by frame and field by field, extracting key feature information such as status codes, exception identifiers, error descriptions, and triggering scenarios. Using preset error type matching rules, the parsed abnormal messages are categorized into context overflow error types, inference gear incompatibility error types, and transient network error types.

[0096] As an example, the inner loop parses the message data of the intelligent question-answering scenario segment by segment, extracting abnormal features within the message. If the message carries indicators of exceeding the limit of conversational terms or exceeding the limit of context stacking, it is classified as a context overflow error type; if the message carries indicators of failure to load gear parameters or unrecognized parameters, it is classified as an inference gear incompatibility error type; if the message carries indicators of network timeout or transient packet loss, it is classified as a transient network error type.

[0097] As an example, the inner loop parses the operational message data of the office intelligence agent. For messages caused by multiple rounds of approval processes and multiple file parsing, such as context data accumulation and word quota exceeding limits, it is determined to be a context overflow error type. For feedback messages where the office model level parameters are configured too high or parameter adaptation fails, it is determined to be an inference level incompatibility error type. For messages where the office service is momentarily slowed down or file transfer is briefly interrupted, it is determined to be a momentary network error type.

[0098] Step b3: Based on the target error type, determine the error correction and recovery strategy corresponding to the target error type.

[0099] The system retrieves a pre-defined one-to-one policy mapping relationship to achieve precise binding between abnormal scenarios and error correction strategies. Specifically, it matches recovery strategies such as context pruning, core data retention, and non-critical data filtering for context overflow error types; it matches recovery strategies such as gear gradient degradation and parameter refitting for inference gear incompatibility error types; and it matches recovery strategies such as short-term retries, packet retransmission, and link reconnection for transient network error types.

[0100] As an example, in an intelligent question-answering scenario, if the target error type is a context overflow error, then the error correction and recovery strategy is matched with session data retention, non-critical redundant message pruning, and session term quota optimization; if the target error type is an inference level incompatibility error, then the error correction and recovery strategy is matched with inference depth gradient degradation and parameter reloading; if the target error type is a transient network error, then the error correction and recovery strategy is matched with short-term link retry and message retransmission, thus achieving differentiated strategy matching for message anomalies in the question-answering scenario.

[0101] For example, in a smart Q&A session where users engage in multiple rounds of continuous policy consultation, users continuously initiate multiple detailed policy questions and answers, and the session continuously accumulates historical Q&A records, tool retrieval messages, and model interaction data.

[0102] When the number of session rounds continues to increase, causing the total vocabulary usage to approach the model's limit, the context overflow error type is identified. At this point, the error correction and recovery strategy of core session data retention, non-critical redundant message pruning, and session vocabulary quota optimization is matched and executed. The core user inquiry questions, key policy responses, and effective tool return content are retained, while invalid and duplicate interaction messages and blank cached messages are pruned, and session quotas are released.

[0103] When a high-level inference level is automatically invoked for a task involving the analysis of complex policy details, but the current question-answering model version does not support ultra-high-precision inference parameters, an incompatibility error type is identified. In this case, an error correction and recovery strategy of inference depth gradient reduction and parameter reloading is matched and executed. The inference level parameters are downgraded from high to low, and the adapted level parameters are reloaded before inference is performed again.

[0104] When a user terminal experiences momentary jitter or short-term packet loss in the network, resulting in incomplete transmission of model question-and-answer interaction messages and temporary suspension of inference requests, the system identifies the type of momentary network error. At this time, it matches and executes error correction and recovery strategies such as short-term link retry and message retransmission, completing message retransmission and inference retry without refreshing the session or repeatedly consuming quotas.

[0105] The AI-based decision-making fault-tolerance method provided in this application collects message data during the operation of the intelligent agent through an inner loop, parses and classifies the message data, and determines target error types, including context overflow error types, inference gear incompatibility error types, and transient network error types. Based on the target error types, it determines the corresponding error correction and recovery strategies. This method can identify and match the types of abnormal intelligent agent operation messages during inference operation, replacing the coarse handling mode of using a uniform default processing method to deal with various abnormal scenarios in related technologies. It can match appropriate error correction and recovery logic according to different error types of intelligent agent operation messages, effectively improving the accuracy and adaptability of abnormal handling in abnormal intelligent agent operation message scenarios, and avoiding the problem of inaccurate decision results caused by a single and untargeted message abnormality handling method.

[0106] In one possible implementation, the step S104 above, which matches the corresponding error correction and recovery strategy based on the abnormal scenario, may include the following steps: Step c1 involves using an inner loop to check the preceding data query and tool execution process to identify whether there are tool execution results carrying error flags.

[0107] The pre-process data query and tool execution flow can indicate the pre-process execution chain of data query, data retrieval, data verification, and business parameter acquisition completed by the agent based on the tool components before the model makes formal inference decisions.

[0108] Error flags are structured identifier fields that are actively mounted by the tool component when the tool execution is abnormal. They are used to mark abnormal conditions such as abnormal tool execution status, data retrieval failure, parameter matching error, and query failure.

[0109] The execution result of the tool can instruct the agent to call various functional tools to complete the data query and data processing and output the returned data. Specifically, it can include various execution return contents such as normal valid data, abnormal error data, empty data, and incomplete data.

[0110] Specifically, after the agent completes the session data collection and initiates the execution of the data query command, the inner loop detects the preceding data query and tool execution processes to identify whether there are tool execution results carrying error flags.

[0111] As an example, in the pre-process of an intelligent question-answering reasoning scenario, the agent invokes a knowledge base query tool to perform a data query operation, while the inner loop monitors the entire execution process of the knowledge base tool in real time. When the knowledge base retrieval path fails, keyword matching fails, or knowledge base data retrieval times out, the tool's execution result is automatically marked with a unique error flag. The inner loop then examines the content returned by the tool one by one, identifies the error flag in the current tool's execution result, and determines that there is an execution anomaly in the pre-process data query.

[0112] As an example, in a scenario of intelligent statistical analysis of batch business data, the agent invokes data filtering, data aggregation, and field statistics tools to perform preliminary data query processing. When data source fields are missing, data permission verification fails, or statistical caliber mismatch occurs, the tool execution result is marked with the corresponding business class error flag. The inner loop monitors the tool execution process, captures the tool return results carrying error flags, and identifies abnormal operating conditions of the preliminary tools.

[0113] Step c2: If there is a tool execution result carrying an error flag, inject the error flag and the current tool's valid content data back into the session context.

[0114] The current valid content data of the tool can indicate the remaining valid return data after removing invalid garbled characters, empty data, and redundant error text in abnormal tool execution scenarios. Specifically, it can include available information such as matched partial fields, valid query fragments, and compliant parameter content.

[0115] Specifically, when the inner loop detects that the execution result of the preceding tool carries an error flag, it does not directly discard the abnormal return content of the tool. Instead, it filters and identifies the returned data, removing purely invalid error messages, garbled characters, and redundant null values, while retaining the valid content data of the current tool. At the same time, the error flag and the filtered valid content data of the tool are synchronously injected back into the current session context, completing the session-based persistence of the error information.

[0116] As an example, in an intelligent question-answering scenario, when the knowledge base query tool encounters an error and displays an error flag, the inner loop filters the returned content, removing invalid timeout error text and blank placeholder data, while retaining the retrieved valid knowledge point fragments, keyword matching content, and other valid content data. The error flag indicating query failure, along with the retained valid knowledge base fragment data, is then injected back into the current question-answering session context, thus solidifying and retaining the abnormal data and session state.

[0117] As an example, when a data statistics tool encounters an error and attaches a field missing error flag, an inner loop cleans and verifies the data returned by the tool, removing invalid error codes and redundant log data, while retaining the successfully aggregated valid statistical fields and compliant data samples. The field missing error flag and valid statistical data are then injected back into the statistics task session context to preserve the source information of the preceding data statistics anomaly.

[0118] Step c3: Using a neural network model, based on the error flags of the back-injection and the current valid content data of the tool, determine the anomaly type.

[0119] Identifying the anomaly type can indicate the sub-type of the anomaly in the pre-tool classification based on the back-injection data by the neural network model. Specifically, it can include sub-abnormal conditions such as tool parameter loading anomaly, data source query failure, field matching anomaly, permission verification anomaly, and rule base retrieval anomaly.

[0120] Specifically, the neural network model reads the error flag information and the valid residual content data of the tool in the session context, and deeply analyzes the real cause of the abnormality of the pre-tool through feature comparison, working condition matching and logical deduction.

[0121] As an example, the neural network model reads the query failure error flags from the question-and-answer session context and the remaining valid fragments of knowledge base data. By comparing the flag features with the missing features of the remaining data, it determines that the anomaly is a query failure anomaly of the knowledge base data source.

[0122] As an example, the neural network model reads the missing field flags and some aggregated valid data from the statistical session context back-injection, and combines the data residual features and error indicators to determine that the current anomaly is a data field mismatch and data source loading anomaly.

[0123] Step c4: Based on the identified anomaly type, generate the corresponding error correction and recovery strategy.

[0124] Based on the identified anomaly type, the neural network model generates strategies for data source retry and backup data source switching for data source query failure anomalies; specifically, it generates strategies for field refresh, parameter reset, and data re-cleaning for field matching anomalies; and it generates strategies for rule base reloading, version adaptation, and parameter synchronization for rule loading anomalies.

[0125] In one scenario, during multiple rounds of intelligent business question-and-answer interaction, the inner loop continuously monitors the preceding data query and tool execution process. For different abnormal tool execution conditions, the neural network model matches differentiated error correction and recovery strategies based on the identified abnormality type.

[0126] When the anomaly type is identified as a data source query failure, it is determined that the current main knowledge base data source interface response timed out and the data retrieval failed. Then, the data source retry retrieval and backup data source switching strategy is executed. First, multiple retry queries are initiated at short intervals. If the retry still fails, the system automatically switches to the backup knowledge base data source to complete the data retrieval.

[0127] When the anomaly type is identified as a field matching anomaly, it is determined that the current query field does not match the data source table structure, or the old and new fields are mismatched. Then, a field refresh, parameter reset, and data re-cleaning strategy is executed. The latest field structure of the remote data source is automatically refreshed, the tool query adaptation parameters are reset, and redundant filtering, format validation, and invalid data removal are carried out on the retrieved data again.

[0128] When the anomaly type is identified as a rule loading anomaly, it is determined that the local cached rule library version is outdated and the tool adaptation parameters are not updated in sync. Then, the rule library reload, version adaptation, and parameter synchronization strategies are executed. The latest business rule library is fetched again to complete the local reload, the adaptation versions of the tool and the rule library are calibrated, and the running parameters are updated in sync.

[0129] The AI-based decision-making fault-tolerance method provided in this application detects the preceding data query and tool execution process through an inner loop to identify whether there are tool execution results carrying error flags. When such results exist, the error flags and the current valid content data of the tool are injected back into the session context. A neural network model determines the anomaly type based on the injected error flags and the current valid content data of the tool, and generates a corresponding error correction and recovery strategy based on the anomaly type. This method can identify, inject context, and generate customized strategies for anomalies generated during tool execution, replacing the unified default processing mode used in related technologies to handle various anomaly scenarios. It solves the shortcomings of traditional solutions in not being able to perform fine-grained tracing and strategy adaptation for tool execution anomalies, effectively improving the targeting of anomaly handling in preceding data query and tool execution anomaly scenarios, and avoiding inaccurate decision results caused by generalized handling of tool execution anomalies.

[0130] In one possible implementation, the method also includes: Step d1 involves collecting incremental event data generated segment by segment during the inference process of the neural network model through an inner loop.

[0131] Incremental event data can indicate the fragmented output data generated incrementally and segment by segment in time sequence during the continuous inference operation of the neural network model. Specifically, it can include inference intermediate conclusions, parameter calculation results, segmented response content, status feedback information and other inference-derived data.

[0132] Specifically, during the process of loading target data, session-related data, inference depth level parameters, and initiating continuous inference decision-making in the neural network model, fragmented and time-series data are continuously generated with each inference iteration. The inner loop monitors the model's inference output link according to the independent signal channel of the two-layer intelligent agent loop architecture, and collects incremental event data generated in each round of inference iteration segment by segment.

[0133] As an example, in intelligent question-answering reasoning scenarios, neural network models perform multiple rounds of iterative reasoning to address complex user inquiries. Instead of outputting a complete answer all at once, they generate fragmented content such as question analysis, knowledge point matching segments, and conclusion derivation statements. An inner loop monitors the model's streaming reasoning process, collecting incremental question-answering event data frame-by-frame from each iteration.

[0134] Step d2 involves identifying the content attributes of the incremental event data to obtain the event identification results.

[0135] Content attributes can indicate the content characteristics and business attributes carried by the streaming incremental event data itself, which can include data purpose, business weight, content function, decision relevance, display priority and other characteristic information.

[0136] The event recognition result can indicate the attribute determination result obtained by the inner loop after parsing the text content, data function, and business function of the incremental event data.

[0137] Specifically, after determining the incremental event data, the event identification results can be further determined.

[0138] More specifically, each segment of incremental event data is analyzed for content and attribute assessment. The business function and content positioning of each incremental data segment are identified frame by frame. By extracting the keyword features, data purpose, inference function, and output position of the incremental data, the segment of incremental data is distinguished and event recognition results are generated.

[0139] As an example, in an intelligent question-answering scenario, the inner loop analyzes the content attributes of the collected incremental event data of the question-answering stream segment by segment. For the incremental data such as the generated core answer conclusions, key knowledge point judgments, and question qualitative results, it identifies them as attribute content supporting the question-answering decision. For the incremental data such as the transition statements, prompts, and process descriptions generated by the model, it identifies them as auxiliary display attribute content and generates question-answering event recognition results.

[0140] Step d3: Based on the preset event weight standard, the event identification results are divided into key decision event results and non-key display event results; The preset event weight standard can indicate the pre-configured event importance classification and judgment rule system.

[0141] The outcome of key decision events can indicate the weight level of the decision and directly determine the final reasoning decision.

[0142] Non-critical event results can indicate results with low weight and only used to demonstrate the reasoning process.

[0143] Specifically, all incremental events for which attribute identification has been completed are classified into a binary hierarchical classification. Among them, events that directly participate in decision-making, determine output results, or whose absence would lead to decision errors or incomplete content are classified as key decision-making event results; auxiliary events that are only used for process display and interactive prompts and do not affect the core decision-making logic are classified as non-key display event results.

[0144] Step d4: Push the results of key decision events using a blocking push mode.

[0145] The blocking push mode can indicate a synchronous push mechanism for high-weight core events, with the push process having exclusive access to the execution chain.

[0146] Specifically, a blocking push mode is forcibly enabled for the results of key decision events, and the results of each key decision event are pushed through a synchronous exclusive push link.

[0147] Step d5: Push the results of non-critical display events using a non-blocking push mode.

[0148] Non-blocking push mode can indicate an asynchronous, lightweight push mechanism for low-weight auxiliary events.

[0149] Specifically, a non-blocking push mode is enabled for the results of non-critical display events, that is, an asynchronous parallel mechanism is used to lighten the push process for displaying content.

[0150] In a scenario within intelligent question-and-answering, for key decision-making events resulting from tiered assessments, a blocking push mode is activated, prioritizing the synchronous delivery of core answers, key knowledge points, and problem-solving conclusions. It is crucial to ensure the complete delivery of core decision-making content. For non-critical display event results, a non-blocking push mode is activated, asynchronously delivering supplementary content such as waiting prompts, process descriptions, and transitional phrases.

[0151] The AI-based decision-making fault-tolerance method provided in this application collects incremental event data generated segment by segment during the inference process of a neural network model through an inner loop. It identifies the content attributes of the incremental event data to obtain event identification results. Based on preset event weights, the event identification results are divided into key decision event results and non-key display event results. A blocking push mode is used to push key decision event results, while a non-blocking push mode is used for non-key events. This differentiated and hierarchical push control is implemented to address the incremental data transmission characteristics of the model's streaming inference output process. This replaces the coarse processing mode in related technologies that uses a uniform default push method to handle all streaming event data. It ensures the complete and reliable push of key decision event results, avoids the loss of core decision data, and improves the push efficiency of non-key display event results. This effectively improves the stability and standardization of the model's streaming inference output process, and avoids the problems of missing decision information and inaccurate decision results caused by a single, undifferentiated streaming event push method.

[0152] In one possible implementation, abnormal scenarios during inference execution include model output truncation anomalies. The decision fault tolerance correction based on the error correction and recovery strategy in step S104 above may include the following steps: Step e1 involves monitoring the length of characters output by the neural network model after inference through an inner loop.

[0153] Character length indicates the total number of characters in the complete text content output immediately after a single iteration of inference by the neural network model.

[0154] Specifically, after the neural network model completes the inference decision and outputs the inference output result based on the session-related data, target data, and inference depth level data, the inner loop does not directly accept the inference content, but performs character-by-character statistics and volume monitoring on all the text content output by the model this time, and collects the output character length corresponding to a single inference.

[0155] Step e2: Based on the character length and the preset output character threshold, identify whether there is an output character limit exceeding the limit.

[0156] The preset output character threshold can indicate the maximum upper limit of output characters that is pre-configured and matches the output performance of the neural network model, session carrying capacity, and business output specifications.

[0157] Output character limit exceeds the limit, indicating an abnormal condition where the length of the characters output by the model in a single inference exceeds a preset output character threshold.

[0158] Specifically, the inner loop retrieves a preset output character threshold and compares the monitored character length with a standard threshold to determine whether the current inference output exceeds the model's single valid output limit. When the output character length is less than or equal to the preset output character threshold, the model output is deemed compliant, complete, and without truncation anomalies. When the output character length exceeds the preset output character threshold, an output character exceeding the limit is identified, and the model is deemed to have experienced an output truncation anomaly.

[0159] Step e3: If there is an output character exceeding the limit, output the first output character that does not exceed the limit, and input the second output character into the neural network model for inference to achieve decision-making fault tolerance correction.

[0160] Specifically, the inner loop precisely segments the overall output content of the model that exceeds the limit, designates the preceding content that does not exceed the preset character threshold as the first output character, and outputs it directly and normally; at the same time, the remaining content that has been truncated is designated as the second output character, and is fed back into the neural network model separately to start a new round of iterative inference.

[0161] As an example, in an intelligent question-answering scenario, when the output characters of complex and professional question-answering reasoning exceed the limit or there is an output truncation anomaly, the inner loop splits the current output content. The complete question-answering parsing content before the threshold of 2000 characters is directly output as the first output character; the remaining question-answering content after the threshold that has been truncated is used as the second output character, and is re-inputted into the neural network model to carry out secondary continuation reasoning, complete the remaining question-answering conclusions, and finally splice the complete content before and after, thus realizing the fault tolerance correction of question-answering truncation anomalies.

[0162] The AI-based decision-making fault-tolerance method provided in this application monitors the character length output by the neural network model after inference through an inner loop. It combines the character length with a preset output character threshold to identify whether there is a model output truncation anomaly due to excessive output characters. If an excessive output character is detected, a first output character that does not exceed the threshold is output, and a second output character is input into the neural network model to continue inference, thus achieving decision-making fault-tolerance correction. A dedicated continuation inference correction mechanism is set up for model output truncation anomalies during inference, replacing the coarse-grained handling mode of a uniform default processing method used in related technologies to deal with various abnormal scenarios. This effectively solves the problems of content truncation and incomplete inference output caused by excessive model output characters, ensuring the integrity and continuity of the model's inference output content and avoiding situations where decision content is missing or decision results are inaccurate due to a single and general approach to handling model output truncation anomalies.

[0163] In one possible implementation, the step S102 above, which determines the corresponding target data based on the data query instruction, may include the following: Step f1 retrieves the initial target data based on the data query command through the inner loop.

[0164] The initial target data can be the raw dataset that the inner loop directly retrieves from the business knowledge base, database, or tool data source according to the data query command. Specifically, it can be the raw data that has not been cleaned, verified, or deduplicated.

[0165] Specifically, the initial target data is retrieved directly from the business knowledge base, database, and tool data source according to the data query command.

[0166] Step f2 involves screening for redundant fields, validating formats, and filtering invalid data from the initial target data to obtain the target data to be processed.

[0167] After determining the initial target data, redundant fields can be screened, format validated, and invalid data filtered to obtain the target data to be processed.

[0168] Step f3: Remove duplicate data, garbled data, and invalid data from the target data to be processed, and determine the target data.

[0169] After determining the target data to be processed, duplicate data, garbled data, and invalid data can be removed from the target data to determine the target data.

[0170] As an example, in an intelligent question-answering scenario, the inner loop performs deep purification on the target data to be processed, batch removing duplicate question-answer entries and duplicate knowledge points that are completely identical in the knowledge base; thoroughly removing text garbled characters, incomplete symbols, and scrambled characters generated during data transmission and parsing; and removing implicit invalid and discarded data a second time to obtain the target data.

[0171] The decision-making fault-tolerance method based on artificial intelligence provided in this application retrieves initial target data based on data query instructions through an inner loop. The initial target data is then subjected to redundant field screening, format verification, and invalid data filtering to obtain the target data to be processed. Duplicate data, garbled data, and invalid data in the target data to be processed are removed to determine the target data. The target data required for model inference is subjected to pre-normalization cleaning and screening processing, which replaces the coarse processing mode of directly using the raw retrieved data to participate in model inference in related technologies. It can effectively avoid the interference of redundant fields, abnormal formats, duplicate data, garbled data, and various invalid data on the inference process.

[0172] In one possible implementation, the method also includes: Step g1 involves calculating the confidence score of the inference output of the neural network model.

[0173] The confidence score can be used to characterize the credibility, matching accuracy, and logical completeness of the current single-round inference output.

[0174] Specifically, after determining the inference output, the confidence level of the inference output can be calculated to obtain a confidence score.

[0175] As an example, in an intelligent question-answering reasoning scenario, the neural network model completes the reasoning for answering user questions based on cleaned knowledge base target data, and outputs the corresponding question-answering reasoning results. The inner loop retrieves multi-dimensional indicators such as the number of knowledge point matches, keyword hit accuracy, question-answering logic fluency, and question intent relevance, and performs fusion calculation through a preset weighted confidence algorithm to quantify the confidence score of the current question-answering answer.

[0176] Step g2: Check whether the confidence score is less than the preset confidence threshold.

[0177] Step g3: If the confidence score is less than the preset confidence threshold, then the current inference output result is determined to be inconsistent with the preset valid conditions.

[0178] Step g4: If the confidence score is not less than the preset confidence threshold, then the current inference output result is determined to meet the preset valid conditions.

[0179] Preset reliability thresholds can indicate pre-defined thresholds.

[0180] Specifically, after determining the confidence score, it can be checked whether the confidence score is less than a preset confidence threshold. This includes two scenarios.

[0181] Scenario 1: The confidence score is less than the preset confidence threshold. Scenario 2: The confidence score is not less than the preset confidence threshold.

[0182] For scenario one: if the confidence score is less than the preset confidence threshold, the current inference output result is determined to be inconsistent with the preset valid conditions.

[0183] For scenario two: if the confidence score is not less than the preset confidence threshold, then the current inference output result is determined to meet the preset valid conditions.

[0184] The decision-making fault-tolerant method based on artificial intelligence provided in this application calculates a confidence score by performing confidence calculation on the inference output of the neural network model. It then detects whether the confidence score is less than a preset confidence threshold. If the confidence score is less than the preset confidence threshold, the current inference output is determined to not meet the preset validity conditions. If the confidence score is not less than the preset confidence threshold, the current inference output is determined to meet the preset validity conditions. By using a confidence scoring mechanism to verify the validity of the inference output, this method replaces the crude processing mode in related technologies that relies solely on fixed rules or directly outputs inference results without any verification mechanism. It can identify hidden anomalies such as low credibility and substandard inference quality in the model's inference output, and avoids the problem of directly using low-confidence and unreliable inference output as the decision result.

[0185] This embodiment also provides an artificial intelligence-based decision-making fault-tolerant device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0186] like Figure 2 This embodiment provides an AI-based decision-making fault-tolerant device, comprising: an acquisition module 201, used to acquire session-related data through an outer loop; wherein the session-related data includes session history data, user input data, and tool configuration data; a generation module 202, used to generate data query instructions based on preset program logic and session-related data through an inner loop, and determine the corresponding target data based on the data query instructions; a reading module 203, used to read the inference depth level data of the current session through an inner loop, input the inference depth level data, target data, and session-related data into the neural network model mounted on the inner loop to perform inference decision-making, and obtain the inference output result; and a verification decision module 204, used to verify the validity of the inference output result through a two-layer intelligent agent loop architecture; wherein, if the inference output result does not meet the preset validity conditions, the inner loop identifies abnormal scenarios in the inference process, and matches the corresponding error correction and recovery strategy based on the abnormal scenario, so as to achieve decision-making fault tolerance correction based on the error correction and recovery strategy.

[0187] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0188] In this embodiment, the AI-based decision-making fault-tolerant device is presented in the form of a functional unit. Here, a functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0189] This application also provides a computer device having the above-described artificial intelligence-based decision-making fault-tolerant device.

[0190] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this application, such as... Figure 3 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 3 Take a processor 10 as an example.

[0191] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0192] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0193] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0194] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0195] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.

[0196] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.

[0197] The computer device also includes a communication interface for communicating with other devices or communication networks.

[0198] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.

[0199] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0200] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.

Claims

1. A decision-making fault-tolerant method based on artificial intelligence, characterized in that, The AI-based decision-making fault-tolerance method is applied to a two-layer intelligent agent loop architecture, which includes an outer loop, an inner loop nested within the outer loop, and multiple independent signal channels. The method includes: The outer loop acquires session-related data, including session history data, user input data, and tool configuration data. The inner loop generates a data query instruction based on preset program logic and the session-related data, and determines the corresponding target data based on the data query instruction. The inner loop reads the inference depth level data of the current session, and inputs the inference depth level data, the target data, and the session-related data into the neural network model carried by the inner loop to perform inference decision-making and obtain the inference output result. The validity of the inference output is verified through the two-layer intelligent agent loop architecture. If the inference output does not meet the preset validity conditions, the inner loop identifies abnormal scenarios in the inference process and matches the corresponding error correction and recovery strategy based on the abnormal scenarios to achieve decision-tolerance correction based on the error correction and recovery strategy. Abnormal scenarios during the inference process include incompatibility anomalies in inference depth levels. The decision-making fault tolerance correction based on the error correction and recovery strategy includes: The inner loop captures gear incompatibility error data reported by the neural network model during the invocation process; Based on the gear incompatibility error data, detect whether the inference depth gear exceeds the inference gear range; If the inference depth level exceeds the inference level range, the inference depth level parameter after reduction is determined based on the preset inference depth gradient degradation sequence and in order of priority from high to low. Based on the adjusted inference depth level parameter, decision-making fault tolerance correction is achieved; The matching of corresponding error correction and recovery strategies based on abnormal scenarios includes: The inner loop checks the preceding data query and tool execution process to identify whether there are tool execution results carrying error flags. If a tool execution result with an error flag exists, the error flag and the current valid tool content data will be injected back into the session context; The neural network model is used to determine the anomaly type based on the error flags of the back-injection and the current valid content data of the tool. Based on the identified anomaly type, an error correction and recovery strategy corresponding to the identified anomaly type is generated; Abnormal scenarios during the inference process include model output truncation anomalies. The decision-making fault-tolerance correction based on the error correction and recovery strategy includes: The inner loop monitors the length of the characters output by the neural network model after inference. Based on the character length and the preset output character threshold, identify whether the output character limit is exceeded; If the output character limit is exceeded, the first output character that does not exceed the limit is output, and the second output character is input into the neural network model for inference to achieve decision fault tolerance correction; wherein, the first output character indicates the inference content that can be output normally, and the second output character indicates the content that cannot be completely generated and cannot be output normally.

2. The decision-making fault-tolerant method based on artificial intelligence according to claim 1, characterized in that, Abnormal scenarios during the inference process include abnormal agent operation messages, wherein the step of matching corresponding error correction and recovery strategies based on abnormal scenarios includes: The inner loop collects message data during the operation of the intelligent agent; The message data is parsed and classified to determine the target error type; wherein, the target error type includes context overflow error type, inference gear incompatibility error type, and transient network error type; Based on the target error type, determine the error correction and recovery strategy corresponding to the target error type.

3. The decision-making fault-tolerant method based on artificial intelligence according to claim 1, characterized in that, The method further includes: The inner loop collects incremental event data generated segment by segment during the inference process of the neural network model. The content attributes of incremental event data are identified to obtain event identification results; Based on a preset event weighting standard, the event identification results are divided into key decision-making event results and non-key display event results. The results of key decision-making events are pushed out using a blocking push mode; For non-critical display events, the results are pushed using a non-blocking push mode.

4. The decision-making fault-tolerant method based on artificial intelligence according to claim 1, characterized in that, The step of determining the corresponding target data based on the data query instruction includes: The inner loop retrieves the initial target data based on the data query instruction; The initial target data is subjected to redundant field screening, format validation, and invalid data filtering to obtain the target data to be processed; The target data is determined by removing duplicate data, garbled data, and invalid data from the target data to be processed.

5. The decision-making fault-tolerant method based on artificial intelligence according to claim 1, characterized in that, The method further includes: The confidence score is calculated by performing a confidence score calculation on the inference output of the neural network model. Check whether the confidence score is less than the preset confidence threshold; If the confidence score is less than the preset confidence threshold, the current inference output result is determined to be inconsistent with the preset valid conditions. If the confidence score is not less than the preset confidence threshold, the current inference output result is determined to meet the preset valid conditions.

6. A decision-making fault-tolerant device based on artificial intelligence, characterized in that, The AI-based decision-making fault-tolerant device is applied to a two-layer intelligent agent loop architecture, which includes an outer loop, an inner loop nested within the outer loop, and multiple independent signal channels. The device includes: The acquisition module is used to acquire session-related data through the outer loop; wherein, the session-related data includes session history data, user input data, and tool configuration data; The generation module is used to generate a data query instruction based on preset program logic and the session-related data through the inner loop, and to determine the corresponding target data based on the data query instruction; The reading module is used to read the inference depth level data of the current session through the inner loop, input the inference depth level data, the target data, and the session-related data into the neural network model carried by the inner loop to perform inference decision-making and obtain the inference output result; The decision verification module is used to verify the validity of the inference output results through the two-layer intelligent agent loop architecture. If the inference output results do not meet the preset validity conditions, the inner loop identifies abnormal scenarios in the inference process and matches the corresponding error correction and recovery strategy based on the abnormal scenarios to achieve decision fault tolerance correction based on the error correction and recovery strategy. Abnormal scenarios during the inference process include inference depth incompatibility anomalies. The verification decision module is further configured to: capture incompatibility error data reported by the neural network model during the invocation process through the inner loop; based on the incompatibility error data, detect whether the inference depth level exceeds the inference level range; if the inference depth level exceeds the inference level range, determine the adjusted inference depth level parameters based on a preset inference depth gradient degradation sequence, in descending priority order; and implement decision-making fault tolerance correction based on the adjusted inference depth level parameters. The verification decision module is also used to detect the preceding data query and tool execution process through an inner loop to identify whether there are tool execution results carrying error flags; if there are tool execution results carrying error flags, the error flags and the current valid content data of the tool are injected back into the session context; based on the injected error flags and the current valid content data of the tool, the abnormality type is determined by the neural network model; and based on the abnormality type, an error correction and recovery strategy corresponding to the abnormality type is generated. Abnormal scenarios during the inference process include model output truncation anomalies. The verification decision module is further configured to monitor the character length output by the neural network model after inference through the inner loop; based on the character length and a preset output character threshold, identify whether there is an output character exceeding the limit; if there is an output character exceeding the limit, output a first output character that does not exceed the limit, and input a second output character into the neural network model for inference to achieve decision fault tolerance correction; wherein, the first output character indicates the inference content that can be output normally, and the second output character indicates the content that cannot be completely generated and cannot be output normally.

7. An electronic device, characterized in that, It includes a memory and a processor, which are interconnected and communicate with each other. The memory stores computer instructions, and the processor executes the computer instructions to implement the AI-based decision-making fault-tolerant method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Abnormity analysis method and device based on multi-agent cooperation, equipment and medium

    CN120929133A

  • Fault-tolerant processing method and system for super-long text in large model service, and storage medium

    CN121144496A