Agent interaction method based on permission control and context isolation and related device

By generating permission configuration files through identity recognition and relationship verification, and routing interaction requests to the corresponding context containers for execution, the problems of agent behavior offset and context pollution in multi-user interactions are solved, thereby improving the reliability and security of the interaction.

CN122263075BActive Publication Date: 2026-07-21BEIJING QIBU QIBU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING QIBU QIBU TECH CO LTD
Filing Date
2026-05-25
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, agent behavior deviation, blurred permission boundaries, and context pollution during multi-user interaction affect the reliability of interaction responses and state security.

Method used

By receiving interaction requests, performing identity recognition and relationship verification, generating permission configuration files, and routing requests to the corresponding context containers for execution, the master context container and the guest context container are isolated from each other in terms of long-term memory write permissions.

Benefits of technology

It achieves secure separation between visitor interaction and the owner training environment, and improves the controllability of permissions, data security and state consistency of multi-user interaction of intelligent agents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122263075B_ABST
    Figure CN122263075B_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence and discloses an intelligent agent interaction method based on permission control and context isolation and related equipment, which comprises the following steps: receiving an interaction request for a target intelligent agent; performing identity recognition and relationship verification on the interaction request, determining the identity type of a request initiator, the relationship type with the target intelligent agent, and the device trust state, and generating a corresponding permission configuration file in combination with a current interaction scene; routing the interaction request to a corresponding context container for execution according to the permission configuration file, and generating an intelligent agent response result, wherein the context container at least comprises a host context container and a visitor context container which are isolated from each other in long-term memory writing permission. Through the multi-dimensional permission judgment and context container isolation mechanism, the application realizes the safe separation of the visitor interaction and the host cultivation environment, effectively avoids the pollution of the intelligent agent long-term memory caused by the visitor operation, and improves the permission controllability, data security and state consistency of the intelligent agent multi-user interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to intelligent agent interaction methods and related devices based on access control and context isolation. Background Technology

[0002] With the development of intelligent agent technology and virtual companion systems, more and more products allow users to cultivate personalized intelligent agents through natural language, multimodal behavior, and virtual world interaction. Some systems further allow multiple users to interact around the same intelligent agent; for example, a primary user cultivates an intelligent agent, friends chat with that agent, or, with the help of hardware, trigger adventure events related to the virtual world in the real world.

[0003] However, in existing solutions, since multiple users can directly interact with the same agent, problems such as blurred permission boundaries and context pollution are likely to occur. This may lead to deviations in agent behavior, making it difficult to maintain consistency and continuity in growth. This not only affects the reliability of interaction responses but also makes it difficult to ensure the security of the agent's state. Summary of the Invention

[0004] The main objective of this invention is to provide an intelligent agent interaction method and related devices based on permission control and context isolation, aiming to solve the problems in the prior art where intelligent agents have blurred permission boundaries and context pollution when interacting with multiple users, which leads to behavioral deviations and affects the reliability of interaction responses and state security.

[0005] The technical solution of the present invention is as follows: The first aspect of this invention provides an intelligent agent interaction method based on access control and context isolation, comprising: Receive an interaction request to the target intelligent agent, wherein the initiator of the interaction request includes at least one of the following: the master user terminal, the friend user terminal, and the hardware carrier bound to the target intelligent agent; The interaction request is subjected to identity recognition and relationship verification to determine the identity type of the request initiator, the relationship type with the target intelligent agent, and the trust status of the device. Based on the identity type, relationship type, device trust status, and current interaction scenario of the request initiator, a corresponding permission configuration file is generated. According to the permission configuration file, the interaction request is routed to the corresponding context container for execution, and the corresponding agent response result is generated. The context container includes at least a master context container and a guest context container, and the master context container and the guest context container are isolated from each other in terms of long-term memory write permissions.

[0006] A second aspect of the present invention provides an intelligent agent interaction device based on access control and context isolation, comprising: The request receiving module is used to receive interaction requests to the target intelligent agent. The initiator of the interaction request includes at least one of the following: the master user terminal, the friend user terminal, and the hardware carrier bound to the target intelligent agent. The identification and verification module is used to perform identity recognition and relationship verification on the interaction request, and determine the identity type of the request initiator, the relationship type with the target intelligent agent, and the trust status of the device. The permission configuration module is used to generate a corresponding permission configuration file based on the identity type, relationship type, device trust status, and current interaction scenario of the request initiator. The context isolation execution module is used to route the interaction request to the corresponding context container for execution according to the permission configuration file, and generate the corresponding intelligent agent response result; The context container includes at least a master context container and a guest context container, and the master context container and the guest context container are isolated from each other in terms of long-term memory write permissions.

[0007] A third aspect of the present invention provides a computer device including at least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to perform the above-described intelligent agent interaction method based on access control and context isolation.

[0008] A fourth aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to perform the above-described intelligent agent interaction method based on access control and context isolation.

[0009] Beneficial Effects: This invention discloses an intelligent agent interaction method and related devices based on permission control and context isolation. Compared with existing technologies, this invention receives interaction requests to a target intelligent agent. The request initiator of the interaction request includes at least one of the following: a master user terminal, a friend user terminal, and a hardware carrier bound to the target intelligent agent. The interaction request undergoes identity recognition and relationship verification to determine the identity type of the request initiator, the relationship type with the target intelligent agent, and the device's trust status. Based on the request initiator's identity type, relationship type, device trust status, and the current interaction scenario, a corresponding permission configuration file is generated. According to the permission configuration file, the interaction request is routed to the corresponding context container for execution, generating a corresponding intelligent agent response result. The context container includes at least a master context container and a visitor context container, and the master context container and visitor context container are isolated from each other in terms of long-term memory write permissions. This invention achieves secure separation between visitor interaction and the master training environment through multi-dimensional permission determination and context container isolation mechanisms, effectively preventing visitor operations from polluting the intelligent agent's long-term memory and improving the controllability of permissions, data security, and state consistency in multi-user intelligent agent interaction. Attached Figure Description

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

[0011] Figure 1 This is a schematic diagram of an application environment for the intelligent agent interaction method based on permission control and context isolation provided in an embodiment of the present invention. Figure 2 A flowchart of an intelligent agent interaction method based on access control and context isolation provided in an embodiment of the present invention; Figure 3 A schematic diagram of the functional modules of an intelligent agent interaction device based on permission control and context isolation provided in an embodiment of the present invention; Figure 4 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0012] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The embodiments of the invention are described below in conjunction with the accompanying drawings.

