A state consistency dynamic alignment method and system based on multi-agent cooperation

CN123014209APending Publication Date: 2026-10-30SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611408895.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0013]鉴于以上所述现有技术的缺点,本发明的目的在于提供一种基于多智能体协同的状态一致性动态对齐方法及系统,用于解决现有生成式人工智能系统缺乏长期状态一致性维护能力、缺乏输入逻辑冲突检测机制、生成行为过于被动以及缺乏动态交互模式切换机制的问题

Benefits of technology

[0029]1、针对长期状态一致性缺失的改进及优点:本发明通过构建长期状态记忆库与状态向量化建模机制,实现历史事实、逻辑关系及行为状态的结构化存储,并结合实时状态一致性评估机制,对当前输入与历史状态进行动态比对,从而有效维持系统长期认知稳定性;经实测验证,在长轮次连续交互场景中,本发明可显著降低状态冲突率与上下文逻辑偏移现象,提升系统长期交互一致性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014209A_ABST
    Figure CN123014209A_ABST
Patent Text Reader

Abstract

The application provides a state consistency dynamic alignment method and system based on multi-agent cooperation, comprising the following steps: constructing a global long-term state memory bank; after receiving a new input sentence, determining the potential conflict between the input content and the historical cognition according to the state vector corresponding to the input sentence content and the global long-term state memory bank; realizing self-logic correction of the input side according to the relationship between the preset threshold of conflict confidence and the conflict confidence in the potential conflict; confirming whether the input sentence after self-logic correction of the input side is satisfied with the consistency condition according to the global long-term state memory bank, and updating the global long-term state memory bank using the state vector corresponding to the input sentence according to the confirmation result; the beneficial effects of the application are that: through global long-term memory modeling, real-time state conflict detection, cognitive consistency evaluation and dynamic interaction mode switching mechanism, the application realizes active logic verification and adaptive interaction control of the generative system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of dynamic alignment methods, and in particular to a dynamic alignment method and system based on state consistency through multi-agent cooperation. Background Technology

[0002] With the development of generative artificial intelligence (GI) and large language models (LLMs), natural language-based human-computer interaction systems have been widely applied in various technical fields such as intelligent question answering, intelligent assistants, automatic decision-making, content generation, and multi-agent collaboration. Existing generative intelligence systems typically adopt a single-turn response model of "input-reasoning-output," directly generating results after semantic understanding of user input. Their core objectives mainly focus on response speed, content fluency, and task completion capability.

[0003] In recent years, multi-agent systems (MAS) have gradually become an important way to achieve complex intelligent tasks. Multiple agents can each undertake different functional modules such as semantic understanding, logic verification, knowledge retrieval, state maintenance, and behavior planning, and work together through cooperative mechanisms to complete complex reasoning tasks. Compared with single agents, multi-agent systems have stronger capabilities in complex task decomposition, long-term state management, and dynamic environment adaptation.

[0004] However, current mainstream generative interactive systems still generally suffer from the following problems: These systems typically assume user input as reliable information, perform only partial semantic understanding, and directly generate responses, lacking the ability to verify the consistency between the input content and historical long-term states. When user input conflicts with existing facts, logical relationships, or historical states in the system's long-term memory, the system often continues to generate content, leading to logical errors, state drift, cognitive confusion, or contextual breaks.

[0005] Especially in scenarios involving long-cycle interactions, multiple rounds of context evolution, and complex collaborative tasks, generative systems are prone to the following phenomena: 1) The system lacks the ability to maintain the consistency of historical states; 2) The model is easily affected by strong local semantic interference of the current input; 3) The system cannot identify implicit logical contradictions; 4) The generation behavior lacks a dynamic correction mechanism; 5) The system's interaction method is too passive, and it can only execute direct responses.

[0006] Some studies have attempted to alleviate the problem of contextual forgetting through memory enhancement, vector databases, and retrieval-augmented generation (RAG), but most solutions only stay at the level of "relevant information retrieval" and lack dynamic detection and proactive correction mechanisms for "state consistency conflicts".

