Multi-agent interaction method and device based on context-based secure routing selection, equipment and medium

CN122783293APending Publication Date: 2026-09-18NAT IND INFORMATION SECURITY DEV RES CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610933181.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

一是Token消耗爆炸,随着智能体数量和交互轮数的增加,全量上下文的传输导致计算成本呈指数级增长;二是敏感信息泄露,在缺乏精细化权限控制的情况下,攻击性智能体或被劫持的智能体可能获取包含用户隐私的完整上下文数据,敏感信息泄露风险高

Benefits of technology

本申请通过引入零信任原则与上下文防火墙逻辑形成动态通信机制,实现了对多智能体大规模协作中通信内容的“最小够用”原则分发,实现了对上下文信息进行细粒度、按需分发的实时清洗与路由控制,能够有效平衡上下文信息效用与数据安全风险,并显著降低Token消耗,从而解决Token滥用与隐私泄露问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122783293A_ABST
    Figure CN122783293A_ABST
Patent Text Reader

Abstract

A multi-agent interaction method, device and equipment based on context security routing selection and a medium, the method comprising: obtaining target task information and state information of candidate agents; obtaining semantic information of the target task information, determining a security defense level of the task and a query element according to the semantic information; and obtaining a security credit score and capability characteristics of the agents according to the state information; establishing a permission alignment relationship between the task demand and the target agents based on the security credit score and the capability characteristics of the selected agents; in a multi-agent cooperation scene, using a context firewall logic to calculate an information gain score and a security risk score of each context logic fragment to the target agents; generating a differentiated routing topology based on the information gain score and the security risk score; transmitting data to the target agents according to the differentiated routing topology, generating a final processing result and displaying the interaction. The application effectively balances the context information utility and the data security risk, and significantly reduces the Token consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic digital data processing technology, and in particular to a multi-agent interaction method, apparatus, device, and medium based on context-secure routing. Background Technology

[0002] With the development of Large Language Model (LLM) technology, multi-agent collaborative systems have become the mainstream architecture for solving complex tasks. In multi-agent collaborative scenarios, multiple agents need to efficiently share and transmit contextual information to ensure the coherence of collaborative tasks and the consistency of the final results.

[0003] However, existing multi-agent communication mechanisms typically employ full broadcast or static rule-based message passing. In practical applications, these methods face two major technical challenges: First, there is an explosion in token consumption. As the number of agents and interaction rounds increases, the transmission of the full context leads to an exponential increase in computational costs. Second, there is a risk of sensitive information leakage. Without granular access control, malicious or hijacked agents may obtain complete context data containing user privacy, resulting in a high risk of sensitive information leakage.

[0004] To provide data protection, most solutions in related technologies focus on encryption of static data or simple access control lists (ACLs). Such protection methods are difficult to adapt to the dynamic, real-time, and high-frequency context interaction requirements of large-scale intelligent agents. Summary of the Invention

[0005] To address the shortcomings of the prior art, this invention provides a multi-agent interaction method, apparatus, device, and medium based on context-secure routing selection, employing the following technical solution: Firstly, a multi-agent interaction method based on context-safe routing selection is provided, including: Acquire target task information and candidate agent state information; the state information includes at least domain capability labels, historical behavior, and task results. Obtain semantic information of the target task information, determine the security defense level and query elements of the task based on the semantic information, and obtain the security reputation score and capability characteristics of the intelligent agent based on the state information; Based on the security reputation score and capability characteristics of the selected intelligent agent, establish the permission alignment relationship between task requirements and target intelligent agents; In multi-agent collaboration scenarios, the context firewall logic is used to calculate the information gain score and security risk score of each context logic slice for the target agent. Based on information gain scoring and security risk scoring, a differentiated routing topology is generated; Data is transmitted to the target agent according to the differentiated routing topology, and the final processing result is generated and displayed interactively based on the target agent; wherein, optionally, the context data is incrementally synchronized and / or de-identified, and the processed data is distributed to the corresponding target agent.