[0013] The intelligent agent interaction method based on permission control and context isolation provided in this invention can be applied to, for example... Figure 1 The illustrated multi-user intelligent agent interaction scenario includes a terminal device 101, a hardware carrier 102 bound to the target intelligent agent, a network 103, and a server 104. The network 103 serves as a medium to provide a communication link between the terminal device 101, the hardware carrier 102, and the server 104. The network 103 can include various connection types, such as wired and / or wireless communication links (e.g., Bluetooth, Wi-Fi, NFC, etc.).

[0014] Users can interact with server 104 via network 103 using terminal device 101 and hardware carrier 102 to receive or send messages, etc. Terminal device 101 may have a client installed that supports virtual scenarios. For example, when the virtual scenario is pet companionship, the client could be a virtual pet application. Users can log in to the client to view, edit, or control the interactions of the bound target intelligent agent in the virtual scenario (this is just an example). Terminal device 101 can be various electronic devices with a display screen and web browsing support, including but not limited to smartphones, tablets, and desktop computers.

[0015] The hardware carrier 102 bound to the target intelligent agent can serve as a real-world interaction medium between the user and the target intelligent agent. It can sense the user's close-range touch, shaking, movement, and other real-world activities in real time and associate them as corresponding interactive events. The hardware carrier 102 can be a plush toy, smart wearable accessory, desktop smart ornament, smart speaker, etc., that integrates motion sensing and near-field communication recognition functions.

[0016] Server 104 can be a server that provides various services, such as a backend server that supports the content browsed by the user using terminal device 101 and hardware carrier 102 (this is just an example). The backend server can analyze and process data such as received user requests, and feed the processing results back to the user through terminal device 101 and hardware carrier 102. Server 104 can be a cloud server, a server of a distributed system, or a server combined with blockchain.

[0017] It should be understood that the number of terminal devices 101, hardware carriers 102, networks 103, and servers 104 mentioned above is merely illustrative. Depending on the implementation needs, there can be any number of terminal devices 101, hardware carriers 102, networks 103, and servers 104. For example, a single user can correspond to one terminal device 101 and one hardware carrier 102, and multiple users can achieve interactive linkage between target intelligent agents through the network.

[0018] like Figure 2As shown, the intelligent agent interaction method based on permission control and context isolation provided in this embodiment of the invention specifically includes the following steps: S201. Receive an interaction request to the target intelligent agent. The initiator of the interaction request includes at least one of the following: the master user terminal, the friend user terminal, and the hardware carrier bound to the target intelligent agent.

[0019] In this embodiment, interaction requests are various interactive instructions initiated by a user or hardware carrier to the target intelligent agent. These requests trigger the intelligent agent's response behavior. When multiple users are involved in the request, the request initiator can be at least one of the following: the master user terminal, a friend's user terminal, or a hardware carrier bound to the target intelligent agent. The types of interaction requests may differ between the different initiators. For example, the master user terminal, as the binder of the target intelligent agent, can initiate all types of interaction requests, including modifying the intelligent agent's core settings, editing long-term memory, operating in the virtual world, daily chat, and hardware linkage control. Interaction requests initiated by a friend's user terminal are mainly conversational, such as text chat, voice interaction, and simple virtual scene viewing. The bound hardware carrier uses built-in sensing modules (such as near-field communication modules and inertial measurement units) to perceive real-world events and automatically trigger interaction requests. For example, the hardware carrier can trigger a friend add request through near-field contact or a real-world adventure event reporting request through shaking.

[0020] Specifically, various interaction requests are received through a pre-defined communication interface. Upon receiving a request, the integrity of the request data is first verified. If data loss, format errors, or invalid request signatures are found, a request failure message is returned to the request initiator. If the data is complete and valid, metadata such as the request initiation time and initiator identifier (e.g., terminal device ID, hardware unique identifier) ​​is recorded, and the process proceeds to the subsequent identity verification stage. This embodiment ensures the integrity and validity of request data by uniformly receiving and initially verifying interaction requests from multiple types of initiators, including owner terminals, friend terminals, and bound hardware. This provides a foundation for subsequent identity verification and permission configuration, and avoids invalid requests consuming system resources.

[0021] S202. Perform identity recognition and relationship verification on the interaction request to determine the identity type of the request initiator, the relationship type with the target intelligent agent, and the device trust status.

[0022] In this embodiment, in scenarios involving multiple request initiators, the interaction request can be identified, verified, and device verified based on at least one of account credentials, friend relationship mapping, one-time access tokens, near-field communication pairing results, Bluetooth pairing results, or unique hardware identifiers. This clarifies who initiated the request, the relationship between the initiator and the intelligent agent, and whether the device initiating the request is secure. This provides a reliable basis for permission configuration and context isolation, ensuring permission controllability and data security.

[0023] Specifically, the interaction request is first identified by extracting the identity credentials carried in the interaction request. These credentials include account passwords, SMS verification codes, biometric information (fingerprints, faces), unique device identifiers, one-time access tokens, etc. Based on the identity credentials, the identity type of the request initiator is determined, including owner identity, friend identity, and temporary visitor identity.

[0024] Next, relationship verification is performed. For request initiators who are not the owner, the relationship type between the request initiator and the target agent can be determined by querying the preset friend relationship mapping. This mainly includes friend relationship, which is a long-term authorized relationship confirmed by the owner; temporary visitor relationship, which is a temporary authorized relationship not confirmed by the owner; and no relationship, which is no authorization obtained.

[0025] Finally, the device trust status is determined by using near-field communication pairing results, Bluetooth pairing results, or unique hardware identifiers to assess the trustworthiness of the terminal device or hardware carrier initiating the request. This includes whether the device is bound to the initiator, whether the device has passed security authentication (such as Bluetooth pairing authentication or near-field communication authentication), and whether the device has any abnormal operation records. The device trust status is divided into trusted devices and untrusted devices. Interaction requests initiated by untrusted devices will be intercepted or have their permissions restricted.

[0026] When a friend initiates a chat request to the target intelligent agent, the system first verifies whether the friend's account has a valid friend relationship; whether the friend holds an access token authorized by the owner; whether the request comes from a trusted device or bound hardware; and whether the current scenario allows visitor sessions, etc. This process clarifies the identity, relationship, and device security of the request initiator, defines role boundaries, and provides a basis for accurate allocation of permissions in the future. It avoids the risks of unauthorized access and malicious interactions initiated by untrusted devices from the source, ensuring the security of intelligent agent interactions.