[0007] In summary, the existing technology has the following defects and shortcomings:

[0008] 1) Lack of long-term state consistency maintenance capability: Existing generative systems typically rely solely on the current context window for reasoning, lacking the ability to structurally maintain historical long-term states. As the number of interaction rounds increases, the system is prone to problems such as state drift, forgetting historical facts, and breaking of logical relationships.

[0009] 2) Lack of input logic conflict detection mechanism: Current systems typically assume user input as valid information, performing only semantic parsing without verifying whether it conflicts with existing knowledge states. When the input content is inconsistent with the factual state in the system's long-term memory, the model will still continue to generate output, resulting in logical errors or cognitive contradictions.

[0010] 3) The generation behavior is too passive: Most existing generative systems adopt a "direct response" mechanism, which lacks the ability to actively intervene when potential logical anomalies are detected. They cannot drive the input to make self-correction through guided questioning, resulting in the continuous reinforcement of error information.

[0011] 4) Lack of dynamic interaction mode switching mechanism: Current systems typically employ a fixed interaction paradigm and cannot dynamically switch response modes based on cognitive state. When logical uncertainty or conflict arises, the system lacks the ability to switch from "output mode" to "guidance mode".

[0012] Therefore, how to construct a dynamic alignment method for multi-agent collaborative state consistency that can maintain global cognitive consistency in real time, detect input logic conflicts, and dynamically switch interaction strategies during multi-round interactions has become an important technical problem that urgently needs to be solved in the field of generative artificial intelligence. Summary of the Invention

[0013] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a dynamic alignment method and system for state consistency based on multi-agent collaboration, which solves the problems of existing generative artificial intelligence systems lacking long-term state consistency maintenance capabilities, lacking input logic conflict detection mechanisms, being too passive in generation behavior, and lacking dynamic interaction mode switching mechanisms.

[0014] To achieve the above and other related objectives, the present invention provides the following technical solution:

[0015] A dynamic alignment method for state consistency based on multi-agent collaboration includes the following steps: constructing a global long-term state memory for storing stable fact states, logical relationship states, and long-term behavioral states formed during historical interactions; after receiving a new input statement, vectorizing the content of the input statement, and determining potential conflicts between the input content and historical cognition based on the state vector corresponding to the vectorized statement content and the global long-term state memory, wherein the potential conflicts include conflict location, conflict type, and conflict confidence.

[0016] A preset threshold corresponding to the conflict confidence is obtained, and the relationship between the preset threshold and the conflict confidence is used to determine whether to enter the guided questioning mode, thereby realizing the self-logical correction of the input side; the state vector corresponding to the input statement after the input side has completed self-logical correction is confirmed according to the global long-term state memory, and the state vector corresponding to the input statement is updated according to the confirmation result, thereby realizing the adaptive evolution and stable alignment of the long-term cognitive structure.

[0017] In one embodiment of the present invention, the construction of a global long-term state memory for storing stable factual states, logical relationship states, and long-term behavioral states formed during historical interactions includes: acquiring historical state statements, performing semantic vector encoding on the historical state statements, mapping the state text to a unified high-dimensional semantic space, thereby obtaining a vector representation of the corresponding historical state statement; uniformly storing all state vectors in a vector memory space, and establishing a state relationship graph in the vector memory space based on all state vectors to maintain the logical dependencies between different states, thereby obtaining a global long-term state memory.

[0018] In one embodiment of the present invention, the step of vectorizing the content of the input statement after receiving a new input statement and determining the potential conflict between the input content and historical cognition based on the state vector corresponding to the vectorized statement content and the global long-term state memory includes: vectorizing the content of the input statement after receiving a new input statement and calculating the vector similarity between the state vector corresponding to the vectorized statement content and the historical state set in the global long-term state memory.

[0019] Based on the similarity calculation results, the set of historical states most relevant to the current input is determined. A logical verification agent is used to evaluate the consistency between the state vector corresponding to the input statement and the set of historical states most relevant to the current input. Based on the consistency evaluation results, potential conflicts between the input content and historical cognition are determined.