[0006] Secondly, a multi-agent interaction device based on context-safe routing selection is provided, comprising: The information acquisition module is used to acquire target task information and candidate agent status information; the status information includes at least domain capability tags, historical behaviors, and task results. The security analysis module is used to acquire semantic information of the target task information, determine the security defense level and query elements of the task based on the semantic information, and obtain the security reputation score and capability characteristics of the intelligent agent based on the status information. The security analysis module is used to establish permission alignment relationships between task requirements and target intelligent agents based on the security reputation score and capability characteristics of the selected intelligent agents. In multi-agent collaboration scenarios, the context firewall logic is used to calculate the information gain score and security risk score of each context logic slice for the target agent. The routing calculation module is used to generate differentiated routing topologies based on information gain scores and security risk scores. The execution processing module is used to transmit data to the target agent according to the differentiated routing topology, generate the final processing result based on the target agent, and display the interaction; wherein, optionally, the context data is incrementally synchronized and / or de-identified, and the processed data is distributed to the corresponding target agent.

[0007] Thirdly, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, performs the steps of the method as described in the first aspect.

[0008] Fourthly, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method as described in the first aspect.

[0009] The multi-agent interaction method based on context-safe routing selection in this application has the following beneficial effects: This application introduces a dynamic communication mechanism by combining the zero-trust principle with context firewall logic. This mechanism enables the distribution of communication content in large-scale multi-agent collaboration based on the "minimum sufficiency" principle. It achieves real-time cleaning and routing control of context information in a fine-grained, on-demand manner, effectively balancing the utility of context information with data security risks and significantly reducing token consumption, thereby solving the problems of token abuse and privacy leakage.

[0010] The apparatus, electronic device, and readable storage medium corresponding to the multi-agent interaction method based on context-safe routing in this application can achieve the same technical effect, and will not be described in detail here to avoid duplication. Attached Figure Description

[0011] Figure 1 A schematic flowchart illustrating a multi-agent interaction method based on context-safe routing provided in this application embodiment; Figure 2 A schematic flowchart illustrating another multi-agent interaction method based on context-safe routing provided in this application embodiment; Figure 3 A schematic flowchart illustrating yet another multi-agent interaction method based on context-safe routing provided in this application embodiment; Figure 4 A schematic diagram of a multi-agent interaction system architecture based on context-safe routing is provided for embodiments of this application; Figure 5 This is a schematic flowchart illustrating the routing topology generation process of a context firewall logic, as provided in an embodiment of this application. Detailed Implementation

[0012] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the technical solutions in the embodiments of this application are clearly described. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art are within the scope of protection of this application.

[0013] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0014] The steps described in this application and the flowcharts in the accompanying drawings are not necessarily strictly executed according to the step numbers; the execution order of the steps can be changed. Furthermore, certain steps can be omitted, multiple steps can be combined into one step, and / or one step can be broken down into multiple steps.

[0015] This specification provides a multi-agent interaction method based on context-safe routing, and also relates to a multi-agent interaction device based on context-safe routing, a computer device, and a computer-readable storage medium. The following describes each of these in detail with reference to the accompanying drawings and preferred embodiments.

[0016] Please see Figure 1-5 This application provides a multi-agent interaction method based on context-safe routing selection, including: Step S1: Obtain target task information and candidate agent state information; the state information includes at least domain capability labels, historical behaviors, and task results.

[0017] The target task information is usually the user's prompt input, and in some possible embodiments, it can also be the output instruction from the upstream (agent).

[0018] The state information of a candidate agent generally includes the agent's current load state (Idle / Busy), online status, historical behavior, historical task results, and its pre-trained domain capability labels, such as code generation, medical consultation, and general chat.

[0019] Step S2: Obtain the semantic information of the target task information, determine the security defense level and query elements of the task based on the semantic information, and obtain the security reputation score and capability characteristics of the intelligent agent based on the status information.