[0027] S203. Generate a corresponding permission configuration file based on the identity type, relationship type, device trust status, and current interaction scenario of the request initiator.

[0028] In this embodiment, after identity recognition and relationship verification, a corresponding permission configuration file is generated based on the initiation of different requests and the current interaction scenario. The pre-interaction scenario refers to the specific scenario in which the interaction is initiated, which can be determined by comprehensively analyzing the session type, request initiation time, user history, device environment information, and virtual world state. Common interaction scenarios include owner's daily operation scenarios, friend chat scenarios, hardware event triggering scenarios, and temporary visitor interaction scenarios, etc., and the permission requirements differ in different scenarios.

[0029] By combining the identity type, relationship type, device trust status, and current interaction scenario of the request initiator, permission joint determination is performed from multiple dimensions to generate permission configuration files corresponding to different roles. These permission configuration files serve as clear permission boundaries when different roles interact with the target intelligent agent, defining the set of interactive capabilities that the current role can invoke, the accessible memory range, the writable state variable range, and the triggerable virtual world operations, etc. For example, the master role has core setting read / write permissions, long-term memory write permissions, and growth parameter confirmation permissions; the friend role has conversation interaction permissions and limited memory access permissions; and the temporary visitor role only has limited dialogue permissions or one-time interaction permissions, etc. Specific permission configuration rules can be flexibly adjusted according to needs; this embodiment does not impose such limitations.

[0030] This embodiment generates a unique permission configuration file by combining multiple dimensions of factors, which clarifies the operations that each initiator can perform and the scope of resources that can be accessed, thereby avoiding permission overstepping and balancing the openness of interaction with the security of the agent's core data.

[0031] S204. According to the permission configuration file, the interaction request is routed to the corresponding context container for execution, and the corresponding agent response result is generated. The context container includes at least a master context container and a guest context container, and the master context container and the guest context container are isolated from each other in terms of long-term memory write permissions.

[0032] In this embodiment, in addition to configuring permissions exclusively, precise context container routing is used to isolate different interaction requests. The context container is the core carrier for achieving context isolation. It is essentially an independent interaction execution environment used to isolate the interaction process and data of different initiators, avoid mutual interference between the interaction behaviors of different users, and especially prevent visitor interactions from polluting the owner's long-term memory.

[0033] The context container includes at least a master context container and a visitor context container, which are strictly isolated in terms of long-term memory write permissions. The master context container contains core personality settings, a set of growth parameters, a relationship graph, virtual world asset parameters, and the master's long-term memory area. It has access to all interactive capabilities and advanced virtual world operation interfaces, and state updates generated during its interactions can be directly written to the long-term memory area. The visitor context container contains a session input cache, a session output cache, a temporary visitor memory area, a set of restricted tool permissions, and a write strategy isolated from the master's long-term memory. The visitor context container can only access public memory, de-identified scene information, and restricted interactive capabilities. Interaction results in the visitor context container are not directly written to the master's long-term memory; they must first enter the temporary memory area or the pending review area and be merged into the long-term memory area only after being confirmed by the master.

[0034] Specifically, based on the role type (owner, friend, temporary visitor) corresponding to the permission configuration file, the interaction request is routed to the corresponding context container. Within the container, the interaction processing is executed within the scope defined by the permission configuration file, including calling the corresponding interaction capabilities, accessing the specified memory resources, and performing allowed operations. Finally, based on the execution results within the container, an agent response result that conforms to the permission scope is generated and fed back to the request initiator.

[0035] For example, when a friend's terminal chats with the intelligent agent, after identity recognition and role verification, a permission configuration file corresponding to the friend's role is generated. Based on this permission configuration file, the friend's chat request is routed to the visitor context container. Within the visitor context container, the "text chat" interaction capability is invoked, relevant information is extracted from the public memory area and the visitor session memory area, and chat interaction processing is performed. A response result of "The weather is sunny today, suitable for going out" is generated and fed back to the friend's terminal via the network. At the same time, the chat content is stored in the temporary memory cache of the visitor context container and is not written to the long-term memory area.

[0036] This embodiment avoids interference between the interactive behaviors of different roles by isolating the context containers of the master and the visitor, prevents the visitor's interaction from polluting the master's long-term memory, and ensures that the response results are within the scope of permissions, thus guaranteeing the consistency of the agent's behavior and the stability of the master's training results.

[0037] In the above embodiments, this invention discloses an intelligent agent interaction method based on permission control and context isolation. The method involves receiving an interaction request for a target intelligent agent, where the request initiator includes at least one of a master user terminal, a friend user terminal, or a hardware carrier bound to the target intelligent agent. The interaction request undergoes identity recognition and relationship verification to determine the identity type of the request initiator, the relationship type with the target intelligent agent, and the device's trust status. Based on the request initiator's identity type, relationship type, device trust status, and the current interaction scenario, a corresponding permission configuration file is generated. According to the permission configuration file, the interaction request is routed to the corresponding context container for execution, generating a corresponding intelligent agent response result. The context container includes at least a master context container and a visitor context container, and these two containers are isolated from each other in terms of long-term memory write permissions. This invention achieves secure separation between visitor interaction and the master's training environment through multi-dimensional permission determination and context container isolation mechanisms, effectively preventing visitor operations from polluting the intelligent agent's long-term memory and improving the controllability of permissions, data security, and state consistency in multi-user intelligent agent interaction.

[0038] In one embodiment, step S203 includes: Based on the identity type, relationship type, and device trust status of the request initiator, the system matches the system with a preset set of permission rules to determine the set of interactive capabilities that are allowed to be invoked and the scope of memory that are allowed to be accessed in the current interaction. Based on the current interaction scenario, determine the range of state variables that can be written and the range of virtual world operations that can be triggered in the current interaction; The set of interactive capabilities, memory range, state variable range, and virtual world operation range are encapsulated to generate a permission configuration file corresponding to the current interaction request.

[0039] In this embodiment, the preset permission rule set is a pre-stored set of permission templates. It presets corresponding basic permission ranges for different combinations of identity types, relationship types, and device trust status. When generating the permission configuration file, the identity type, relationship type, and device trust status of the request initiator are used as matching keywords to match the preset permission rule set, thereby extracting the corresponding basic interaction capability set and basic memory access range. This eliminates the need for reconfiguration for each interaction; basic permissions can be quickly obtained simply by matching, thus determining the set of interaction capabilities that can be called and the memory range that can be accessed in the current interaction.