[0020] In one embodiment of the present invention, obtaining a preset threshold corresponding to the conflict confidence level and determining whether to enter the guided questioning mode based on the relationship between the preset threshold and the conflict confidence level, thereby realizing the self-logical correction of the input side, includes: obtaining a preset threshold corresponding to the conflict confidence level and determining whether the conflict confidence level exceeds the preset threshold.

[0021] If so, the default generation process is immediately stopped and switched to the guided questioning mode. In the guided questioning mode, the guiding decision-making agent generates corresponding logical confirmation questions based on the conflict type, the degree of state deviation, and the stability of historical states, guiding the input end to reconfirm the current state information, thereby realizing the input side's self-logical correction.

[0022] In one embodiment of the present invention, the step of confirming whether the state vector corresponding to the input statement after completing the input-side self-logical correction satisfies the consistency condition according to the global long-term state memory, and updating the global long-term state memory with the state vector corresponding to the input statement according to the confirmation result, thereby realizing the adaptive evolution and stable alignment of the long-term cognitive structure, includes: vectorizing the input statement after completing the input-side self-logical correction, and calculating the vector similarity between the state vector corresponding to the vectorized statement content and the historical state set in the global long-term state memory;

[0023] Based on the similarity calculation results, the set of historical states most relevant to the current input is determined, and a logical verification agent performs a consistency evaluation on the state vector corresponding to the input statement and the set of historical states most relevant to the current input. Based on the consistency evaluation results, it is confirmed whether the state vector corresponding to the input statement meets the consistency condition, and the global long-term state memory bank is updated using the state vector corresponding to the input statement based on the confirmation results, thereby realizing the adaptive evolution and stable alignment of the long-term cognitive structure.

[0024] In one embodiment of the present invention, the consistency conditions include temporal logical consistency, attribute state consistency, behavioral relationship consistency, causal relationship consistency, and multi-round context consistency.

[0025] A state consistency dynamic alignment system based on multi-agent collaboration, based on the aforementioned multi-agent collaboration state consistency dynamic alignment method, includes an interaction layer, a core processing module, a multi-agent collaboration module, and a long-term state memory module; wherein, the interaction layer includes a dynamic interaction mode switching module, which has a direct output mode for normal response generation and a guided questioning mode for logical correction.

[0026] In one embodiment of the present invention, the core processing module includes an input parsing module, a semantic encoding module, a state retrieval module, a consistency evaluation module, a conflict detection module, a confidence evaluation module, and a guided question generation module.

[0027] In one embodiment of the present invention, the multi-agent collaborative module includes a semantic understanding agent, a historical state retrieval agent, a logic verification agent, a confidence assessment agent, and a guidance decision agent.

[0028] As described above, the state consistency dynamic alignment method and system based on multi-agent cooperation of the present invention has the following beneficial effects:

[0029] 1. Improvements and advantages for addressing the lack of long-term state consistency: This invention constructs a long-term state memory bank and a state vectorization modeling mechanism to achieve structured storage of historical facts, logical relationships, and behavioral states. Combined with a real-time state consistency evaluation mechanism, it dynamically compares the current input with the historical state, thereby effectively maintaining the long-term cognitive stability of the system. Practical tests have verified that in long-round continuous interaction scenarios, this invention can significantly reduce the state conflict rate and context logic offset phenomenon, and improve the long-term interaction consistency of the system.

[0030] 2. Improvements and advantages for addressing the inability to detect input logic conflicts: This invention introduces a consistency conflict detection mechanism that combines semantic vector matching with large model logic evaluation to achieve real-time logical verification of input content. When the system detects a conflict between the current input and the long-term state, it can automatically identify the conflict location, conflict type, and conflict confidence, thereby effectively preventing the continuous spread of logical errors and significantly improving the system's cognitive reliability and output stability.

