Multi-step decision-making method for agent based on reasoning and action alternately performed
By constructing a semantic feature matrix and a temporal dependency vector, truncating the depth of the look-ahead branch, and switching the routing and rollback states, the problems of divergence in state transition trajectories and misalignment of feature vectors in multi-agent systems are solved, achieving effective logical convergence and memory management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU MEIQIA NETWORK TECH CO LTD
- Filing Date
- 2026-06-23
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to maintain logical consistency in complex collaborative tasks within multi-agent systems, especially in high-concurrency and asynchronous environments, where issues such as diverging state transition trajectories and misaligned feature vector space pointers arise.
By employing a multi-step decision-making method for intelligent agents based on alternating reasoning and action, a semantic feature matrix is constructed, a temporal dependency vector is calculated, the depth of the look-ahead branch is truncated using the system's fault-tolerant ladder constant, the calling protocol is converted to switch routes, the residual variance is calculated, the nonlinear state rollback operator is activated, and structured response data is fused for evaluation to output natural language decision data.
A multi-step decision-making method for agents based on alternating reasoning and action was implemented in an asynchronous environment. This method eliminated the divergence of state transition trajectories and the misalignment of feature vector space pointers, ensuring the logical convergence of the multi-step decision-making loop and effective memory management.
Smart Images