[0040] The set of interactive capabilities is a list of interactive functions that the target intelligent agent can provide. The interactive capabilities of different roles are significantly different. For example, the master role has all interactive capabilities, including core setting modification, memory editing, virtual operation, hardware control, etc.; the friend role only has conversational interactive capabilities, such as text and voice chat, simple scene viewing, etc.; the temporary visitor role only has one-time conversation capabilities and no other interactive permissions; interactions initiated by untrusted devices only have the minimum interactive capabilities, etc.

[0041] The permitted memory range refers to the area of ​​the target agent's memory resources that can be accessed. Memory resources are pre-divided into public memory areas, owner-only memory areas, visitor session memory areas, world scene memory areas, etc. Different roles have different memory access ranges. For example, the owner role can access the entire memory range, while the friend role is only authorized to access at least a portion of the public memory area, visitor session memory area, and the de-identified world scene memory area; temporary visitor roles are granted restricted access to the public memory area, and so on.

[0042] Furthermore, the scope of writeable state variables and the scope of virtual world operations allowed to be triggered in the current interaction scenario are determined based on the current interaction scenario. This means that the write permissions and virtual operation permissions for the same role can be flexibly set in different scenarios. State variables are parameters that affect the agent's behavior, preferences, and growth, while the scope of virtual world operations refers to the virtual world-related operations that the agent can perform, such as creating virtual scenes, adjusting virtual assets, and triggering exploration events. By configuring permissions within the interaction scenario, the scope of permissions is further refined to ensure that the permission allocation for different roles and scenarios better matches actual interaction needs.

[0043] When generating the permission configuration file, the four permission modules mentioned above are structured and organized. That is, the set of currently allowed interactive capabilities, memory range, state variable range, and virtual world operation range are organized according to a preset format. After adding metadata such as permission file identifier, request initiator identifier, generation time, and validity period, the permission configuration file corresponding to the current interaction request is encapsulated.

[0044] This embodiment achieves accurate generation of permission configuration files through standardized encapsulation after basic permission matching and scenario adaptation. This ensures that the permission allocation for different roles and scenarios can accurately match the actual interaction needs. Furthermore, the standardized encapsulation facilitates subsequent container routing and permission verification, improving execution efficiency while avoiding out-of-bounds issues caused by permission ambiguity, thus enhancing the accuracy of permission control.

[0045] In one embodiment, step S204 includes: Based on the role type corresponding to the permission configuration file, the interaction request is routed to the master context container or the visitor context container; Within the master context container or the visitor context container, interactive processing is performed according to the set of interactive capabilities, memory range, state variable range, and virtual world operation range defined in the permission configuration file. Based on the execution results within the master context container or the visitor context container, the corresponding agent response results are generated.

[0046] In this embodiment, after different requesters initiate interaction requests and generate corresponding permission configuration files, container routing is accurately completed based on the role types explicitly marked in the permission configuration files, including owner, friend, and temporary visitor. The specific routing rules are as follows: Owner context container and visitor context container templates are pre-created. Each time the role type of an interaction request is identified, if the role type is owner, it is routed to the owner context container; if the role type is friend or temporary visitor, it is routed to the visitor context container. If no visitor context container is currently available, such as if the visitor context container is not yet activated, a temporary visitor container is dynamically instantiated, and an independent session identifier, temporary memory cache, and independent write strategy are assigned to this container. If multiple visitors interact concurrently, an independent visitor context container is assigned to each visitor to ensure session isolation.

[0047] Preferably, a container management list can be maintained to record the status (idle, occupied), corresponding role type, session identifier, and other information of all active context containers. During routing, the container management list is queried to select a container that matches the role type and is idle. If there is no idle container, a new container is created to ensure that interactive requests can be routed and executed in a timely manner.

[0048] After routing interaction requests to the host or visitor context container, permission checks are performed on each step of the interaction process to ensure that the operation does not exceed the scope defined by the permission configuration file. Specifically, when calling an interaction capability, the set of interaction capabilities in the permission configuration file is queried. If the currently called interaction capability is in the set, the call is allowed; otherwise, the call is rejected, and a "permission insufficient" message is returned. When accessing memory resources, the container's access to the memory area is restricted according to the memory range. For example, when a visitor context container attempts to access the host's exclusive memory area, the access request will be intercepted to prevent the leakage of the host's private information. When writing state variables, it is necessary to check whether the state variable to be written is within the allowed write range. If it is a sensitive state variable (such as core personality parameters), additional checks are required to ensure write permission is available. For example, when a visitor context container attempts to write core personality parameters, it will be rejected or the variable will first be written to a temporary memory area or a pending review area. When triggering virtual world operations, it is checked whether the operation is within the allowed virtual world operation range. If it exceeds the range, execution is rejected. For example, a temporary visitor attempting to create a virtual residence will be rejected.

[0049] After completing the interaction processing in the corresponding context container according to the permissions in the permission configuration file, the agent response result that conforms to the permission scope and interaction scenario is generated based on the execution result and fed back to the request initiator. The response result can be in the form of text, voice, virtual scene feedback, etc. At the same time, the response result is also stored in the cache area of ​​the corresponding context container for subsequent extraction of candidate state update items and memory splitting and writing.

[0050] This embodiment ensures that the interactions of different roles are executed in isolation within their respective containers by accurately mapping permission configuration files to context containers. Furthermore, it strictly limits the scope of operations through full permission verification within the containers, effectively preventing permission overreach. This not only protects the privacy of the owner's exclusive information but also meets the normal interaction needs of visitors, thereby improving interaction security and user experience.

[0051] In one embodiment, after step S204, the method further includes: Extract candidate state update items generated during the interaction process from the interaction request and the agent's response result; Obtain the update source, impact range, and conflict level with the existing state of the candidate state update item; Based on the update source, the scope of impact, and the level of conflict with the existing state, the candidate state update items are controlled to be written in a distributed manner according to a preset merging strategy.

[0052] In this embodiment, candidate state update items refer to various elements generated during the interaction process that may affect the agent's behavior, memory, or state. It is understood that not all interactions will generate candidate state update items; they will only be generated when the interaction involves changes in the agent's state or updates to its memory.