[0020] The process of obtaining semantic information about the target task and determining the security defense level and query elements based on that semantic information specifically includes: Step S201: Perform entity recognition and intent classification on the target task information; Step S203: Obtain the sensitive attribute information of the entity and determine the security defense level of the task based on the preset security policy; Step S205: Determine the intent carrier based on the intent.

[0021] In practice, Natural Language Processing (NLP) is used to perform entity extraction (NER) and intent classification for the task. Sensitive attribute information involves sensitive privacy or critical business logic, etc. For example, if a task contains entities such as "ID number" or "bank account," it is considered a highly sensitive task, and the security defense level is set to Level-3 (the highest); if it only asks about "weather," it is set to Level-1. The higher the security defense level, the greater the desensitization of context during subsequent routing.

[0022] The core query element is the carrier of the key intent of a task. For example, in the task "Help me analyze this Excel spreadsheet containing salary data", "analyze" is the intent, and "salary data" is the core query element.

[0023] An agent's security reputation score is obtained based on its historical behavior and domain capability tags, generated through a preset security reputation scoring strategy. In practice, an agent is assigned a base reputation score, and abnormal behavior is penalized, such as unauthorized access to sensitive fields. If an agent frequently attempts to access sensitive fields unrelated to its preset capability tags in historical interactions, an abnormal behavior judgment is triggered, and its base reputation score is dynamically deducted according to a preset penalty coefficient. The penalty coefficient can be set according to the risk level. Positive behavior adds points.

[0024] The capabilities of an agent include static features of domain capability labels and capability scores dynamically generated based on historical task results.

[0025] Step S3: Based on the security reputation score and capability characteristics of the selected intelligent agent, establish the permission alignment relationship between the task requirements and the target intelligent agent.

[0026] This step introduces the "zero trust" concept. The aforementioned permission alignment means that an agent is only allowed to participate if its capabilities match and its reputation score meets the task's security defense level. In specific implementation: Step S301: Verify whether the candidate agent possesses the capability features required to process the query element; Step S303: Verify that the security reputation score of the candidate agent is higher than the threshold corresponding to the security defense level of the current task; Step S305: Only when the security reputation score of the candidate agent is higher than the threshold corresponding to the security defense level of the current task, and the capability characteristics match, mark it as a legitimate target agent and generate a temporary least privileged access credential.

[0027] Step S4: In a multi-agent collaboration scenario, use the context firewall logic to calculate the information gain score and security risk score of each context logic slice for the target agent.

[0028] Further, in step S4, in a multi-agent collaboration scenario, the context firewall logic is used to calculate the information gain score and security risk score of each context slice for the target agent, specifically including: Step S401: Divide the context data in the long context window into multiple context logic fragments and construct them into <context logic fragment-target agent> pairs; Step S403: For each <context logic slice-target agent> pair, calculate the information gain score and security risk score; The information gain score represents the contribution of the context logic slice to the agent's completion of the current task; The security risk score characterizes the privacy risks that may arise from the leakage of the context logic fragment to the agent. Step S405: Construct a <benefit-risk> matrix and select only paths with information gain scores higher than a set threshold and security risk scores lower than a set threshold as valid routes.

[0029] In some possible implementations, the information gain score is calculated based on the cosine similarity between the contextual logical slice and the word vector of the query element. The higher the similarity, the higher the score.

[0030] In some possible implementations, the security risk score is derived by weighting and summing the number of sensitive entities (such as ID cards) hit in the context logic slice and combining them with preset risk weights.

[0031] Step S5: Generate a differentiated routing topology based on information gain score and security risk score. Specifically: Based on the aforementioned <profit-risk> matrix, a routing topology with a directed acyclic graph (DAG) structure is constructed in a multi-agent network; For high-risk and high-gain paths, an intermediate layer is inserted into the topology nodes for auditing and / or data cleaning; or a de-identification processor is used.