Figure CN122433784A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent agent multi-step decision-making and distributed state management technology. It relates to an intelligent agent multi-step decision-making method based on the alternation of reasoning and action, which is used for multi-step decision-making scenarios of asynchronous interaction between large-scale language model intelligent agents and heterogeneous external interfaces. It can maintain the logical convergence of the multi-step decision state machine in the entire time domain and suppress memory expansion under high load and high latency network conditions. Background Technology
[0002] Currently, leveraging artificial intelligence technology to achieve task coordination and state management in multi-agent systems has become a core approach in the fields of distributed computing and automation control. However, existing technologies still have limitations in handling logical dependency consistency in complex collaborative tasks, deep perception of heterogeneous data, and closed-loop anomaly recovery under high concurrency. First, there is the state backtracking technology based on ontology models and causal graphs. For example, Chinese invention patent CN121636241B discloses a method and system for state management and anomaly backtracking in multi-agent collaborative tasks. It uses Bayesian networks to establish bidirectional causal chains in knowledge graphs to identify anomaly propagation nodes. Its drawback is that this scheme essentially relies on predefined ontology models and static attribute constraint rules. When facing highly dynamic environments or environments with unstructured interactive information, the semantic parsing flexibility of the model is limited, and it lacks sufficient adaptive adjustment capability for the real-time evolution of complex causal relationships, making it difficult to effectively cope with the accurate backtracking requirements in unknown anomaly scenarios.
[0003] Second, there is the perception allocation technology based on multimodal large models and concept drift detection. For example, Chinese invention patent CN120046100A discloses a multi-agent task collaboration method, device, equipment and storage medium, which uses a multimodal large language model to uniformly encode heterogeneous datasets and dynamically adjusts the model through a concept drift detection mechanism. Its shortcomings are: this technology focuses on the task requirement mapping and open-loop allocation optimization at the perception level. Although it improves the efficiency of task division in complex dynamic environments, it fails to deeply associate real-time concept drift with the physical and logical constraints of the underlying task execution. When a systemic chain failure occurs, it lacks a refined quantitative evaluation and state recovery mechanism for the collaborative logic level.
[0004] Third, asynchronous collaboration technology based on master-slave decoupling architecture; for example, Chinese invention patent application CN121524262A discloses a multi-agent asynchronous collaboration method and system. By introducing a decoupling mechanism between the master intelligent agent and functional sub-intelligent agents, it uses asynchronous concurrency strategies to improve the system's throughput and response speed. Its drawback is that such architectures usually treat each sub-task as a relatively independent execution unit. In the process of pursuing high concurrency efficiency, the logical consistency verification of task states over long time is weakened. When facing highly coupled tasks across intelligent agents, if there is a lack of a sound task state tracking and closed-loop verification mechanism, local execution deviations are likely to accumulate in the asynchronous link, making it difficult to implement the output solution due to the loss of state synchronization guarantee.
[0005] Therefore, how to construct a task collaboration framework with deep logical awareness and strong consistency guarantee, so that complex asynchronous prediction logic and real-time causal backtracking closed loop can be effectively converged, is the technical problem to be solved by this invention. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art, solve the technical problems of state machine transition trajectory divergence and feature vector space pointer misalignment caused by asynchronous callback delay fluctuations in long context multi-step decision loops, and provide an agent multi-step decision-making method based on alternating execution of reasoning and action.
[0007] To achieve the above-mentioned objectives, this invention provides a multi-step decision-making method for intelligent agents based on the alternating execution of reasoning and action, comprising the following steps: Step S101: Extract conversation text features to construct a semantic feature matrix: Extract features based on the collected conversation text data and construct a high-dimensional semantic feature matrix for the context. Step S102, calculate temporal dependencies to plan inference branches or attach: calculate the migration temporal dependency vector of the inference decision step to the external action branch, start the predictive inference branch to plan the control instruction sequence when the degree of compliance of the migration temporal dependency vector is equal to 0, and attach the current control path to the sliding window queue when the degree of compliance of the migration temporal dependency vector is greater than 0. Step S103, truncate the growth depth of the predicted branch according to the first derivative of the time consumption: based on the first derivative of the asynchronous response time of the event loop queue, the maximum growth depth of the predicted inference branch is truncated by logarithmic constraint using the system fault tolerance ladder constant. Step S104, convert the calling protocol and switch routes according to the comprehensive weight: convert the control command sequence into a function call protocol to trigger the external interface, determine the comprehensive weight of route evaluation according to the product of the operating cost component and the network delay component of the external interface, and when the comprehensive weight of route evaluation exceeds the security boundary threshold, switch the routing flow of the function call protocol to the backup digital node to evenly distribute the function call protocol to the preset static computing node in a 1:1 ratio; Step S105, calculate residual variance to roll back state and fuse values: calculate the residual variance value between the structured response data returned by the external interface and the predicted feature data. When the residual variance value exceeds 0.15, activate the nonlinear state rollback operator to erase the feature level in the context high-dimensional semantic feature matrix in situ and reconstruct the state machine pointer. Then, use the data orchestration operator to fuse and evaluate the structured response data to output natural language decision data.
[0008] Step S102 of the present invention includes the following sub-steps: Step S1021, penetrating the function call protocol to extract the output data item key value defined in the function call protocol; Step S1022, performing overlap retrieval between the output data item key value and the input parameter requirements in the control instruction sequence to be planned, so as to establish a migration timing dependency vector in the form of a 16-bit binary mask, wherein each algebraic occupant in the migration timing dependency vector uniquely maps to an unresolved asynchronous action branch on the timing axis.
[0009] Step S101 of the present invention includes the following sub-steps: Step S1011, sampling and obtaining response time data of external interface in continuous cycles from the event loop queue; Step S1012, calculating the difference between response time data of adjacent cycles to generate the first derivative of asynchronous response time.
[0010] Step S104 of the present invention includes the following sub-steps: Step S1041, obtaining the historical response characteristics of the external interface and parsing out the operating cost component and the network delay component; Step S1042, calculating the product of the operating cost component and the network delay component to obtain the comprehensive weight of the route evaluation, and keeping the current route topology map pointer stable when the comprehensive weight of the route evaluation is less than or equal to the security boundary threshold.
[0011] The process of starting the prediction inference branch in step S102 of the present invention includes the following sub-steps: Step S1023, when the compliance degree value of the migration time-series dependency vector is greater than 0, terminate the look-ahead generation of the prediction inference branch to cut off the look-ahead path, and capture the intermediate state snapshot of the current finite state machine; Step S1024, transfer the captured intermediate state snapshot to the memory, and suspend the data stream corresponding to the intermediate state snapshot to the sliding window queue.
[0012] The process of switching the routing flow of the function call protocol to the backup digital node in step S104 of the present invention includes the following sub-steps: Step S1043, periodically calculate the rate of change of the first derivative of the asynchronous response time to generate the corresponding differential value; Step S1044, when the first derivative of the asynchronous response time increases monotonically for three consecutive sampling periods and the generated differential value exceeds the baseline dynamic stability threshold, apply a degradation gating to the routing topology map to stop calculating the comprehensive weight of the route evaluation and forcibly switch the current routing configuration to a fixed distribution rule so as to evenly distribute the function call protocol to the preset static computing node at a ratio of 1:1.
[0013] The present invention further includes the following steps when the context high-dimensional semantic feature matrix is suspended or undergoes nonlinear state rollback: Step S106, in response to the suspension state of the current control path, limiting the throughput rate of concurrent data streams; Step S107, calculating the cosine similarity residual fluctuation value of the hidden layer tensor between adjacent inference cycles, and when the residual fluctuation value is less than 0.05, removing the intermediate data dimension in the resting state in situ to converge and normalize the context high-dimensional semantic feature matrix from 512 dimensions to a compact mask vector of 256 dimensions.
[0014] The present invention includes the following steps: Step S108, using a converged and regularized compact mask vector to reduce the real-time transmission bandwidth of the system data bus when the data is split at a preset static computing node.
[0015] The data processing loop of alternating reasoning and action described in this invention also includes an environmental data adjustment step: Step S109, real-time monitoring of the continuous expansion rate of the high-dimensional semantic feature matrix of the context, and when the continuous expansion rate exceeds a preset capacity safety threshold, automatically releasing storage space to clear feature vector space pointers that do not have semantic association.
[0016] Compared with the prior art, the present invention has at least the following beneficial effects: 1. In multi-step decision-making by intelligent agents with alternating actions, a 16-bit binary mask vector of unresolved asynchronous branches is constructed by extracting the key values of output data items from the function call protocol and calculating the overlap of parameter requirements. This is combined with an asynchronous transaction sliding window queue to establish causal dependencies between the inference chain and the action chain on the timeline. In the current processing, forward paths without dependencies are streamed, while virtual paths with dependencies are queued for waiting. This eliminates the divergence of state transition trajectories and misalignment of feature vector space pointers caused by out-of-order callbacks from asynchronous heterogeneous interfaces. This ensures that the time-series rearrangement of data flow is completely controlled by the causal logic within the data. Without the overhead of distributed lock signals, the logical convergence of the finite state machine in the multi-step decision-making loop is maintained in the full-delay domain.
[0017] 2. By forcibly activating the distributed temporal topology lock matrix in the data processing center, and using the preset system fault tolerance ladder constant and the asynchronous response time micro-components collected in real time from the event loop queue to construct logarithmic constraint rules, a rigid truncation is applied to the growth depth of the lookahead inference branch. When the nesting level of implicit lookahead inference exceeds the determined maximum growth depth, the lookahead path is forcibly broken and the corresponding computing resources are allocated to the discretized step-by-step suspension mode. This controls the number of parallel virtual state machine snapshots under non-ideal network conditions, avoids the risk of topology combination explosion in the memory search space due to the excessive depth of the lookahead branch tree in long-round sessions, and alleviates the structural impact on the system's digital processing performance caused by frequent physical memory paging and garbage collection pauses under high concurrency.
[0018] 3. During the instruction distribution phase, the decision engine collects historical response characteristics of the target's external business logic interface through multi-dimensional index operators, extracts the homogeneous operating cost component and network latency component, and calculates their product to obtain a comprehensive routing evaluation weight. When the comprehensive weight exceeds the dynamically set system security boundary threshold, it automatically triggers the adaptive evolution of the routing decision tree's topology map, stream-changing the current function call protocol to a backup low-latency digital node. This forms an adaptive hedging mechanism at the control flow level, avoiding physical backlog and blocking of asynchronously triggered instructions in the non-blocking event loop queue. While taking into account the overhead of computing power, it eliminates the self-excited oscillation caused by high-frequency switching of the control loop, ensuring the smooth interaction of the digital channel under high-load industrial conditions. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the main steps and control logic flow of the multi-step decision-making process of the intelligent agent in this invention; Figure 2 This is a schematic diagram of the state machine for residual and time-dependent operations in this invention. Detailed Implementation
[0020] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings.
[0021] Example 1: This embodiment discloses a multi-step decision-making method for intelligent agents based on the alternation of reasoning and action, including the following steps: Step S101: Extract conversation text features to construct a semantic feature matrix: Extract features based on the collected conversation text data and construct a high-dimensional semantic feature matrix for the context. Step S102, calculate temporal dependencies to plan inference branches or attach: calculate the migration temporal dependency vector of the inference decision step to the external action branch, start the predictive inference branch to plan the control instruction sequence when the degree of compliance of the migration temporal dependency vector is equal to 0, and attach the current control path to the sliding window queue when the degree of compliance of the migration temporal dependency vector is greater than 0. Step S103, truncate the growth depth of the predicted branch according to the first derivative of the time consumption: based on the first derivative of the asynchronous response time of the event loop queue, the maximum growth depth of the predicted inference branch is truncated by logarithmic constraint using the system fault tolerance ladder constant. Step S104, convert the calling protocol and switch routes according to the comprehensive weight: convert the control command sequence into a function call protocol to trigger the external interface, determine the comprehensive weight of route evaluation according to the product of the operating cost component and the network delay component of the external interface, and when the comprehensive weight of route evaluation exceeds the security boundary threshold, switch the routing flow of the function call protocol to the backup digital node to evenly distribute the function call protocol to the preset static computing node in a 1:1 ratio; Step S105, calculate residual variance to roll back state and fuse values: calculate the residual variance value between the structured response data returned by the external interface and the predicted feature data. When the residual variance value exceeds 0.15, activate the nonlinear state rollback operator to erase the feature level in the context high-dimensional semantic feature matrix in situ and reconstruct the state machine pointer. Then, use the data orchestration operator to fuse and evaluate the structured response data to output natural language decision data.
[0022] Step S102 in this embodiment includes the following sub-steps: Step S1021, penetrate the function call protocol to extract the output data item key value defined in the function call protocol; Step S1022, perform overlap retrieval between the output data item key value and the input parameter requirements in the control instruction sequence to be planned, so as to establish a migration timing dependency vector in the form of a 16-bit binary mask, wherein each algebraic occupant in the migration timing dependency vector uniquely maps to an unresolved asynchronous action branch on the timing axis.
[0023] Step S101 in this embodiment includes the following sub-steps: Step S1011, sampling and obtaining response time data of the external interface in a continuous period from the event loop queue; Step S1012, calculating the difference between response time data of adjacent periods to generate the first derivative of asynchronous response time.
[0024] Step S104 in this embodiment includes the following sub-steps: Step S1041, obtain the historical response characteristics of the external interface and parse out the operating cost component and the network delay component; Step S1042, calculate the product of the operating cost component and the network delay component to obtain the comprehensive weight of the route evaluation, and keep the current route topology map pointer stable when the comprehensive weight of the route evaluation is less than or equal to the security boundary threshold.
[0025] The process of starting the predictive inference branch in step S102 of this embodiment includes the following sub-steps: Step S1023, when the compliance degree value of the migration time-series dependency vector is greater than 0, terminate the look-ahead generation of the predictive inference branch to truncate the look-ahead path, and capture the intermediate state snapshot of the current finite state machine; Step S1024, transfer the captured intermediate state snapshot to the memory, and suspend the data stream corresponding to the intermediate state snapshot to the sliding window queue.
[0026] The process of switching the routing flow of the function call protocol to the backup digital node in step S104 of this embodiment includes the following sub-steps: Step S1043, periodically calculate the rate of change of the first derivative of the asynchronous response time to generate the corresponding differential value; Step S1044, when the first derivative of the asynchronous response time increases monotonically for three consecutive sampling periods and the generated differential value exceeds the baseline dynamic stability threshold, apply a degradation gating to the routing topology map to stop calculating the comprehensive weight of the route evaluation and forcibly switch the current route configuration to a fixed traffic splitting rule so that the function call protocol is evenly split to the preset static computing node at a ratio of 1:1.
[0027] In this embodiment, under the condition of suspending or performing nonlinear state rollback of the context high-dimensional semantic feature matrix, the following steps are also included: Step S106, in response to the suspension state of the current control path, the throughput rate of the concurrent data stream is limited; Step S107, the cosine similarity residual fluctuation value of the hidden layer tensor between adjacent inference cycles is calculated, and when the residual fluctuation value is less than 0.05, the intermediate data dimension in the resting state is removed in situ to converge and normalize the context high-dimensional semantic feature matrix from 512 dimensions to a compact mask vector of 256 dimensions.
[0028] The present embodiment includes the following steps: Step S108, using the converged and normalized compact mask vector to reduce the real-time transmission bandwidth of the system data bus when the data is split at the preset static computing node.
[0029] In the data processing loop of alternating reasoning and action described in this embodiment, an environmental data adjustment step is also included: Step S109, real-time monitoring of the continuous expansion rate of the high-dimensional semantic feature matrix of the context, and when the continuous expansion rate exceeds the preset capacity safety threshold, the storage space is automatically released to clear the feature vector space pointers that do not have semantic association.
[0030] Example 2: In a specific industrial application, this embodiment of the invention operates within a continuously running distributed electronic digital data processing environment. The data processing center collects multi-round conversational text data and contextual history data, extracts multi-source parameters using named entity recognition operators, and constructs a high-dimensional semantic feature matrix containing 512-dimensional floating-point numbers. When the core reasoning logic layer activates the alternating execution of reasoning and action calculations, the system penetrates the currently generated function call protocol, extracts the defined output data item key values, and performs a white-box retrieval of overlap with the input parameter requirements in the subsequent planned instruction sequence based on the output data item key values. In real time, a globally unique migration time-series dependency vector is constructed. This vector is a 16-bit binary mask vector, where each algebraic occupant uniquely maps to an unresolved asynchronous action branch on the current timeline. During the actual comparison process, white-box overlap retrieval is implemented using an exact matching algorithm: the system parses the extracted output data item key-value text string and performs a character-based, complete consistency comparison with the input parameter fields required by each instruction in the sequence of control instructions to be planned. If the field names of the two are found to be completely identical, a causal dependency relationship in the data flow is determined, and the 16-bit binary mask is divided into... The corresponding algebraic placeholder for the asynchronous action branch is set to 1; otherwise, it is set to 0 by default. If the number of unresolved asynchronous action branches exceeds 16 in a long-round session, the system initiates a dynamic adaptive overflow management procedure. A secondary extended hash list is allocated in physical memory as an overflow storage area, and the 17th and subsequent unresolved branches are sequentially mounted into this hash list. A dynamic pointer is used to logically associate the unresolved branch with the main 16-bit mask vector to ensure the integrity of timing dependency tracking. When planning the execution instruction sequence, the system performs real-time exhaustive extraction and polarity exhaustive deduction on the migration timing dependency vector. When the planned inference step corresponds to the migration... When a specific placeholder value in the temporal dependency vector equals 0, it indicates that there is no direct data flow causal dependency between the inference step and the currently suspended heterogeneous external interface callback data. The system triggers an implicit lookahead inference path, and the data processing center does not suspend the current central processing process, but directly evolves downwards in the current hypothesis space and calculates the subsequent execution instruction sequence. When the specific placeholder value in the migration temporal dependency vector corresponding to the planned inference step equals 1, it indicates that the inference step depends on the return result of the previous pending action as the input benchmark. The system forcibly activates the temporal topology lock matrix and utilizes the preset system fault tolerance ladder constant. The first derivative of the asynchronous response time collected in real time from the event loop queue (Also known as the asynchronous response time-consuming differential component) Construct a logarithmic constraint rule to apply a dynamic rigid truncation to the growth depth of the look-ahead branch, its maximum growth depth The calculation logic is as follows: ,in, This is the system fault-tolerant step constant, with a static calibration value of 3.0; The first derivative of the asynchronous response time (also known as the asynchronous response time differential) is obtained by subtracting the response time of the previous cycle from the response time of the current cycle. When the nesting level of implicit lookahead inference exceeds the maximum growth depth... At this time, the system forcibly interrupts the lookahead path, allocating the corresponding computing resources to the discretized step-by-step suspension mode, thereby ensuring the convergence of the upper bound of the memory search space at the mechanism level. The maximum growth depth of the prediction inference branch is determined based on the distribution of historical interface response data samples over consecutive periods. middle, This is the system's fault-tolerant step constant. To determine the first derivative of the asynchronous response time (also known as the asynchronous response time differential), the system collects sliding window time data for five consecutive cycles and calculates the standard deviation to dynamically adjust the system's fault-tolerant step constant. When the standard deviation exceeds 50 milliseconds, the system's fault-tolerant step constant is reduced from the initial value of 3.0 to 1.5, controlling the maximum growth depth to no more than four levels and converging the memory search space in long-round sessions. The underlying engineering derivation of the logarithmic constraint rule and constant adaptive adjustment is based on the fact that network time fluctuations usually conform to a long-tailed log-normal distribution. Introducing logarithmic operations can smoothly map drastically fluctuating physical delays into a linear tree depth control quantity. The initial constant... Setting it to 3.0 means that a maximum of about three to four layers of lightweight look-ahead attempts are allowed when network jitter is extremely small (in milliseconds) to fully utilize concurrent computing power; when the standard deviation of five cycles exceeds the 50-millisecond threshold, it indicates that the network has entered a high-oscillation or congested state, at which point... Forcibly reducing it to 1.5 mathematically reduces the maximum growth depth. Theoretically, the upper bound is rigidly locked within four layers to prevent topology combination explosion caused by look-ahead branches under high network latency conditions, thus achieving proactive defense against memory consumption. During the instruction execution phase, the decision engine transforms the generated instruction sequence into an independent standard function call protocol and asynchronously triggers and distributes the protocol execution through multi-dimensional indicator operators. The multi-dimensional indicator operators collect historical response characteristics of the target's external business logic API and extract the runtime cost component. With network latency components The comprehensive weight for route evaluation is obtained through product operation. The calculation formula is as follows: ,in, As a component of operating costs, For network delay components, when the route evaluation is based on the overall weight... When the weight is less than or equal to the dynamically set system security boundary threshold, the decision engine keeps the current routing topology pointer unchanged; if the weight exceeds the security boundary threshold, it triggers the adaptive evolution of the routing decision tree topology graph, changes the current function call protocol streaming to the backup low-latency digital node, and uses a heuristic constraint elimination process to eliminate data backlog.
[0031] The data processing hub receives structured response data returned by external business logic APIs via an asynchronous non-blocking event loop and simultaneously collects retrieval enhancement data from the vector database. Before performing fusion evaluation, it activates the white-box residual controller to calculate the residual variance value between the returned structured response data and the look-ahead prediction feature data. The calculation logic is as follows: ,in, This returns a feature of the floating-point numbers in the data. These are the predicted feature terms corresponding to the implicit look-ahead inference branch; The total dimension of the features is set to 512. This is used when calculating the residual variance value. When the residual value is less than or equal to the safety residual threshold of 0.15, the intermediate features of the look-ahead inference path are deemed valid. The system then merges out-of-order data in the main clause to complete semantic concatenation. The determination of the safety residual threshold of 0.15 is based on the statistical law of the prediction residual of the aforementioned local historical normal interactive text: In the offline calibration process executed in advance by the system, 10,000 sets of historical normal conversational interactive text sample streams were collected for simulation prediction. The variance distribution of the residuals after the implicit look-ahead prediction tensor and the actual structured return data were converted into feature terms was calculated. The statistical results show that under normal perturbation... The residual variance is mainly concentrated between 0.02 and 0.10, and the 75th percentile of this distribution corresponds precisely to the scalar value of 0.15. If the residual variance exceeds this statistical boundary, it indicates with a confidence level of up to 95% that the current look-ahead feature has caused semantic drift and logical pollution with the external asynchronous real callback. Under high load and high latency conditions, due to the increased queuing delay of heterogeneous interfaces, the system's tolerance for semantic deviation tightens. Therefore, the judgment threshold is finely adjusted to the left to 0.12, corresponding to its 60th percentile, to provide more sensitive anomaly defense. If the residual variance value... If the value exceeds 0.15, feature contamination is determined to have occurred. The system triggers a nonlinear state rollback operator. Based on the historical snapshot index in the migration time-series dependency vector, the contamination level in the high-dimensional semantic feature matrix of the context is erased in situ. The system state degenerates into a semantically decoupled bidirectional shadow stream architecture. The current state machine pointer is reconstructed using the clean historical snapshot of the previous backup. The rolled-back standard data is then injected back into the evaluation engine, and the final natural language decision data is output. Furthermore, the fusion evaluation process of the data orchestration operator includes the following specific algorithm steps: The operator parses the structured response data and extracts the business core indicator scalars or arrays in the form of key-value pairs. Secondly, these structured indicators are converted into text fragments with specific semantic tags according to the preset mapping rules.Finally, these text fragments are used as external cue word contexts and concatenated with the standard state feature tensor in the current evaluation engine using a multi-head attention mechanism. This concatenation is then input into the decoder of the large language model for autoregressive generation. This process deeply transforms heterogeneous structured response data into natural language decision data that conforms to contextual semantic closure and possesses human natural language logic. The residual variance threshold is set between 0.10 and 0.20, determined based on the 75th percentile of the statistical distribution of predicted residuals from local historical normal interactive text. Under high load and high latency conditions, the threshold is adjusted to 0.12, and under low load and stable conditions, it is adjusted to 0.15. During nonlinear state rollback, the CPU extracts the last unrecorded value from the migration time-series dependency vector. The asynchronous action branch timestamp index is determined and a memory pointer reset instruction is invoked. This truncates the sequence length pointer in the dynamic attention mechanism buffer back to the data block boundary corresponding to the timestamp index, directly overwriting the key-value cache tensor memory space beyond that boundary. This eliminates the feature pollution of the high-dimensional semantic feature matrix caused by out-of-order responses. Specifically, there is a definite causal relationship between the in-situ erasure at the feature level and the direct overwriting of the key-value cache tensor memory space: since the high-dimensional semantic feature matrix is mathematically composed of the hidden layer key-value cache tensors of each layer of the dynamic attention mechanism in the large language model concatenated in the time dimension, the aforementioned memory pointer reset instruction forcibly reverts the sequence length pointer in the dynamic attention mechanism buffer back to the data block boundary corresponding to the timestamp index. The truncation rollback directly cuts off and releases all memory space after the timestamp at the underlying physical memory level. This is equivalent to in-situ streaming erasure of the context pollution level caused by out-of-order responses in terms of macroscopic high-dimensional semantic representation. It achieves precise unification of mathematical tensor feature-level rollback and underlying memory hardware control. At the instant that any execution path completes fusion evaluation and outputs the result, the data processing center performs in-situ destruction of all virtual intermediate snapshot memory suspended in the sliding window queue, realizing a closed loop of data flow. The context high-dimensional semantic feature matrix converges from 512 dimensions to 256 dimensions through a dynamic channel pruning mechanism. The central processing unit calculates the cosine similarity residual fluctuation value of the hidden layer tensor between adjacent inference cycles. When the residual fluctuation value is less than 0.05, the first norm of each dimension in the high-dimensional semantic feature matrix of the context is extracted and arranged in descending order. The low activation channel weights in the last 256 positions are cleared to convert the 512-dimensional matrix into a 256-dimensional compact mask vector. This compact mask vector is used as the real-time transmission bandwidth control input parameter of the system data bus when the data is split at the preset static computing node. Under the variable network conditions, the closed loop and logical convergence of the multi-step decision path at the state machine level are maintained. Specifically, when the compact mask vector is used as the data bus control input parameter, the underlying hardware driver reads the distribution state of the elements in the mask vector and maps it to the channel enable control signal of the physical data bus through system calls.Since the low-activity channels have been cleared, when organizing the split data packets, the driver only serializes and packages the data corresponding to the valid bits in the mask for bus transmission, while skipping the data corresponding to the cleared bits. This directly reduces the number of payload level flips and data transmission bytes on the physical bus in a single transmission cycle, achieving a rigid reduction in physical real-time transmission bandwidth.
[0032] Example 3: This embodiment combines Figures 1 to 2 The method for multi-step decision-making by intelligent agents based on the alternation of reasoning and action is explained, as follows: Figure 1 As shown, step S101 extracts conversation text features to construct a semantic feature matrix. Then, step S102 calculates temporal dependencies to plan inference branches or mounts. Subsequently, step S103 truncates the predicted branch growth depth according to the first derivative of the time consumption. Then, step S104 converts the calling protocol and switches routes according to the comprehensive weight. Finally, step S105 calculates the residual variance to roll back the state and fuse the values.
[0033] like Figure 2 As shown, when the compliance value is zero (no data flow causal compliance), the system streams and looks ahead along the predictive inference branch, guiding it towards a logically stable point. Simultaneously, for this predictive inference branch, if its nesting depth exceeds the maximum growth depth, a rigid truncation is applied, leading to a jump to a discretized step-by-step suspension mode forcibly breaking the circuit and performing look-ahead truncation. Subsequently, through single-route traffic splitting, the intermediate snapshot memory is released in situ and also points to the logically stable point to achieve full-latency domain logical convergence. On the other hand, when the compliance value is greater than zero (depending on previous pending actions), the system enters a suspension state to capture intermediate snapshots. In the parallel branch after the suspended state: if the residual variance exceeds 0.15, a nonlinear state rollback is triggered, and the system switches to a bidirectional shadow stream architecture for semantic decoupling and feature anti-pollution, and erases the pollution level in situ to reconstruct the state machine pointer to return to the logical stable point; if the residual variance is less than or equal to 0.15, out-of-order data is merged and directly leads to the logical stable point; in addition, if the residual fluctuation is less than 0.05, the intermediate data dimension is removed in situ, thereby generating a compact mask vector to complete the removal of the resting state dimension, and finally, the real-time transmission bandwidth is reduced through the convergence regularization mechanism and merged into the logical stable point.
[0034] Example 4: In this embodiment, within a complex industrial asynchronous operation environment, the present invention verifies the logical convergence performance by setting up a multi-dimensional comparison system. The test environment consists of a distributed computing platform running on a general-purpose processing architecture. This platform is configured with four computing nodes each equipped with an 8-core processor and 16GB of memory. The nodes are connected by bidirectional network links, and the physical network links are actively injected with Gaussian white noise with a mean of 15ms and a variance of 5ms to simulate the nondeterministic fluctuations in API interface callback latency under real-world conditions. The test sample group uses the technical solution of the present invention for multi-step decision-making reasoning. The experiment sets up a problem intensity gradient comparison system with three gradient differences to verify the system's ability to handle asymmetric asynchronous dependencies under different contexts. The core of this system is... The variable is the external API call latency in the instruction sequence to be planned. Low-latency, medium-latency, and high-latency scenarios are set as comparisons. A control group driven by a conventional deterministic finite state machine runs in parallel. During the experiment, the data processing center constructs a high-dimensional semantic feature matrix containing 512-dimensional floating-point numbers based on the real-time collected context session data. The system uses the migration time-series dependency vector as the core control operator. Whenever the planning engine extracts the key value of the output data item in the function call protocol, the system maps it to specific bits of a binary mask. During execution, when the dependency degree value of the migration time-series dependency vector is detected to jump from 0 to 1, the system immediately triggers the time-series topology lock matrix mechanism, based on the maximum growth depth calculation logic. ,in, When the value is 3.0, the system automatically performs rigid truncation on the look-ahead inference branch.
[0035] Under high-latency conditions, the control group experienced a data causal dependency conflict between the asynchronous callback order and the inference path in the 42nd round of decision-making, leading to a divergent state transition path. This manifested as a linear increase in memory space with each session round. In contrast, the sample group of this invention, under the same workload, identified potential semantic feature contamination risks before the inference step was triggered by a 16-bit binary mask logic constructed from the transition time-dependent vector. Upon detecting the residual variance value... When the judgment threshold is greater than 0.15, the system uses a nonlinear state rollback operator to erase the contaminated high-dimensional semantic feature matrix hierarchy of the context in situ and reset the state machine pointer to the previous clean snapshot, thereby ensuring logical convergence in the full-delay domain. For the engineering decision logic of key parameters, this experiment obtains the comprehensive weight of route evaluation through a multi-dimensional index operator. When the route evaluation is based on the comprehensive weight When the preset dimensionless safety threshold of 6000 is exceeded, the system activates the adaptive topology graph and changes the protocol flow to a backup low-latency digital node. This effectively avoids the ineffective accumulation of computing resources in the suspended state. Experimental results show that in a multi-step decision loop of up to 100 rounds under high-latency conditions, the average task time of the control group was 2450.5ms, the number of state transition divergences was 42, and the memory space usage was 896.2MB; the average task time of the sample group of this invention was 1120.3ms, the number of state transition divergences was 2, and the memory space usage was 156.4MB. The technical solution of this invention achieves the synchronization of data causal logic and physical execution timing through the synergistic coupling of the migration time-series dependency vector and the time-series topology lock matrix. When key parameters such as residual variance values are not synchronized, the synchronization of data causal logic and physical execution timing is achieved. The value should be controlled within 0.15, and the system fault-tolerant step constant should be [value missing]. When set to 3.0, the inference logic has optimal anti-interference performance and computational resource utilization.
[0036] Example 5: In this embodiment, within a digital processing scenario involving high-concurrency scheduling and anomaly defense for external business logic interfaces, existing rule-based routing strategies are inadequate to handle dynamic loads when API interface response latency exhibits non-stationary fluctuations. To address this issue, this invention implements a decision-making method incorporating implicit look-ahead verification and adaptive routing scheduling. To resolve the temporal logic coupling present during the execution of external interface call protocols, the system constructs a mechanism that includes... The asynchronous branch's state monitoring container, before each decision step is executed, calculates and extracts a transitional dependency vector representing the degree of compliance of the current inference step with the external action branch, based on the session context semantic matrix. When the system determines the vector Special positioning in equal When this occurs, it indicates that the path is logically decoupled. The system activates the streaming lookahead inference engine and plans the instruction sequence according to preset control rules without suspending the main control loop. To address the feature space pollution that asynchronous callbacks may introduce, the system incorporates a residual variance monitoring mechanism before performing fusion evaluation. The system compares the structured response data returned by the external interface with the locally cached lookahead prediction feature data in real time and calculates the residual variance value between the two. The calculation formula is as follows: ,in, In response to the data, the first One feature term; For the corresponding item in the forward forecast data; The total number of feature terms is fixed at 128 in this test scenario. When the residual variance value is detected... Exceeding the stability threshold At that time, the system determines that the current reasoning branch is contaminated with semantic features.
[0037] To cope with such abnormal operating conditions, the system activates a nonlinear state rollback operator, based on the transition time dependency vector. The snapshot index in the system degrades the current context semantic feature matrix to the state before the anomaly occurred. The system switches to a bidirectional shadow stream architecture, rereads the enhanced data from the trusted vector retrieval database, and injects it into the decision engine for secondary verification. During the routing decision process, when the routing weight obtained through product evaluation exceeds the preset system risk boundary, the routing controller forces the current traffic protocol to switch to the prepared physical storage node through a logical branch jump instruction. This avoids transient transmission loss of the data bus under high load. In the final output judgment result, the system integrates the above state rollback with the deterministic logic output generated by the routing decision process into the final natural language business control flow. According to the test, in this specific high latency disturbance scenario, through the above mechanism, the system reduces the state transition path divergence rate to below 0.01%, and when processing long-round sessions, the memory space usage fluctuation is controlled within the 5% engineering allowable error range, effectively realizing the dynamic convergence of the inference decision logic in the asynchronous disturbance environment.
[0038] Example 6: In this embodiment, for an agent-based decision-making system targeting high-concurrency business flows, the agent needs to maintain the stability of its decision-making logic under conditions of latency from multiple asynchronous external API calls. To address the data causal coupling deviation between the inference step and the external action chain caused by network fluctuations, the system is configured with a... The asynchronous branch's status monitoring container performs an offline calibration process before system deployment. In this process, the system collects 1000 sets of historical API call records under ideal network conditions. By statistically analyzing the difference between the request sending timestamp and the response receiving timestamp in each set of records, a baseline response latency for external interfaces is constructed. The system then uses preset fault tolerance parameters... Set the initial state transition decision window size. Each sampling unit, of which, The median of historical latency data is used by the system. As the maximum blocking tolerance limit for the non-blocking event loop in subsequent multi-step decision-making processes, this parameter must not be directly modified during operation. It can only be adjusted incrementally through a sliding window update mechanism of subsequent running data.
[0039] When the system is running in a real-world deployment environment and faces complex network interference, the first derivative of the asynchronous response time is collected in real time. And call the preset fault tolerance ladder constant. Dynamic constraints are applied to the branch growth depth; the system sets... The value is 2.5, when the real-time monitored continuous The number of sampling periods shows an increasing trend, and its first-order derivative value consistently exceeds the stability criterion. When the system triggers the rigid circuit breaker logic of the look-ahead path, the system then determines the maximum growth depth D based on the calculated value. max = ln(1+κΔt) The subsequent predictive inference branches are dynamically truncated, and the computational resources for that path are immediately redirected to a single-route traffic splitting process based on a discretized step-by-step suspension mode. During the reset process, the system monitors memory usage. ,like If the total capacity exceeds the 85% warning threshold, the system immediately transfers the historical migration time-series dependency vector mapping data from the memory cache to the external disk storage area. Through the above-mentioned defense mechanism of establishing numerical benchmarks in the offline stage and performing dynamic gradient truncation in the online stage, the system eliminates the state divergence problem caused by out-of-order callbacks of asynchronous heterogeneous interfaces and realizes the engineering logic convergence of the decision flow under variable network conditions.
[0040] Example 7: In this embodiment, within a digital processing scenario involving automated request scheduling for external business APIs, existing timeout determination strategies based on fixed thresholds struggle to distinguish between excessive interface load and momentary packet loss in the network link when API call requests experience sudden latency fluctuations at the network transport layer. This causes the agent's decision-making path to oscillate between ineffective waiting and frequent retries. To address this issue, this invention implements a dynamic latency compensation and state path locking procedure based on an asynchronous transaction sliding window queue. During the initial system deployment or when the operating environment changes, the data processing center performs offline parameter calibration based on a preset benchmark test set to determine the system's response characteristic parameters adapted to specific network environments. The system collects 500 API call response latency samples under no background load and calculates the average latency of the sample set. with standard deviation Construct an initial response baseline model based on The calculation logic sets an initial timeout threshold for a single API call. This threshold serves as the physical criterion for the agent to determine whether the current decision step should trigger a state rollback or a route flow reset.
[0041] When the system is online, the data processing center maintains a depth of [missing information] in real time. An asynchronous transaction sliding window queue is used to track function call protocols that have been issued but have not yet received a response. For each call request in a waiting state, the system calculates its real-time waiting time. and The ratio is used as the urgency weight. The calculation logic is as follows: ,when When the value is in the range of 0.6 to 0.9, the system determines that the inference decision step faces a high risk of oscillation and automatically triggers a forward strategy adjustment, reducing the depth limit factor of the inference branch. Reduced to 0.5; when When the system triggers path circuit breaking, it does so based on the migration time-series dependency vector. The historical snapshot is rolled back in situ, backtracking the state machine pointer to the logically stable point before the call was triggered. When the system performs a state rollback or a routing change, it records the current state. Trigger instantaneous value and its corresponding context semantic feature matrix index In subsequent decision-making loops, the system compares the current... residual variance and Historical records at the location, if residual variance values are found The fluctuation amplitude is less than the preset adaptive compensation gain. If the system automatically restores the original inference depth, it does not need to re-execute the complete offline calibration process. This mechanism ensures that the system can maintain the logical deterministic closed loop of the multi-step decision path and the engineered convergence of the state even under drastic fluctuations in the network environment by transforming the complex time delay uncertainty into a quantifiable and automatically compensated parameter control flow.
Claims
1. A multi-step decision-making method for intelligent agents based on alternating reasoning and action, characterized in that, Includes the following steps: Step S101: Extract features from the collected conversation text data and construct a high-dimensional semantic feature matrix of the context. Step S102: Calculate the migration time-series dependency vector of the inference decision step to the external action branch. When the degree of compliance of the migration time-series dependency vector is equal to 0, start the prediction inference branch to plan the control instruction sequence. When the degree of compliance of the migration time-series dependency vector is greater than 0, attach the current control path to the sliding window queue. Step S103: Based on the first derivative of the asynchronous response time of the event loop queue, the maximum growth depth of the prediction inference branch is truncated using a logarithmic constraint using the system fault tolerance ladder constant. Step S104: Convert the control command sequence into a function call protocol to trigger the external interface. Determine the comprehensive weight of the route evaluation based on the product of the operating cost component and the network delay component of the external interface. When the comprehensive weight of the route evaluation exceeds the security boundary threshold, switch the routing flow of the function call protocol to the backup digital node to distribute the function call protocol evenly to the preset static computing node in a 1:1 ratio. Step S105: Calculate the residual variance between the structured response data returned by the external interface and the predicted feature data. When the residual variance exceeds 0.15, activate the nonlinear state rollback operator to erase the feature level in the high-dimensional semantic feature matrix of the context in situ and reconstruct the state machine pointer. Then, use the data orchestration operator to fuse and evaluate the structured response data to output natural language decision data.
2. The agent multi-step decision-making method based on alternating reasoning and action according to claim 1, characterized in that, Step S102 includes the following sub-steps: Step S1021, penetrate the function call protocol to extract the output data item key value defined in the function call protocol; Step S1022, perform overlap retrieval between the output data item key value and the input parameter requirements in the control instruction sequence to be planned, so as to establish a migration timing dependency vector in the form of a 16-bit binary mask, wherein each algebraic occupant in the migration timing dependency vector uniquely maps to an unresolved asynchronous action branch on the timing axis.
3. The agent multi-step decision-making method based on alternating reasoning and action according to claim 1, characterized in that, Step S101 includes the following sub-steps: Step S1011, sampling and obtaining response time data of the external interface in a continuous cycle from the event loop queue; Step S1012, calculating the difference between response time data of adjacent cycles to generate the first derivative of asynchronous response time.
4. The agent multi-step decision-making method based on alternating reasoning and action according to claim 1, characterized in that, Step S104 includes the following sub-steps: Step S1041, obtain the historical response characteristics of the external interface and parse out the operating cost component and the network delay component; Step S1042, calculate the product of the operating cost component and the network delay component to obtain the comprehensive weight of the route evaluation, and keep the current route topology map pointer stable when the comprehensive weight of the route evaluation is less than or equal to the security boundary threshold.
5. The agent multi-step decision-making method based on alternating reasoning and action according to claim 1, characterized in that, The process of starting the prediction inference branch in step S102 includes the following sub-steps: Step S1023, when the compliance degree value of the migration time-series dependency vector is greater than 0, terminate the look-ahead generation of the prediction inference branch to truncate the look-ahead path, and capture the intermediate state snapshot of the current finite state machine; Step S1024, transfer the captured intermediate state snapshot to the memory, and suspend the data stream corresponding to the intermediate state snapshot to the sliding window queue.
6. The agent multi-step decision-making method based on alternating reasoning and action according to claim 4, characterized in that, Step S104, which switches the routing flow of the function call protocol to the backup digital node, includes the following sub-steps: Step S1043, periodically calculate the rate of change of the first derivative of the asynchronous response time to generate the corresponding differential value; Step S1044, when the first derivative of the asynchronous response time increases monotonically for three consecutive sampling periods and the generated differential value exceeds the baseline dynamic stability threshold, apply a degradation gating to the routing topology map to stop calculating the comprehensive weight of the route evaluation and forcibly switch the current routing configuration to a fixed distribution rule so that the function call protocol is evenly distributed to the preset static calculation node at a 1:1 ratio.
7. The agent multi-step decision-making method based on alternating reasoning and action according to claim 1, characterized in that, In cases where the context high-dimensional semantic feature matrix is suspended or undergoes nonlinear state rollback, the following steps are also included: Step S106, in response to the suspension state of the current control path, the throughput rate of the concurrent data stream is limited; Step S107, the cosine similarity residual fluctuation value of the hidden layer tensor between adjacent inference cycles is calculated, and when the residual fluctuation value is less than 0.05, the intermediate data dimension in the resting state is removed in situ to converge and normalize the context high-dimensional semantic feature matrix from 512 dimensions to a compact mask vector of 256 dimensions.
8. The agent multi-step decision-making method based on alternating reasoning and action according to claim 7, characterized in that, Includes the following steps: Step S108: Use the converged and regularized compact mask vector to reduce the real-time transmission bandwidth of the system data bus when it is split at the preset static computing node.
9. A multi-step decision-making method for intelligent agents based on alternating reasoning and action, as described in claim 1, is characterized in that... In the data processing loop of alternating reasoning and action, there is also an environmental data adjustment step: Step S109, real-time monitoring of the continuous expansion rate of the high-dimensional semantic feature matrix of the context, and when the continuous expansion rate exceeds the preset capacity safety threshold, the storage space is automatically released to clear the feature vector space pointers that do not have semantic association.