[0053] After the interaction is completed, by analyzing the input content of the interaction request, the user's operation intention, and the response results generated by the agent, elements that can affect the agent's behavior or memory are identified and represented in an engineered manner as candidate state update items. The specific candidate state update items mainly include the following three categories: State vector update term: Reflects the numerical update of the agent's current preferences, behavior probabilities, or emotion vectors. For example, after a friend chats with the agent for a long time, the agent's chat tone preference changes, and candidate state update terms for "chat tone preference vector update" are extracted. Parameter set update items: These include set modifications to personality parameters, growth parameters, and relationship binding parameters. For example, after the owner modifies the agent's growth parameters, candidate state update items for "growth parameter set update" are extracted. Memory index update item: Used to locate knowledge entries or event tags in long-term or temporary memory that need to be updated. For example, after an agent learns new common knowledge, it generates a candidate state update item for "common memory index update".

[0054] Because the interaction involves multiple users, the correctness and consistency of candidate state updates generated after the interaction cannot be guaranteed. Directly writing these updates into the target agent's long-term memory could lead to behavioral deviations, making it difficult to ensure personality consistency and growth continuity. Therefore, to achieve reasonable distribution of candidate state update writing, the core attributes of the update items are first identified, including the update source, scope of impact, and conflict level. The appropriate processing method is then determined based on these core attributes. Specifically, the update source of the candidate state update item is determined based on the source of the interaction request (owner, friend, or hardware event), the current session type, the context container, and the interaction scenario. The scope of impact is determined by analyzing the agent's memory module, role permissions, and virtual world state that the update may affect. Conflict detection between the candidate update item and the existing state is performed using version number, timestamp, variable granularity lock, and event sequence number, generating conflict level indicators, etc.

[0055] Finally, based on the update source, scope of impact, and conflict level with the current state, candidate state update items are distributed and written according to a preset merging strategy. This preset merging strategy is a set of rules used to standardize the processing of candidate state update items, thereby avoiding state conflicts and preventing visitor interactions from polluting the owner's long-term memory. In specific implementation, the processing method and writing area of ​​the update item are determined by matching the preset merging strategy according to the combination of update source, scope of impact, and conflict level, and then written to different storage areas (long-term memory area, temporary memory area, pending review area, and audit log area) to ensure the controllability of state updates.

[0056] This embodiment extracts and classifies the state updates generated during the interaction process in a unified manner, and combines a preset merging strategy to achieve reasonable distribution of state update items, avoid state conflicts, prevent visitor interactions from polluting the owner's long-term memory, ensure the controllability and consistency of the agent's state updates, and guarantee the stability of the agent's growth trajectory.

[0057] In one embodiment, the step of controlling the splitting of writes of the candidate state update items according to a preset merging strategy based on the update source, the scope of impact, and the level of conflict with the existing state includes: Based on the update source, impact range, and conflict level, and in conjunction with the preset merging strategy, the target merging method and target writing area of ​​the candidate state update item are determined. The candidate state update items are merged according to the target merging method described above. The candidate status update items that have completed the merging process will be written into the long-term memory area, temporary memory area, pending review area, and / or audit log area according to the target writing area.

[0058] In this embodiment, the preset merging strategy includes multiple merging methods and write areas. Each merging method and write area corresponds to different update item attributes. Therefore, based on the data of the candidate status update item, namely the update source, impact range and conflict level, the corresponding target merging method and target write area are determined after matching with the preset merging strategy. The target merging method determines which method the update item will be merged, including automatic merging, conditional merging, post-approval merging, rejection / delayed merging, etc. The target write area determines which storage area the update item will ultimately be stored in, including long-term memory area, temporary memory area, pending approval area and audit log area, etc.

[0059] The candidate state update items are merged according to the target merging method. The merging process differs depending on the target merging method. Specifically: If the target merging method is automatic merging, a whitelist merging strategy based on variable categories can be adopted. In this case, only specific variable or parameter categories are allowed to be automatically merged, while other variables are temporarily suspended. The server does not need manual intervention and directly merges the candidate state update items with the existing state of the intelligent agent to update the specific variable or parameter categories of the intelligent agent. If the target merging method is conditional merging, a conditional merging strategy based on confidence threshold can be adopted. Based on the event or update confidence calculated by the model, updates exceeding the threshold are automatically merged, while those below the threshold are transferred to the review area for review. If the target merging method is merging after approval, a merging strategy based on the owner's confirmation instruction can be adopted. Candidate status update items are stored in the pending approval area, and an approval prompt is sent to the owner's user terminal. After the owner views the details of the update item, an instruction to confirm merging or reject merging is issued, and the merging or rejection operation is executed according to the instruction. For example, all sensitive or core parameter updates must wait for the owner's explicit instruction before they can be merged. If the target merging method is rejection / delayed merging, a rejection merging strategy based on conflict detection results can be adopted. If an update item that conflicts with the existing state is detected, it will be automatically rejected or delayed to prevent state pollution.

[0060] After the merging process is completed, the updated items are stored in the corresponding areas according to the target writing area, namely the long-term memory area, temporary memory area, pending review area, and / or audit log area. Each area has its own function and purpose. The long-term memory area stores state update items authorized by the owner that can affect the behavior of the agent for a long time; the temporary memory area stores state update items generated by visitor sessions and short-term interactions; the pending review area stores state update items that require owner confirmation and will only be transferred to the long-term memory area or temporary memory after the owner confirms the merging; the audit log area stores the details of all candidate state update items for subsequent auditing and traceability.

[0061] This embodiment achieves standardized and refined management of update items by clarifying the merging method and writing area of ​​candidate status update items with different attributes. Through differentiated processing such as automatic merging and post-approval merging, it takes into account both interaction efficiency and status security. Furthermore, it splits the writing to different storage areas, which not only ensures the long-term stability of the master core settings, but also achieves reasonable control of temporary interaction data, while providing a basis for subsequent auditing and traceability.

[0062] In one embodiment, the method further includes: When a change in a sensitive state variable is detected, the version before and after the change is recorded, and a unique change identifier and audit log are generated. If a rollback instruction is received, the sensitive state variables will be restored to the specified version based on the recorded version information.

[0063] In this embodiment, sensitive state variables refer to state variables that play a decisive role in the core behavior, growth trajectory, and security status of the intelligent agent. These include at least one of the following: core personality settings, growth parameter set, relationship binding parameters, virtual world asset parameters, and security policy parameters. Since changes to these variables may lead to problems such as behavioral deviations and asset losses, strict version recording and auditing are required.