[0032] For low-risk, high-gain paths, establish direct connections to reduce communication latency.

[0033] For high-risk and low-gain paths, block the path.

[0034] Step S6: Transmit data to the target agent according to the differentiated routing topology, generate the final processing result based on the target agent and display the interaction; Optionally, the context data can be incrementally synchronized and / or de-identified, and the processed data can be distributed to the corresponding target agent.

[0035] Furthermore, the incremental synchronization includes: A differential update mechanism is employed, which extracts differentiated token fragments by comparing the local cached context hash tree of the target agent with the complete hash tree of the context fragments required for this task. Thus, the system only sends missing but necessary token fragments to the agent, resolving the token consumption explosion problem.

[0036] Furthermore, the desensitization process includes: For the data that passes through the route, different levels of desensitization processing are performed according to the security defense level; the desensitization processing includes mask replacement and differential privacy noise addition.

[0037] In some possible implementations, each context logic slice can be pre-configured with a sensitivity level, and each target agent can be mapped to the highest sensitivity level that is allowed to access based on its security reputation score, thus constructing a conflict determination matrix; For context logic slices marked with a sensitivity level, cross-comparison is performed using the conflict determination matrix: if the sensitivity level of a slice is higher than the level allowed by the agent, routing interception is triggered.

[0038] In some possible implementations, the multi-agent interaction method based on context-safe routing further includes: Real-time monitoring of the token consumption rate of each target agent during multi-turn dialogues; When the token consumption rate exceeds the dynamic preset threshold, the context summarization compression mechanism is forcibly triggered. The preset agent is called to perform semantic summarization rewriting on non-core paragraphs in the historical context, generating compressed short text to replace the original context.

[0039] The preset threshold is not a fixed value, but a safety level dynamically calculated based on the maximum context window limit of the current target agent's underlying large language model and the remaining number of rounds of the current processing task. When the rate is detected to exceed this dynamic preset threshold, a context summarization compression mechanism is forcibly triggered: a lightweight model is called to perform semantic summarization rewriting of non-core paragraphs of the historical context, generating compressed short text to solve the token explosion problem.

[0040] Based on the above solution, this application has the following outstanding substantive effects: 1. Enhanced security: Based on a zero-trust mechanism, real-time permission alignment is performed for each intelligent agent call. Differentiated routing topology blocks the path of sensitive information to low-reputation intelligent agents, effectively preventing data side-shift attacks.

[0041] 2. Resource optimization: By using context firewall logic to calculate information gain, only context fragments that provide a gain for the task are synchronized, and incremental synchronization (differential update) technology is adopted to significantly reduce token consumption in large-scale systems.

[0042] 3. Dynamic Adaptation: It can dynamically adjust the desensitization level according to the security defense level of the task, maximizing the retention of the agent's collaborative ability while ensuring security.

[0043] The following is a specific application example to further illustrate this. Taking the "enterprise financial data analysis" multi-agent scenario as an example, the process of generating and executing differentiated routing topologies is explained in detail.

[0044] Suppose the target task information is: "Please analyze this Excel spreadsheet which contains the revenue of each department and the actual salary details of key employees for this quarter, and provide optimization suggestions."

[0045] Analysis and Alignment: The system's security analysis module identified "Revenue" as routine business data (Level-1 defense) and "Real Salary Details" as extremely sensitive privacy data (Level-3 defense). The system identified three agents: a "General Chatting Agent" (low reputation score, mismatched capabilities), a "Junior Financial Agent" (medium reputation score, matching capabilities), and a "Advanced Data Analysis Agent" (high reputation score, Level-3 access permission). The system identified the "Advanced Data Analysis Agent" as the target agent.

[0046] Topology generation: For the context fragment containing "revenue of each department", the system calculates that its information gain score is high and its security risk score is low. Therefore, a direct connection channel is established in the DAG topology to directly route to the target intelligent agent.