[0031] 3. Improvements and advantages of the overly passive interaction mode: This invention proposes a dynamic interaction mode switching mechanism based on the confidence gradient of conflict. When cognitive conflict is detected, the system automatically stops the direct generation process and switches to the guided questioning mode. Through multiple rounds of logical confirmation questions, the input end is induced to perform self-logical correction. Compared with the traditional passive response mechanism, this invention significantly enhances the system's proactive correction ability and dynamic interaction ability, and improves the stability of human-computer collaboration in complex interaction scenarios.

[0032] 4. Improvements and advantages for addressing the lack of adaptability in complex interaction scenarios: This invention adopts a general state representation mechanism, a unified semantic encoding mechanism, and a dynamic consistency evaluation framework, which can achieve state logic maintenance and cognitive conflict detection without relying on specific business domains. Therefore, this invention has good cross-domain adaptability and can be widely applied in multiple technical fields such as intelligent assistants, multi-agent collaborative systems, automatic decision-making systems, digital interaction platforms, and complex human-machine collaborative systems. It has high engineering versatility and industrial promotion value. Attached Figure Description

[0033] Figure 1 The diagram shows the overall process of the dynamic alignment method for state consistency based on multi-agent collaboration disclosed in this embodiment of the invention.

[0034] Figure 2 The diagram shown is a schematic representation of the overall structure of the dynamic alignment system for state consistency based on multi-agent collaboration disclosed in an embodiment of the present invention. Detailed Implementation

[0035] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. It should be noted that, unless otherwise specified, the following embodiments and features described herein can be combined with each other.

[0036] The first embodiment of the present invention relates to a dynamic alignment method for state consistency based on multi-agent cooperation, the process of which is as follows: Figure 1 As shown, the details are as follows:

[0037] Step 101: Construct a global long-term state memory for storing stable factual states, logical relationship states, and long-term behavioral states formed during historical interactions.

[0038] Specifically, firstly, historical state statements are obtained and semantic vectors are encoded to map the state texts into a unified high-dimensional semantic space, thereby obtaining the vector representation of the corresponding historical state statements; then, all state vectors are uniformly stored in a vector memory space, and a state relationship graph is established in the vector memory space based on all state vectors to maintain the logical dependencies between different states, thereby obtaining a global long-term state memory library.

[0039] More specifically, to address the problem of lack of long-term state consistency, this invention establishes a system-level global cognitive foundation through a "long-term state memory construction mechanism." Current generative systems generally rely solely on short context windows for reasoning, lacking the ability to maintain historical states over the long term, and are prone to state drift, factual forgetting, and logical breaks during multiple rounds of interaction. To solve these problems, this invention constructs a long-term state memory to store stable factual states, logical relational states, and long-term behavioral states formed during historical interactions.

[0040] This invention first performs semantic vector encoding on historical state statements, mapping the state text to a unified high-dimensional semantic space. The state encoding form is as follows: ,in, Indicates the first A historical fact, This represents a semantic encoding model. The vector representation of the corresponding state statement is used; all state vectors are uniformly stored in the vector memory space, and a state relation graph is established to maintain the logical dependencies between different states; this invention achieves long-term cognitive retention capability across rounds and tasks through long-term state storage and state relation modeling, providing a unified cognitive foundation for subsequent consistency evaluation and dynamic state alignment.

[0041] In practical applications, maintaining long-term state consistency involves the following steps: When implementing a long-term state memory mechanism, this invention first constructs a global long-term state memory library to store stable factual states, behavioral states, and logical relationship states formed during historical interactions. This invention semantically encodes historical state statements, converting them into high-dimensional state vectors and storing them in a vector database. Simultaneously, a state relationship graph is established to maintain the logical dependencies between states. When new input information is received, the input content is first vectorized and encoded. Then, based on a vector similarity retrieval mechanism, the set of historical states most relevant to the current input is retrieved from the long-term state memory library, providing a state reference basis for subsequent consistency evaluation.