[0064] Specifically, all candidate state update items are monitored in real time to determine whether changes to sensitive state variables are involved. If a change to a sensitive state variable is detected, a unique change identifier is generated for the change, and the version information before and after the change is recorded, including parameter values ​​and state vectors before and after the change, forming a version snapshot, which is saved to the version database. Simultaneously, an audit log is generated, recording detailed change information, including change identifier, change initiator identifier, change time, change type, scope of impact, change reason code, trigger source, etc., and then stored in the audit log area to ensure the traceability of the change process.

[0065] When the owner discovers that the agent's behavior deviates or does not meet expectations after a change in a sensitive state variable, a rollback command can be sent through the owner's user terminal. This rollback command contains a target version identifier or change identifier, specifying the historical version to be restored. Specifically, upon receiving the rollback command, the target version identifier or change identifier in the command is parsed, and the corresponding pre-change version information is retrieved from the version database. Subsequently, the current version of the sensitive state variable is replaced with the target version, and the agent's memory data and related caches are updated synchronously to ensure state consistency. After the rollback is completed, a rollback record is generated and stored in the audit log area, annotating information such as the rollback identifier, rollback time, and target version to ensure the traceability of the rollback process.

[0066] This embodiment records and audits all changes to the core sensitive state variables of the agent, ensuring that the change process is traceable, facilitating the investigation of abnormal changes, and enabling rapid restoration to the historical version through version rollback when abnormal changes to sensitive variables occur, thus avoiding problems such as agent behavior deviation and asset loss, and improving system robustness and user control over the agent's state.

[0067] In one embodiment, the method further includes: When multiple concurrent interaction requests to the target agent are received, conflict detection is performed based on the candidate state update items of the concurrent interaction requests; Based on the conflict detection results, the concurrent interaction requests are processed by serialization, priority processing, or delayed merging according to preset consistency rules.

[0068] In this embodiment, when multiple request initiators (owner, friend, hardware carrier) concurrently initiate interaction requests for the same target intelligent agent, multiple candidate state update items may be generated. If multiple update items modify the same state variable, state conflicts will occur, resulting in inconsistent states of the intelligent agent. Therefore, conflict detection is required.

[0069] Specifically, when multiple concurrent interaction requests are detected, candidate status update items corresponding to each request are extracted. For each candidate status update item of a concurrent request, a version number, timestamp, and event sequence number are recorded, and comparisons are performed under variable granularity lock control. If multiple updates to the same sensitive variable are found to be pending merging, the conflict level is calculated based on the timestamp and user role priority. For example, if two update items modify the same sensitive status variable to different values, and both are initiated by the owner, the conflict level is medium conflict; if two update items target the same sensitive status variable, but are initiated by the owner and a temporary visitor respectively, the conflict level is high conflict, and so on.

[0070] Based on the conflict detection results, concurrent interaction requests are processed according to preset consistency rules, including serialization, priority processing, or delayed merging. These preset consistency rules are a set of rules used to resolve concurrent conflicts and ensure the consistency of agent states. The appropriate processing method can be selected based on the conflict detection results to avoid conflicts. Serialization can be used for conflict-free or low-conflict concurrent requests, executing multiple concurrent requests sequentially according to their timestamps. Each request is executed before the next, ensuring orderly state updates. Priority processing can set priorities based on the role of the request initiator, such as owner, friend, temporary visitor, and hardware carrier from highest to lowest priority. Updates from high-priority requests are executed first, while updates from low-priority requests are rejected or delayed. Delayed merging stores updates from low-priority requests in a temporary cache. After high-priority requests are executed, conflicts are re-detected for low-priority updates. If the conflict is resolved, merging is performed; otherwise, merging is rejected.

[0071] For example, when the owner user is modifying the agent's virtual residence, and a friend user is simultaneously chatting with the agent and reporting an adventure event while binding hardware, different granularity concurrency control mechanisms are used for different variables: strong consistency serial writing is used for core personality settings; session isolation writing is used for visitor temporary memories; event serialization and asynchronous merging are used for world event streams; and a pending queue is used for owner-confirmed updates. If two updates hit the same sensitive variable, conflict resolution is performed based on owner priority, timestamp, and variable lock. If necessary, updates from the visitor source are rejected or hardware events are delayed.

[0072] This embodiment addresses concurrent interaction scenarios involving multiple users and multiple carriers. It accurately identifies state conflicts through conflict detection and employs differentiated processing methods based on preset consistency rules to effectively resolve the issue of inconsistent states caused by concurrent updates. Furthermore, through conflict resolution strategies such as priority processing and serialized execution, it prioritizes the effectiveness of owner interactions while reasonably handling interaction requests initiated by visitors and hardware, ensuring both concurrent interaction efficiency and agent state stability.

[0073] In one embodiment, the interaction requests triggered by the hardware carrier include at least a friend add request triggered by near-field contact, a real-world activity event reporting request triggered by shaking, and an adventure event reporting request triggered by displacement changes.

[0074] In this embodiment, the hardware carrier bound to the target intelligent agent is pre-registered on the server. Each hardware carrier is assigned a unique device identifier (such as a hardware serial number) and establishes a unique binding relationship with the target intelligent agent. The binding information is stored in the server's device binding database for subsequent identity verification. The hardware carrier has a built-in sensing module, including a near-field communication module (NFC), an inertial measurement unit (accelerometer, gyroscope), displacement sensors, etc., used to collect real-world scene data and trigger corresponding interaction requests.

[0075] Specifically, the friend add request is triggered by near-field contact. This occurs when two hardware devices complete contact authentication within a near-field range, generating a bidirectional or unidirectional friend candidate relationship, which is then written into the relationship graph after owner confirmation. For example, when two hardware devices bound to different agents enter the near-field communication range (e.g., within 10cm) and complete contact authentication, each device automatically sends a friend add request to its respective bound server. The request includes its own device identifier, the bound agent identifier, and contact authentication information. After verifying that both devices are legitimate and that the bound agents allow the friend relationship, the server generates a friend candidate event. This friend candidate event does not directly modify the target agent's core relationship graph. Instead, it enters the relationship candidate pool and is confirmed based on the owner's preset friend add mode (e.g., automatically accepting friends of the same level, requiring secondary owner confirmation, or only allowing whitelisted users to add). Only after confirmation is the friend candidate event written into the relationship graph, and the visible contact lists of the two agents in the virtual world are updated simultaneously.