[0047] For a context fragment containing "Zhang San, ID number XXX, salary 50,000", the system calculates that it has a high information gain score, is necessary for the total analysis cost, but has an extremely high security risk score. Therefore, the system inserts a data cleaning layer node into the DAG topology.

[0048] Execution and De-identification: When this high-risk shard passes through the data cleaning layer, it is masked in real time as "Employee A, ID [Masked], Salary Range [40k-60k]" before being sent to the target agent. Ultimately, without disclosing specific personal privacy, the agent completes the output of cost optimization suggestions.

[0049] Corresponding to the above embodiments of the multi-agent interaction method based on context-safe routing, this application provides a multi-agent interaction device based on context-safe routing, including: The information acquisition module is used to acquire target task information and candidate agent status information; the status information includes at least domain capability tags, historical behaviors, and task results. The security analysis module is used to acquire semantic information of the target task information, determine the security defense level and query elements of the task based on the semantic information, and obtain the security reputation score and capability characteristics of the intelligent agent based on the status information. The security analysis module is used to establish permission alignment relationships between task requirements and target intelligent agents based on the security reputation score and capability characteristics of the selected intelligent agents. In multi-agent collaboration scenarios, the context firewall logic is used to calculate the information gain score and security risk score of each context logic slice for the target agent. The routing calculation module is used to generate differentiated routing topologies based on information gain scores and security risk scores. The execution processing module is used to transmit data to the target agent according to the differentiated routing topology, generate the final processing result based on the target agent, and display the interaction; wherein, optionally, the context data is incrementally synchronized and / or de-identified, and the processed data is distributed to the corresponding target agent.

[0050] The aforementioned multi-agent interaction device based on context-safe routing implements the steps and processes of the aforementioned multi-agent interaction method based on context-safe routing, and achieves the same technical effect. To avoid repetition, these will not be repeated here.

[0051] Corresponding to the above embodiments of the multi-agent interaction method based on context-secure routing, this application provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps and processes of the above embodiments of the multi-agent interaction method based on context-secure routing, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0052] Memory can be used to store software programs and various data. Memory can primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area can store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, memory can include volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM). The memory in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0053] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly handles operations related to the operating system, user interface, and applications, while the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor.

[0054] Corresponding to the above embodiments of the multi-agent interaction method based on context-safe routing, this application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the steps and processes of the above embodiments of the multi-agent interaction method based on context-safe routing, and achieve the same technical effect. To avoid repetition, these will not be described again here.

[0055] The processor is the processor in the electronic device described in the above embodiments of this application. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk.

[0056] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0057] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0058] It is understood that the embodiments of this application have been described above in conjunction with the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. As those skilled in the art will know, various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, those skilled in the art, under the guidance or instruction of this application, can modify these features and embodiments to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, this invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this invention.

Claims

1. A multi-agent interaction method based on context-safe routing, characterized in that, include: Obtain target task information and candidate agent status information; The status information includes at least domain capability tags and historical behaviors and task results; Obtain semantic information of the target task information, and determine the security defense level and query elements of the task based on the semantic information; And based on the state information, the security reputation score and capability characteristics of the intelligent agent are obtained; Based on the security reputation score and capability characteristics of the selected intelligent agent, establish the permission alignment relationship between task requirements and target intelligent agents; In multi-agent collaboration scenarios, the context firewall logic is used to calculate the information gain score and security risk score of each context logic slice for the target agent. Based on information gain scoring and security risk scoring, a differentiated routing topology is generated; Data is transmitted to the target agent according to the differentiated routing topology, and the final processing result is generated and displayed interactively based on the target agent; wherein, optionally, the context data is incrementally synchronized and / or de-identified, and the processed data is distributed to the corresponding target agent.