[0042] Step 102: After receiving a new input statement, the content of the input statement is vectorized and encoded, and the potential conflict between the input content and historical cognition is determined based on the state vector corresponding to the vectorized statement content and the global long-term state memory.

[0043] Specifically, upon receiving a new input statement, the content of the input statement is first vectorized and encoded. Then, the similarity between the state vector corresponding to the vectorized statement content and the historical state set in the global long-term state memory is calculated. Based on the similarity calculation results, the set of historical states most relevant to the current input is determined. A logical verification agent then performs a consistency evaluation on the state vector corresponding to the input statement and the set of historical states most relevant to the current input. Based on the consistency evaluation results, potential conflicts between the input content and historical cognition are determined. These potential conflicts include the conflict location, conflict type, and conflict confidence.

[0044] More specifically, to address the problem of undetectable input logic conflicts, this invention constructs a real-time cognitive conflict analysis scheme based on a "state consistency detection mechanism." Traditional generative systems typically assume that user input is valid information and perform local reasoning only based on the current input. Therefore, they may continue to generate incorrect results even when the input content contradicts the historical state.

[0045] This invention achieves consistency detection between the input state and the long-term memory state by combining semantic vector matching and logical relational reasoning; when a new input statement is received... Next, the input content is first vectorized and encoded: Then, through vector similarity calculation, it is matched with the set of states in long-term memory: This invention selects the top K relevant historical states based on similarity results and submits them to the consistency assessment module for logical relationship reasoning analysis. This consistency assessment is not only based on vector semantic similarity, but also combines a large language model to perform deep reasoning on logical relationships, including multiple dimensions such as temporal logical consistency, attribute state consistency, behavioral relationship consistency, causal relationship consistency, and multi-round contextual consistency. Through the above mechanism, the system can detect potential conflicts between input content and historical cognition in real time, thereby avoiding the continuous spread of erroneous cognition.

[0046] In practical applications, input logic conflict detection involves the following steps: First, semantic matching analysis is performed between the current input and the recalled historical states. Then, a logic verification agent is invoked to perform consistency reasoning on the input content. This invention also combines vector similarity matching results with the logical reasoning results of a large language model to jointly evaluate temporal relationships, attribute relationships, behavioral relationships, and causal relationships. When a logical contradiction is detected between the current input and the historical states, the conflict location is automatically located, and the corresponding conflict type and conflict confidence are generated. To improve detection stability, this invention employs a multi-agent parallel evaluation mechanism, where multiple independent agents generate conflict judgment results, and finally, a unified consistency evaluation result is output through a weighted fusion mechanism.

[0047] Step 103: Obtain the preset threshold corresponding to the conflict confidence level, and determine whether to enter the guided questioning mode based on the relationship between the preset threshold and the conflict confidence level, thereby realizing the self-logical correction of the input side.

[0048] Specifically, firstly, a preset threshold corresponding to the confidence level of the conflict is obtained, and it is determined whether the confidence level of the conflict exceeds the preset threshold. If so, the default generation process is immediately stopped, and the process is switched to the guided questioning mode. In the guided questioning mode, the decision-making agent is guided to generate corresponding logical confirmation questions based on the conflict type, the degree of state shift, and the stability of historical states, so as to guide the input end to reconfirm the current state information, thereby realizing the self-logical correction of the input side.

[0049] More specifically, in response to the problem that the interaction mode of existing generative systems is too passive, this invention proposes a "dynamic interaction mode switching mechanism"; traditional generative systems usually adopt a fixed "input-output" response mode, which will continue to generate content even if potential logical conflicts are detected, lacking the ability to actively correct logical errors.