[0076] The real-world activity event reporting request triggered by the shaking action is generated by collecting data such as acceleration and angular velocity through an inertial measurement unit (IMU). Based on this data, motion recognition is performed to identify real-world activities such as shaking, carrying, walking, and standing still. This automatically triggers a real-world activity event reporting request, which includes information such as activity type, activity duration, and confidence level. At this point, based on a pre-established mapping table from real-world events to virtual world event tags, the identified real-world activity type is mapped to a virtual world event tag (such as "short-term outing," "continuous movement," "staying at a new location," "interactive play," etc.), and corresponding candidate status update items are generated.

[0077] The exploration event reporting request triggered by displacement change is generated by collecting position change data through displacement sensors. When the displacement exceeds a preset threshold (e.g., 50 meters) and the duration exceeds a preset duration (e.g., 5 minutes), the exploration event reporting request is automatically triggered. The request carries displacement data, location information, activity trajectory, etc.

[0078] When a real-world event reporting request or an exploration event reporting request is triggered, context container routing and isolation are performed based on the bound user and device information. For example, after a real-world event is converted into a virtual world event tag, whether the tag is written into the long-term growth state is not determined directly by rules. Instead, candidate state update items are first formed, including event tag, confidence level, source role, scope of influence, and sensitive variable markers. Then, the update items are routed and written based on update item attributes such as event confidence level, whether it comes from trusted hardware, whether it conflicts with the current owner's session, whether it is in a visitor session, and whether it triggers sensitive variables. The data is then confirmed to be written into the temporary memory area, the pending review area, or the event stream. This incorporates real-world hardware input into a unified state governance framework, preventing forged events, duplicate events, or abnormal actions from directly polluting the agent's growth state.

[0079] It should be noted that there is no necessary order between the above steps. Those skilled in the art will understand from the description of the embodiments of the present invention that the above steps may have different execution orders in different embodiments, that is, they may be executed in parallel or in turn, etc.

[0080] Further reference Figure 3 As a response to the above Figure 2 The present invention provides an embodiment of an intelligent agent interaction device based on access control and context isolation, which implements the method shown. Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0081] like Figure 3 As shown, the intelligent agent interaction device 30 based on permission control and context isolation described in this embodiment includes: The request receiving module 301 is used to receive an interaction request to the target intelligent agent. The request initiator of the interaction request includes at least one of the following: the master user terminal, the friend user terminal, and the hardware carrier bound to the target intelligent agent. The identification and verification module 302 is used to perform identity recognition and relationship verification on the interaction request, and determine the identity type of the request initiator, the relationship type with the target intelligent agent, and the device trust status. The permission configuration module 303 is used to generate a corresponding permission configuration file based on the identity type, relationship type, device trust status and current interaction scenario of the request initiator. The context isolation execution module 304 is used to route the interaction request to the corresponding context container for execution according to the permission configuration file, and generate the corresponding intelligent agent response result; The context container includes at least a master context container and a guest context container, and the master context container and the guest context container are isolated from each other in terms of long-term memory write permissions.

[0082] The module referred to in this invention is a series of computer program instruction segments that can perform specific functions. It is more suitable than a program for describing the interactive execution process of intelligent agents facing multiple users. For specific implementation methods of each module, please refer to the corresponding method embodiments above, which will not be repeated here.

[0083] In one embodiment, the permission configuration module 303 includes: The rule matching unit is used to match the identity type, relationship type and device trust status of the request initiator with a preset permission rule set to determine the set of interactive capabilities that can be invoked and the memory range that can be accessed in the current interaction. The scope confirmation unit is used to determine the range of state variables that can be written and the range of virtual world operations that can be triggered in the current interaction scenario, based on the current interaction scenario. The encapsulation and generation unit is used to encapsulate the set of interactive capabilities, memory range, state variable range, and virtual world operation range to generate a permission configuration file corresponding to the current interaction request.

[0084] In one embodiment, the context isolation execution module 304 includes: The request routing unit is used to route the interaction request to the master context container or the visitor context container according to the role type corresponding to the permission configuration file. An interaction execution unit is used to perform interaction processing within the master context container or the visitor context container, according to the set of interaction capabilities, memory range, state variable range, and virtual world operation range defined in the permission configuration file. The response generation unit is used to generate corresponding agent response results based on the execution results within the master context container or the visitor context container.

[0085] In one embodiment, the device 30 further includes: The candidate update item extraction module is used to extract candidate state update items generated during the interaction process from the interaction request and the agent's response result. The information acquisition module is used to acquire the update source, impact range, and conflict level with the existing state of the candidate state update item; The split-write module is used to control the split-write of the candidate state update items according to the update source, the scope of influence, and the conflict level with the existing state, based on a preset merging strategy.

[0086] In one embodiment, the split-write module includes: The strategy confirmation unit is used to determine the target merging method and target writing area of ​​the candidate state update item based on the update source, impact range and conflict level, combined with a preset merging strategy. The merging unit is used to perform merging processing on the candidate state update items according to the target merging method; The split-write unit is used to write the candidate status update items that have completed the merging process into the long-term memory area, temporary memory area, pending review area and / or audit log area according to the target writing area.

[0087] In one embodiment, the device 30 further includes: The sensitive change logging module is used to record the version before and after the change and generate a unique change identifier and audit log when a change in a sensitive state variable is detected. The rollback module is used to restore the sensitive state variables to a specified version based on the recorded version information if a rollback command is received.

[0088] In one embodiment, the device 30 further includes: The conflict detection module is used to perform conflict detection based on the candidate state update items of the concurrent interaction requests when multiple concurrent interaction requests to the target intelligent agent are received. The conflict handling module is used to perform serialization, priority processing, or delayed merging processing on the concurrent interaction requests according to the conflict detection results and preset consistency rules.

[0089] In the above embodiments, this invention discloses an intelligent agent interaction device based on permission control and context isolation. It receives interaction requests to a target intelligent agent, where the request initiator includes at least one of a master user terminal, a friend user terminal, or a hardware carrier bound to the target intelligent agent. The device performs identity recognition and relationship verification on the interaction request to determine the identity type of the request initiator, the relationship type with the target intelligent agent, and the device's trust status. Based on the request initiator's identity type, relationship type, device trust status, and the current interaction scenario, a corresponding permission configuration file is generated. According to the permission configuration file, the interaction request is routed to the corresponding context container for execution, generating a corresponding intelligent agent response result. The context container includes at least a master context container and a visitor context container, and the master and visitor context containers are isolated from each other in terms of long-term memory write permissions. This invention achieves secure separation between visitor interaction and the master's training environment through multi-dimensional permission determination and context container isolation mechanisms, effectively preventing visitor operations from polluting the intelligent agent's long-term memory and improving the controllability of permissions, data security, and state consistency in multi-user intelligent agent interaction.