2. The multi-agent interaction method based on context-safe routing selection according to claim 1, characterized in that, The method of generating differentiated routing topologies based on information gain scoring and security risk scoring includes: Based on the aforementioned <profit-risk> matrix, a routing topology with a directed acyclic graph (DAG) structure is constructed in a multi-agent network; For high-risk and high-gain paths, an intermediate layer is inserted into the topology nodes for auditing and / or data cleaning; or a data masking processor is used. For low-risk and high-gain paths, establish direct connections; For high-risk and low-gain paths, block the path.

3. The multi-agent interaction method based on context-safe routing selection according to claim 1, characterized in that, The aforementioned method of establishing an authorization alignment relationship between task requirements and target agents based on the security reputation score and capability characteristics of the selected agent includes: Verify whether the candidate agent possesses the capability features required to process the query element; Verify that the security reputation score of the candidate agent is higher than the threshold corresponding to the security defense level of the current task; Only when a candidate agent's security reputation score is higher than the threshold corresponding to the security defense level of the current task, and its capability characteristics match, is it marked as a legitimate target agent, and a temporary least privileged access credential is generated.

4. The multi-agent interaction method based on context-safe routing selection according to claim 1, characterized in that, In the multi-agent collaborative scenario, the aforementioned calculation of the information gain score and security risk score of each context logic slice for the target agent using context firewall logic includes: The context data in the long context window is divided into multiple context logic fragments and constructed into <context logic fragment-target agent> pairs; For each <context logic slice-target agent> pair, calculate the information gain score and the security risk score; The information gain score represents the contribution of the context logic slice to the agent's completion of the current task; The security risk score characterizes the privacy risks that may arise from the leakage of the context logic fragment to the agent. Construct a <benefit-risk> matrix and select only paths with information gain scores higher than a set threshold and security risk scores lower than a set threshold as effective routes.

5. The multi-agent interaction method based on context-safe routing selection according to claim 4, characterized in that, The information gain score is calculated based on the cosine similarity between the context logic slice and the word vector of the query element; The security risk score is derived by weighting and summing the number of sensitive entities hit in the context logic slice and combining them with preset risk weights.

6. The multi-agent interaction method based on context-safe routing selection according to claim 1, characterized in that, The incremental synchronization includes: A differential update mechanism is adopted to extract differentiated token fragments by comparing the local cached context hash tree of the target agent with the complete hash tree of the context fragments required for this task.

7. The multi-agent interaction method based on context-safe routing selection according to claim 1, characterized in that, Each context logic slice is pre-configured with a sensitivity level, and each target agent is mapped to the highest sensitivity level that is allowed to access based on its security reputation score, which is then used to construct a conflict decision matrix. For context logic slices marked with a sensitivity level, cross-comparison is performed using the conflict determination matrix: if the sensitivity level of a slice is higher than the level allowed by the agent, routing interception is triggered.

8. A multi-agent interaction device based on context-safe routing, characterized in that, include: The information acquisition module is used to acquire target task information and candidate agent status information; The status information includes at least domain capability tags and historical behaviors and task results; The security analysis module is used to obtain semantic information of the target task information and determine the security defense level and query elements of the task based on the semantic information. And based on the state information, the security reputation score and capability characteristics of the intelligent agent are obtained; The security analysis module is used to establish permission alignment relationships between task requirements and target intelligent agents based on the security reputation score and capability characteristics of the selected intelligent agents. In multi-agent collaboration scenarios, the context firewall logic is used to calculate the information gain score and security risk score of each context logic slice for the target agent. The routing calculation module is used to generate differentiated routing topologies based on information gain scores and security risk scores. The execution processing module is used to transmit data to the target agent according to the differentiated routing topology, generate the final processing result based on the target agent, and display the interaction; wherein, optionally, the context data is incrementally synchronized and / or de-identified, and the processed data is distributed to the corresponding target agent.

9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the multi-agent interaction method based on context-safe routing as described in any one of claims 1 to 6.

10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the multi-agent interaction method based on context-safe routing as described in any one of claims 1 to 6.