[0050] This invention achieves adaptive switching between a "direct generation mode" and a "guided questioning mode" through a dynamic interactive control strategy based on conflict confidence; when the global conflict confidence exceeds a preset threshold: This invention immediately suspends direct generation and enters a "guided questioning mode." In this mode, the invention does not directly output the final result, but instead guides the input end to perform self-logical verification by generating logical confirmation questions. For example, the system can automatically generate status confirmation questions, time logic confirmation questions, attribute consistency confirmation questions, historical fact verification questions, and causal relationship inquiry questions, etc. The generation process of guiding questions is dynamically adjusted based on the conflict gradient. ,in, Indicates the confidence level of the conflict. Indicates the state offset. It indicates the historical consistency and stability; when the degree of conflict is high, the present invention can automatically generate more granular and more constraining logical verification questions, thereby improving the efficiency of input logic correction.

[0051] In practical applications, the dynamic interaction mode switches as follows: when the confidence level of cognitive conflict exceeds a preset threshold, the dynamic interaction control module immediately stops the default generation process and switches to the guided questioning mode. In this mode, the guiding decision-making agent generates corresponding logical confirmation questions based on the conflict type, the degree of state shift, and the stability of historical states. This invention guides the input end to reconfirm the current state information through multi-round progressive questioning, thereby achieving self-logical correction on the input side. During the question generation process, this invention dynamically adjusts the question granularity based on the conflict gradient: when the conflict level is low, only simple confirmation questions are generated; when the conflict level is high, deep logical probing questions containing time relationships, causal relationships, and state constraints are generated.

[0052] Step 104: Based on the global long-term state memory, confirm whether the state vector corresponding to the input statement after the input side has completed self-logical correction meets the consistency condition, and update the global long-term state memory using the state vector corresponding to the input statement according to the confirmation result, thereby realizing the adaptive evolution and stable alignment of the long-term cognitive structure.

[0053] Specifically, firstly, the input statement that has completed self-logical correction on the input side is vectorized and encoded, and the vector similarity between the state vector corresponding to the vectorized statement content and the historical state set in the global long-term state memory is calculated. Then, based on the similarity calculation results, the set of historical states most relevant to the current input is determined, and the consistency evaluation between the state vector corresponding to the input statement and the set of historical states most relevant to the current input is performed by a logic verification agent. Then, based on the consistency evaluation results, it is confirmed whether the state vector corresponding to the input statement meets the consistency conditions, and the global long-term state memory is updated using the state vector corresponding to the input statement based on the confirmation results, thereby achieving adaptive evolution and stable alignment of the long-term cognitive structure. Among them, the consistency conditions include temporal logical consistency, attribute state consistency, behavioral relationship consistency, causal relationship consistency, and multi-turn contextual consistency.

[0054] More specifically, to address the problem of the inability to dynamically update long-term cognitive states, this invention proposes a "dynamic state alignment and update mechanism." Traditional generative systems typically do not continuously update their long-term cognitive structures after completing interactions, which easily leads to the gradual distortion of the system's long-term state. This invention, after completing logical corrections at the input end, re-executes the consistency evaluation process, specifically step 102. If it is confirmed that the current state meets the consistency conditions, the long-term state memory is automatically updated. This invention not only updates the state vector synchronously during the update process, but also updates the state relationship graph, long-term logical dependency structure, and historical behavior trajectory. For long-term stable states, this invention increases their state weights. For failed or conflicting states, it reduces their priority or performs failure marking processing. Through a continuous dynamic state update mechanism, the adaptive evolution and dynamic consistency alignment of the system's long-term cognitive structure are achieved.

[0055] In practical applications, dynamic state updates and cognitive alignment are achieved as follows: After completing logical confirmation and input correction, the present invention re-executes the consistency evaluation process; when it is confirmed that the current input meets the state consistency conditions, the state update module automatically updates the long-term state memory; during the update process, the present invention not only updates the corresponding state vector, but also synchronously updates the state relationship graph, historical behavior trajectory, and long-term logical dependency structure; for long-term stable states, the system increases their state weight; for invalid or conflicting states, the system reduces their state priority or performs invalidation marking processing; through a continuous dynamic state update mechanism, the adaptive evolution and stable alignment of the system's long-term cognitive structure are achieved.