[0090] Specific limitations regarding the intelligent agent interaction device based on access control and context isolation can be found in the limitations of the intelligent agent interaction method based on access control and context isolation described above, and will not be repeated here. Each module in the aforementioned intelligent agent interaction device based on access control and context isolation can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0091] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0092] Another embodiment of the present invention provides a computer device, such as... Figure 4 As shown, the computer device 40 includes: One or more processors 401 and memory 402, Figure 4 The following section uses a processor 401 as an example. The processor 401 and the memory 402 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.

[0093] The processor 401 is used to perform various control logics of the computer device 40. It can be any conventional processor, microprocessor, state machine, general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), microcontroller, ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0094] The memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions corresponding to the intelligent agent interaction method based on access control and context isolation in the embodiments of the present invention. The processor 401 executes various functional applications and data processing of the computer device 40 by running the non-volatile software programs, instructions, and units stored in the memory 402, thereby implementing the intelligent agent interaction method based on access control and context isolation in the above method embodiments.

[0095] Another embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by one or more processors, perform the steps of the intelligent agent interaction method based on access control and context isolation in any of the above method embodiments.

[0096] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0097] Based on the above description of the embodiments, those skilled in the art will understand that the methods described in the embodiments can be implemented using software plus necessary general-purpose hardware platforms. Of course, they can also be implemented using hardware, but in many cases, the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a 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 device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0098] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The computer program can be stored in a non-volatile, computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The storage medium can be a memory, magnetic disk, floppy disk, flash memory, optical storage, etc.

[0099] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.

[0100] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for intelligent agent interaction based on access control and context isolation, characterized in that, include: Receive an interaction request to the target intelligent agent, wherein the initiator of the interaction request includes at least one of the following: the master user terminal, the friend user terminal, and the hardware carrier bound to the target intelligent agent; The interaction request is subjected to identity recognition and relationship verification to determine the identity type of the request initiator, the relationship type with the target intelligent agent, and the trust status of the device. Based on the identity type, relationship type, device trust status, and current interaction scenario of the request initiator, a corresponding permission configuration file is generated. According to the permission configuration file, the interaction request is routed to the corresponding context container for execution, and the corresponding agent response result is generated. The context container includes at least a master context container and a guest context container, and the master context container and the guest context container are isolated from each other in terms of long-term memory write permissions; The step of generating a corresponding permission configuration file based on the identity type, relationship type, device trust status, and current interaction scenario of the request initiator includes: Based on the identity type, relationship type, and device trust status of the request initiator, the system matches the system with a preset set of permission rules to determine the set of interactive capabilities that are allowed to be invoked and the scope of memory that are allowed to be accessed in the current interaction. Based on the current interaction scenario, determine the range of state variables that can be written and the range of virtual world operations that can be triggered in the current interaction; The set of interactive capabilities, memory range, state variable range, and virtual world operation range are encapsulated to generate a permission configuration file corresponding to the current interaction request.

2. The intelligent agent interaction method based on access control and context isolation according to claim 1, characterized in that, The step of routing the interaction request to the corresponding context container for execution according to the permission configuration file and generating the corresponding agent response result includes: Based on the role type corresponding to the permission configuration file, the interaction request is routed to the master context container or the visitor context container; Within the master context container or the visitor context container, interactive processing is performed according to the set of interactive capabilities, memory range, state variable range, and virtual world operation range defined in the permission configuration file. Based on the execution results within the master context container or the visitor context container, the corresponding agent response results are generated.

3. The intelligent agent interaction method based on access control and context isolation according to claim 1, characterized in that, After routing the interaction request to the corresponding context container for execution according to the permission configuration file and generating the corresponding agent response result, the method further includes: Extract candidate state update items generated during the interaction process from the interaction request and the agent's response result; Obtain the update source, impact range, and conflict level with the existing state of the candidate state update item; Based on the update source, the scope of impact, and the level of conflict with the existing state, the candidate state update items are controlled to be written in a distributed manner according to a preset merging strategy.

4. The intelligent agent interaction method based on access control and context isolation according to claim 3, characterized in that, The step of controlling the splitting and writing of candidate state update items according to the update source, scope of impact, and conflict level with the existing state, based on a preset merging strategy, includes: Based on the update source, impact range, and conflict level, and in conjunction with the preset merging strategy, the target merging method and target writing area of ​​the candidate state update item are determined. The candidate state update items are merged according to the target merging method described above. The candidate status update items that have completed the merging process will be written into the long-term memory area, temporary memory area, pending review area, and / or audit log area according to the target writing area.

5. The intelligent agent interaction method based on access control and context isolation according to claim 3, characterized in that, The method further includes: When a change in a sensitive state variable is detected, the version before and after the change is recorded, and a unique change identifier and audit log are generated. If a rollback instruction is received, the sensitive state variables will be restored to the specified version based on the recorded version information.

6. The intelligent agent interaction method based on access control and context isolation according to claim 3, characterized in that, The method further includes: When multiple concurrent interaction requests to the target agent are received, conflict detection is performed based on the candidate state update items of the concurrent interaction requests; Based on the conflict detection results, the concurrent interaction requests are processed by serialization, priority processing, or delayed merging according to preset consistency rules.

7. An apparatus employing the intelligent agent interaction method based on access control and context isolation as described in claim 1, characterized in that, include: The request receiving module is used to receive interaction requests to the target intelligent agent. The initiator of the interaction request includes at least one of the following: the master user terminal, the friend user terminal, and the hardware carrier bound to the target intelligent agent. The identification and verification module is used to perform identity recognition and relationship verification on the interaction request, and determine the identity type of the request initiator, the relationship type with the target intelligent agent, and the trust status of the device. The permission configuration module is used to generate a corresponding permission configuration file based on the identity type, relationship type, device trust status, and current interaction scenario of the request initiator. The context isolation execution module is used to route the interaction request to the corresponding context container for execution according to the permission configuration file, and generate the corresponding intelligent agent response result; The context container includes at least a master context container and a guest context container, and the master context container and the guest context container are isolated from each other in terms of long-term memory write permissions.

8. A computer device, characterized in that, Includes at least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the agent interaction method based on access control and context isolation as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the intelligent agent interaction method based on access control and context isolation as described in any one of claims 1-6.