[0056] The second embodiment of the present invention relates to a dynamic alignment system for state consistency based on multi-agent cooperation. Please refer to [link to relevant documentation]. Figure 2 It includes an interaction layer, a core processing module, a multi-agent collaboration module, and a long-term state memory module; it should be noted that... Figure 2 The system clearly presents the overall operational logic of the dynamic alignment system for multi-agent collaborative state consistency. Through state synchronization, semantic flow, and dynamic control between modules, it constructs a complete technical system covering long-term state maintenance, cognitive conflict detection, dynamic interaction switching, and multi-agent collaborative alignment.

[0057] The interaction layer includes a dynamic interaction mode switching module, which contains a direct output mode for normal response generation and a guided questioning mode for logical correction. It should be noted that the interaction layer is responsible for receiving user input and dynamically switching interaction modes based on the system's current cognitive state, including the direct output mode for normal response generation and the guided questioning mode for logical correction. The core processing module includes an input parsing module, a semantic encoding module, a state retrieval module, a consistency evaluation module, a conflict detection module, a confidence evaluation module, and a guided questioning generation module. It should be noted that the core processing module, as the system's central hub, integrates the input parsing module, semantic encoding module, state retrieval module, consistency evaluation module, conflict detection module, and confidence evaluation module, realizing key functions such as input state analysis, historical state retrieval, and cognitive conflict determination.

[0058] The multi-agent collaboration module includes a semantic understanding agent, a historical state retrieval agent, a logic verification agent, a confidence assessment agent, and a guidance decision-making agent. It should be noted that each agent shares current state information in real time through a unified state bus and jointly generates the final cognitive judgment result through a collaborative reasoning mechanism. The long-term state memory module is used to store stable factual states, state relationship graphs, and historical behavior trajectories formed during the system's historical interactions, and achieves efficient semantic retrieval and dynamic state updates through a state vector library.

[0059] Specifically, the various functional modules of the system achieve real-time communication and state synchronization through data flow, control flow and feedback flow. When a logical conflict is detected between the input and the historical state, the dynamic interaction mode switching module automatically stops the direct generation process and calls the guided question generation module to guide the input end to complete self-logical correction, thereby realizing the dynamic consistency maintenance and adaptive state alignment of the system's long-term cognitive structure.

[0060] In summary, this invention constructs a closed-loop collaborative system of "long-term state memory - consistency assessment - conflict detection - dynamic interaction control - state update", integrating technologies such as state vector modeling, multi-agent collaborative reasoning, dynamic interaction mode switching, and long-term cognitive alignment to achieve stable cognitive maintenance and proactive logical correction of generative systems in complex multi-round interaction scenarios.

[0061] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. All equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this invention should still be covered by the claims of this invention.

Claims

1. A dynamic alignment method for state consistency based on multi-agent cooperation, characterized in that, Includes the following steps: Construct a global long-term state memory for storing stable factual states, logical relationship states, and long-term behavioral states formed during historical interactions; Upon receiving a new input statement, the content of the input statement is vectorized and encoded. Based on the state vector corresponding to the vectorized statement content and the global long-term state memory, potential conflicts between the input content and historical cognition are determined. The potential conflicts include the conflict location, conflict type, and conflict confidence. Obtain a preset threshold corresponding to the conflict confidence level, and determine whether to enter the guided questioning mode based on the relationship between the preset threshold and the conflict confidence level, thereby realizing the self-logical correction of the input side; The global long-term state memory is used to confirm whether the state vector corresponding to the input statement after the input side has completed self-logical correction meets the consistency condition. Based on the confirmation result, the global long-term state memory is updated using the state vector corresponding to the input statement, thereby realizing the adaptive evolution and stable alignment of the long-term cognitive structure.

2. The dynamic alignment method for state consistency based on multi-agent cooperation according to claim 1, characterized in that: The construction of a global long-term state memory library for storing stable factual states, logical relationship states, and long-term behavioral states formed during historical interactions includes: Historical state statements are obtained, and semantic vector encoding is performed on the historical state statements to map the state text into a unified high-dimensional semantic space, thereby obtaining the vector representation of the corresponding historical state statements; All state vectors are stored uniformly in a vector memory space, and a state relationship graph is established in the vector memory space based on all state vectors to maintain the logical dependencies between different states, thereby obtaining a global long-term state memory library.

3. The dynamic alignment method for state consistency based on multi-agent cooperation according to claim 1, characterized in that: The process of vectorizing the content of a new input statement upon receipt, and determining potential conflicts between the input content and historical cognition based on the state vector corresponding to the vectorized statement content and the global long-term state memory, includes: After receiving a new input statement, the content of the input statement is vectorized and encoded, and the vector similarity between the state vector corresponding to the vectorized statement content and the historical state set in the global long-term state memory is calculated. Based on the similarity calculation results, the set of historical states most relevant to the current input is determined. A logical verification agent is used to evaluate the consistency between the state vector corresponding to the input statement and the set of historical states most relevant to the current input. Based on the consistency evaluation results, potential conflicts between the input content and historical cognition are determined.

4. The dynamic alignment method for state consistency based on multi-agent cooperation according to claim 1, characterized in that: The step of obtaining a preset threshold corresponding to the conflict confidence level, and determining whether to enter the guided questioning mode based on the relationship between the preset threshold and the conflict confidence level, thereby realizing self-logical correction on the input side, includes: Obtain a preset threshold corresponding to the conflict confidence level, and determine whether the conflict confidence level exceeds the preset threshold. If so, the default generation process is immediately stopped and switched to the guided questioning mode. In the guided questioning mode, the guiding decision-making agent generates corresponding logical confirmation questions based on the conflict type, the degree of state deviation, and the stability of historical states, guiding the input end to reconfirm the current state information, thereby realizing the input side's self-logical correction.

5. The dynamic alignment method for state consistency based on multi-agent cooperation according to claim 3, characterized in that: The step of confirming whether the state vector corresponding to the input statement after the input-side self-logical correction meets the consistency condition based on the global long-term state memory, and updating the global long-term state memory using the state vector corresponding to the input statement based on the confirmation result, thereby achieving adaptive evolution and stable alignment of long-term cognitive structures, includes: The input statement that has completed the self-logical correction on the input side is vectorized and encoded, and the vector similarity between the state vector corresponding to the vectorized statement content and the historical state set in the global long-term state memory is calculated. Based on the similarity calculation results, determine the set of historical states most relevant to the current input, and use a logical verification agent to evaluate the consistency between the state vector corresponding to the input statement and the set of historical states most relevant to the current input. Based on the consistency assessment results, it is confirmed whether the state vector corresponding to the input statement meets the consistency condition, and the global long-term state memory is updated using the state vector corresponding to the input statement according to the confirmation results, thereby realizing the adaptive evolution and stable alignment of the long-term cognitive structure.

6. The dynamic alignment method for state consistency based on multi-agent cooperation according to claim 5, characterized in that: The consistency conditions include temporal logical consistency, attribute state consistency, behavioral relationship consistency, causal relationship consistency, and multi-round context consistency.

7. A dynamic alignment system for state consistency based on multi-agent cooperation, characterized in that: The system based on the dynamic alignment method for state consistency based on multi-agent collaboration according to any one of claims 1-6 includes an interaction layer, a core processing module, a multi-agent collaboration module, and a long-term state memory module; wherein, the interaction layer includes a dynamic interaction mode switching module, which is provided with a direct output mode for normal response generation and a guided questioning mode for logical correction.

8. A state consistency dynamic alignment system based on multi-agent cooperation according to claim 7, characterized in that: The core processing module includes an input parsing module, a semantic encoding module, a state retrieval module, a consistency assessment module, a conflict detection module, a confidence assessment module, and a guided question generation module.

9. A state consistency dynamic alignment system based on multi-agent cooperation according to claim 7, characterized in that: The multi-agent collaborative module includes a semantic understanding agent, a historical state retrieval agent, a logic verification agent, a confidence assessment agent, and a guidance decision agent.