Context management method and device for multiple agents

By constructing a hierarchical structure for the blackboard model and an active push mechanism, the problem of scattered context information storage in multi-agent clusters is solved, thereby improving the efficiency of agent collaboration.

CN122240350APending Publication Date: 2026-06-19INSPUR TIANYUAN COMM INFORMATION SYST CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
Filing Date
2026-01-27
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In the context information management process of multi-agent clusters in the existing technology, the point-to-point communication between agents leads to the scattered storage of context information, resulting in low efficiency of agent collaboration.

Method used

A blackboard model is constructed, including a data storage layer, a task collaboration layer, and an agent state layer. Agents with dependencies are identified by traversing the collaboration relationship graph through path traversal, and an active push mechanism is used to trigger data updates to ensure the accuracy and consistency of data writing.

🎯Benefits of technology

It achieves hierarchical and orderly management of context data, reduces communication latency and system overhead, and significantly improves the collaboration efficiency of multi-agent clusters in complex task environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240350A_ABST
    Figure CN122240350A_ABST
Patent Text Reader

Abstract

This invention provides a multi-agent context management method and apparatus. The method includes: responding to a context update request sent by a first agent, determining the context data to be updated in the context update request; based on the identifier of the first agent, determining the real-time state information of the first agent from the agent state layer of the blackboard model, and updating the context data to be updated in the data storage layer of the blackboard model if the real-time state information matches the write constraints of the context data to be updated; traversing the path of the collaboration relationship graph in the task collaboration layer, determining a second agent that has a dependency relationship with the first agent, and pushing a notification message containing the context data to be updated to the second agent. This achieves automatic task chain flow and real-time information synchronization, significantly reducing communication latency and system overhead, thereby significantly improving the collaboration efficiency of multi-agent clusters in complex task environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a multi-agent context management method and apparatus. Background Technology

[0002] In a multi-agent cluster, efficient collaboration among agents depends on the effective management and sharing of context information.

[0003] In existing technologies, context information management in multi-agent clusters is generally achieved through point-to-point communication between agents. However, point-to-point communication between agents leads to fragmented context information storage, resulting in low collaboration efficiency among agents. Summary of the Invention

[0004] This invention provides a multi-agent context management method and apparatus to address the shortcomings of existing technologies in the context information management process of multi-agent clusters, which are based on point-to-point communication between agents, resulting in scattered context information storage and thus low agent collaboration efficiency, thereby improving the collaboration efficiency between agents.

[0005] This invention provides a multi-agent context management method, comprising the following steps: In response to a context update request sent by the first agent, determine the context data to be updated in the context update request; Based on the identifier of the first agent, the real-time state information of the first agent is determined from the agent state layer of the blackboard model, and when it is determined that the real-time state information matches the writing constraint of the context data to be updated, the context data to be updated is updated in the data storage layer of the blackboard model; the blackboard model includes at least a data storage layer for storing context data, a task collaboration layer for storing dynamic collaboration data, and an agent state layer for storing agent attribute data. The collaboration relationship graph in the task collaboration layer is traversed to identify a second agent that has a dependency relationship with the first agent. A notification message containing the context data to be updated is pushed to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

[0006] According to a multi-agent context management method provided by the present invention, the step of traversing the collaboration relationship graph in the task collaboration layer to determine a second agent that has a dependency relationship with the first agent includes: The current task node where the context data to be updated is located is determined in the collaboration relationship graph; Traverse downstream along the directed connection edge of the current task node to determine the subsequent task node with the current task node as a prerequisite. From the subsequent task nodes, determine the second intelligent agent that has a dependency relationship with the first intelligent agent.

[0007] According to a multi-agent context management method provided by the present invention, the step of determining whether the real-time state information matches the write constraints of the context data to be updated includes: Based on the write constraints, determine the permission status information that allows updating the context data to be updated in the data storage layer; If the real-time status information matches the permission status information, it is determined that the real-time status information matches the write constraint condition of the context data to be updated.

[0008] According to a multi-agent context management method provided by the present invention, the step of pushing a notification message containing the context data to be updated to the second agent includes: Determine the data type of the context data to be updated; If the data type is the first type, the notification message will be pushed. If the data type is of the second type, the notification message is stored in the batch sending queue, and the sending operation of the notification message is performed according to the sending order of the batch sending queue.

[0009] According to a multi-agent context management method provided by the present invention, the data storage layer includes a first storage unit and a second storage unit; The first storage unit is built on a key-value storage database and is used to store data whose access frequency is greater than a preset access frequency threshold; The second storage unit is built on a relational database and is used to store data whose access frequency is less than or equal to a preset access frequency threshold.

[0010] According to a multi-agent context management method provided by the present invention, the blackboard model further includes a parameter configuration layer, wherein the parameter configuration layer records a read / write permission matrix containing read / write permission information for different agents, and after determining the context data to be updated in the context update request, the method further includes: Based on the identifier of the first agent, the operation permission for updating the context data to be updated is determined in the read / write permission matrix within the operation permissions of the first agent.

[0011] A multi-agent context management method provided by the present invention further includes: The third agent that subscribes to the context data to be updated is determined from the subscription list of the task collaboration layer, and the context data to be updated is sent to the third agent.

[0012] The present invention also provides a context management device for multiple agents, comprising the following modules: The request processing module is used to respond to the context update request sent by the first intelligent agent and determine the context data to be updated in the context update request; An update module is used to determine the real-time state information of the first agent from the agent state layer of the blackboard model based on the identifier of the first agent, and update the context data to be updated in the data storage layer of the blackboard model when it is determined that the real-time state information matches the writing constraint of the context data to be updated; the blackboard model includes at least a data storage layer for storing context data, a task collaboration layer for storing dynamic collaboration data, and an agent state layer for storing agent attribute data. The push module is used to traverse the collaboration relationship graph in the task collaboration layer, determine the second agent that has a dependency relationship with the first agent, and push a notification message containing the context data to be updated to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the context management method of the multi-agent described above.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multi-agent context management method as described above.

[0015] The multi-agent context management method and apparatus provided by this invention achieve hierarchical and orderly management of context data by constructing a blackboard model that includes a data storage layer, a task collaboration layer, and an agent state layer. When responding to update requests, the accuracy and consistency of data writing are ensured by combining real-time state verification with write constraints. Furthermore, the collaboration relationship graph in the task collaboration layer accurately locates second agents with dependencies and triggers associated operations using an active push mechanism. This enables automatic task chain flow and real-time information synchronization, significantly reducing communication latency and system overhead, thereby significantly improving the collaboration efficiency of multi-agent clusters in complex task environments. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art 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.

[0017] Figure 1 This is a flowchart illustrating the context management method for multiple agents provided by the present invention.

[0018] Figure 2 This is a schematic diagram of the structure of the multi-agent cluster management system provided by the present invention.

[0019] Figure 3 This is a schematic diagram of the intelligent agent implementation process provided by the present invention.

[0020] Figure 4 This is a schematic diagram of the multi-agent context management device provided by the present invention.

[0021] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

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

[0023] Figure 1 This is a flowchart illustrating the multi-agent context management method provided by the present invention, as shown below. Figure 1 As shown, the method includes the following: Step 110: In response to the context update request sent by the first agent, determine the context data to be updated in the context update request; Step 120: Based on the identifier of the first agent, determine the real-time state information of the first agent from the agent state layer of the blackboard model, and update the context data to be updated in the data storage layer of the blackboard model if the real-time state information matches the writing constraint of the context data to be updated; the blackboard model includes at least a data storage layer for storing context data, a task collaboration layer for storing dynamic collaboration data, and an agent state layer for storing agent attribute data. Step 130: Traverse the path of the collaboration relationship graph in the task collaboration layer to determine the second agent that has a dependency relationship with the first agent, and push a notification message containing the context data to be updated to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

[0024] The multi-agent context management method provided by this invention can be a management system deployed in a multi-agent cluster, specifically as follows: Figure 2 The structural diagram of the multi-agent cluster management system provided by this invention is shown. The multi-agent cluster is built upon multiple agents. The management system specifically includes a storage layer, a management layer, an interface layer, and an application layer.

[0025] Storage layer: Implemented based on the blackboard model, it undertakes data storage management tasks. The storage layer also includes in-memory databases and relational databases.

[0026] Management layer: Integrates functional modules such as data update, consistency maintenance, subscription management, and expired data cleanup. It improves system efficiency by processing tasks in parallel through multi-threading or asynchronous task mechanisms, such as simultaneously responding to update requests from multiple agents.

[0027] Interface Layer: Provides a unified API interface service. Supports communication protocols such as RESTful and RPC (e.g., gRPC) to meet the diverse access needs of intelligent agents. It is also compatible with message queues such as Kafka to achieve asynchronous communication and reduce system coupling.

[0028] Application layer: Deploys the various agents in the multi-agent cluster. They interact through the interface layer to complete the storage, update, read, write and subscription operations of context information, and realize cooperation based on shared information.

[0029] Based on the above system architecture, the processes that an intelligent agent can implement are as follows: Figure 3 The schematic diagram of the intelligent agent implementation process provided by this invention is shown.

[0030] First, determine the operation type of the first intelligent agent's request. The operation type can be reading information, writing information, or updating information.

[0031] For the information reading process: the agent initiates a request, the interface layer receives it, the management layer queries the blackboard model, retrieves the corresponding data from the storage layer where the blackboard model is deployed, and finally returns the information to the first agent that made the request through the interface layer.

[0032] For the process of writing or updating information: After the interface layer receives the request, the management layer first performs permission verification. If the verification fails: an error message is directly returned to the first agent. If the verification succeeds: the system first updates the corresponding data stored in the blackboard model, and then triggers the subscription notification mechanism to actively push messages to agents that have subscribed to the relevant content, completing the information synchronization.

[0033] In a multi-agent cluster, contextual data refers to the dynamic information that agents need to share for effective collaboration and interaction. Specifically, this can include the state of objects in the environment, interaction information, availability of shared resources, the state of each agent, task allocation and progress, etc. Efficient and reliable management of this contextual data is key to achieving efficient collaboration.

[0034] Specifically, the pre-built blackboard model adopts a hierarchical data structure, logically divided into at least: Data storage layer: As the physical carrier of data, it is responsible for the persistent storage and efficient reading and writing of context data.

[0035] Task Collaboration Layer: Used to store and manage dynamic collaboration data related to tasks, such as task queues to be assigned, task execution status, and collaboration relationship graphs describing the dependencies between tasks and agents.

[0036] Agent state layer: Used to store the attribute data of each agent, such as the agent's unique identifier, type, capabilities, real-time location, load, and other agent attribute data.

[0037] In step 110, in response to the context update request sent by the first agent, the context data to be updated in the context update request is determined.

[0038] The first agent refers to the entity in a multi-agent cluster that initiates state changes or information writing operations, such as an autonomous mobile robot, a virtual service agent, or an automated monitoring unit. A context update request is data sent from the system's interface layer to the blackboard model when an agent perceives changes in the environment, task state, or its own state.

[0039] The context data to be updated may include: the agent's interaction information, location coordinates, remaining battery power, current task progress, environmental obstacle information, etc.

[0040] In step 120, based on the identifier of the first agent, the real-time state information of the first agent is determined from the agent state layer of the blackboard model, and if the real-time state information matches the write constraint of the context data to be updated, the context data to be updated is updated in the data storage layer of the blackboard model.

[0041] Upon receiving a request, the system first verifies the agent's permissions and status. Based on the first agent's identifier, the system queries the agent's current real-time status information (e.g., whether it is currently online, whether it is in a fault state, its current permission scope and level, etc.) in the agent's status layer.

[0042] Write constraints are logical rules set in advance to maintain data consistency in the system. Modification of data in the blackboard model is only permitted when the agent's current state satisfies the write constraints.

[0043] Once verification is successful, meaning the real-time status information matches the write constraints, the system writes the context data to be updated to the data storage layer. The input write process can be implemented using a hybrid storage strategy, ensuring both efficiency and durability of data updates.

[0044] In step 130, the collaboration relationship graph in the task collaboration layer is traversed to determine the second agent that has a dependency relationship with the first agent, and a notification message containing the context data to be updated is pushed to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

[0045] It should be noted that the collaboration relationship graph is a type of dynamic collaboration data, which is pre-built and stored in the task collaboration layer of the blackboard model.

[0046] A collaboration graph is a data structure that describes the logical relationships between tasks and agents. A dependency relationship means that the execution of an agent's action depends on the data or state of another agent.

[0047] For example, task B (executed by the second agent) can only begin after task A (executed by the first agent) is completed. The system traverses the collaboration graph to identify the affected second agent.

[0048] Then, the system executes a proactive push update strategy. A notification mechanism is triggered, encapsulating the updated data into a notification message and sending it to the second agent. Upon receiving the message, the second agent performs the corresponding data update operation based on the message content (such as starting the next stage of the task, updating locally cached map data, etc.).

[0049] The multi-agent context management method provided by this invention achieves hierarchical and orderly management of context data by constructing a blackboard model that includes a data storage layer, a task collaboration layer, and an agent state layer. When responding to update requests, the accuracy and consistency of data writing are ensured by combining real-time state verification with write constraints. Furthermore, the collaboration relationship graph in the task collaboration layer accurately locates second agents with dependencies and triggers associated operations using an active push mechanism. This achieves automatic task chain flow and real-time information synchronization, significantly reducing communication latency and system overhead, thereby significantly improving the collaboration efficiency of multi-agent clusters in complex task environments.

[0050] In one embodiment, the step of traversing the collaboration graph in the task collaboration layer to determine a second agent that has a dependency relationship with the first agent includes: The current task node where the context data to be updated is located is determined in the collaboration relationship graph; Traverse downstream along the directed connection edge of the current task node to determine the subsequent task node with the current task node as a prerequisite. From the subsequent task nodes, determine the second intelligent agent that has a dependency relationship with the first intelligent agent.

[0051] The system determines the current task node where the context data to be updated resides in the collaboration relationship graph. For example, when the first agent updates the state of task T0A1, the system locates the node representing task T0A1 in the graph.

[0052] In a directed graph, downstream traversal refers to visiting the subsequent nodes of a node along the direction of an edge. For example, if there are edges from T0A1 to T0B1 and T0B2 in the graph, it means that T0B1 and T0B2 are both preconditions of the former. The downstream traversal algorithm then visits these two subsequent task nodes, T0B1 and T0B2.

[0053] The system identifies second agents that depend on the first agent from subsequent task nodes. Each task node is associated with information about the agent responsible for executing that task. After identifying subsequent task nodes (such as T0B1 and T0B2), the system can query the agents assigned to these tasks; these agents are the second agents that need to be notified.

[0054] In one embodiment, determining that the real-time status information matches the write constraints of the context data to be updated includes: Based on the write constraints, determine the permission status information that allows updating the context data to be updated in the data storage layer; If the real-time status information matches the permission status information, it is determined that the real-time status information matches the write constraint condition of the context data to be updated.

[0055] Based on write constraints, the permission status information required to allow data updates in the data storage layer is determined. This permission status information is parsed from predefined permission rules.

[0056] A match will be determined if the real-time state information matches the permitted state information. That is, the real-time state of the first agent obtained from the agent state layer will be compared with the permitted state information. A match is determined to be successful only when all conditions are met.

[0057] In one embodiment, pushing a notification message containing the context data to be updated to the second agent includes: Determine the data type of the context data to be updated; If the data type is the first type, the notification message will be pushed. If the data type is of the second type, the notification message is stored in the batch sending queue, and the sending operation of the notification message is performed according to the sending order of the batch sending queue.

[0058] Data can be pre-classified into different types, such as "critical alarms", "resource status", and "regular progress".

[0059] When the data type is Type 1, a notification message is pushed directly. Type 1 typically refers to critical information that requires immediate processing, such as task failure, severe resource shortages, or system malfunctions. For this type of information, the system selects the highest priority communication channel and immediately sends the message to the relevant secondary agent to ensure a timely response.

[0060] When the data type belongs to the second type, a different strategy is adopted. The second type typically refers to information that is not urgent and can tolerate a certain delay, such as periodic updates to task progress. In this case, the system will first store the notification message in a batch sending queue. The system can execute the sending operation of the queue according to a preset sending strategy (e.g., every 5 seconds, or when the number of messages in the queue reaches 20), merging multiple messages in the queue and sending them out all at once or in a concentrated period of time. Optionally, for the second type of notification, a differential notification method can also be used, that is, only the part of the data that has changed is sent, rather than the complete data, to further reduce the amount of data transmitted.

[0061] In one embodiment, the data storage layer includes a first storage unit and a second storage unit; The first storage unit is built on a key-value storage database and is used to store data whose access frequency is greater than a preset access frequency threshold; The second storage unit is built on a relational database and is used to store data whose access frequency is less than or equal to a preset access frequency threshold.

[0062] The first storage unit is built on a key-value store database. Key-value stores, such as Redis, typically operate in memory and have extremely high read and write speeds. They are used to store data accessed more frequently than a preset access frequency threshold; these can be called "hot data." For example, information that requires frequent reading and writing, such as the agent's real-time location and the status of current tasks, is suitable for storage in the first storage unit to ensure low-latency system response.

[0063] The second storage unit is built on a relational database. Relational databases, such as MySQL, provide data persistence capabilities and complex query functions. It is used to store data whose access frequency is less than or equal to a preset access frequency threshold, which can be called cold data. For example, historical records of completed tasks, system logs, and historical trajectories of agents. This data has a low access frequency but needs to be stored for a long time for querying and analysis, making it suitable for storage in the second storage unit.

[0064] The system can also include a data archiving mechanism that automatically migrates data to the second storage unit when the access frequency of a certain data in the first storage unit is consistently below a threshold for a period of time.

[0065] This hybrid storage architecture, which separates hot and cold data, achieves the best balance between system performance and storage cost by storing data with different access characteristics in the most suitable storage medium. It ensures the efficient operation of core collaborative processes while also guaranteeing the integrity and traceability of historical data, greatly improving the overall performance and economy of the system.

[0066] In one embodiment, the blackboard model further includes a parameter configuration layer, which records a read / write permission matrix containing read / write permission information for different agents. After determining the context data to be updated in the context update request, the model further includes: Based on the identifier of the first agent, the operation permission for updating the context data to be updated is determined in the read / write permission matrix within the operation permissions of the first agent.

[0067] The blackboard model can also include a parameter configuration layer. This layer stores the system's global configuration information, a key component of which is the read / write permission matrix. This matrix records the read / write permissions of different agents for different categories or specific item context data.

[0068] After determining the context data to be updated in the context update request, the system determines the operation permissions of the first agent based on the read / write permission matrix and checks whether it has write permissions to the context data to be updated. If the permission matrix shows that the agent does not have permission to modify the data, the system will directly reject the request and return an error message indicating insufficient permissions, thereby preventing subsequent state matching and data update processes.

[0069] In one embodiment, it also includes: The third agent that subscribes to the context data to be updated is determined from the subscription list of the task collaboration layer, and the context data to be updated is sent to the third agent.

[0070] From the subscription list maintained by the task collaboration layer, identify the third agent that has subscribed to the context data to be updated.

[0071] After identifying a third agent that subscribes to the context data to be updated, the system sends the context data to be updated to the third agent.

[0072] The context management device for multiple agents provided by the present invention is described below. The context management device for multiple agents described below can be referred to in correspondence with the context management method for multiple agents described above.

[0073] like Figure 4 As shown, the device includes: Request processing module 410 is used to determine the context data to be updated in the context update request in response to the context update request sent by the first intelligent agent; The update module 420 is used to determine the real-time state information of the first agent from the agent state layer of the blackboard model based on the identifier of the first agent, and update the context data to be updated in the data storage layer of the blackboard model when it is determined that the real-time state information matches the writing constraint of the context data to be updated; the blackboard model includes at least a data storage layer for storing context data, a task collaboration layer for storing dynamic collaboration data, and an agent state layer for storing agent attribute data. The push module 430 is used to traverse the collaboration relationship graph in the task collaboration layer, determine the second agent that has a dependency relationship with the first agent, and push a notification message containing the context data to be updated to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

[0074] The multi-agent context management device provided by this invention achieves hierarchical and orderly management of context data by constructing a blackboard model that includes a data storage layer, a task collaboration layer, and an agent state layer. When responding to update requests, the device combines real-time state verification with write constraints to ensure the accuracy and consistency of data writing. Furthermore, it accurately locates second agents with dependencies using the collaboration relationship graph in the task collaboration layer and triggers associated operations using an active push mechanism. This enables automatic task chain flow and real-time information synchronization, significantly reducing communication latency and system overhead, thereby significantly improving the collaboration efficiency of multi-agent clusters in complex task environments.

[0075] In one embodiment, the push module 430 is specifically used for: The step of traversing the collaboration graph in the task collaboration layer to determine the second agent that has a dependency relationship with the first agent includes: The current task node where the context data to be updated is located is determined in the collaboration relationship graph; Traverse downstream along the directed connection edge of the current task node to determine the subsequent task node with the current task node as a prerequisite. From the subsequent task nodes, determine the second intelligent agent that has a dependency relationship with the first intelligent agent.

[0076] In one embodiment, the update module 420 is specifically used for: The step of determining whether the real-time status information matches the write constraints of the context data to be updated includes: Based on the write constraints, determine the permission status information that allows updating the context data to be updated in the data storage layer; If the real-time status information matches the permission status information, it is determined that the real-time status information matches the write constraint condition of the context data to be updated.

[0077] In one embodiment, the push module 430 is further configured to: The step of pushing a notification message containing the context data to be updated to the second agent includes: Determine the data type of the context data to be updated; If the data type is the first type, the notification message will be pushed. If the data type is of the second type, the notification message is stored in the batch sending queue, and the sending operation of the notification message is performed according to the sending order of the batch sending queue.

[0078] In one embodiment, the update module 420 is further configured to: The data storage layer includes a first storage unit and a second storage unit; The first storage unit is built on a key-value storage database and is used to store data whose access frequency is greater than a preset access frequency threshold; The second storage unit is built on a relational database and is used to store data whose access frequency is less than or equal to a preset access frequency threshold.

[0079] In one embodiment, the update module 420 is further configured to: The blackboard model further includes a parameter configuration layer, which records a read / write permission matrix containing read / write permission information for different agents. After determining the context data to be updated in the context update request, the model further includes: Based on the identifier of the first agent, the operation permission for updating the context data to be updated is determined in the read / write permission matrix within the operation permissions of the first agent.

[0080] In one embodiment, the update module 420 is further configured to: The third agent that subscribes to the context data to be updated is determined from the subscription list of the task collaboration layer, and the context data to be updated is sent to the third agent.

[0081] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 can invoke logical instructions in the memory 530 to execute a multi-agent context management method, which includes: in response to a context update request sent by a first agent, determining the context data to be updated in the context update request; Based on the identifier of the first agent, the real-time state information of the first agent is determined from the agent state layer of the blackboard model, and when it is determined that the real-time state information matches the writing constraint of the context data to be updated, the context data to be updated is updated in the data storage layer of the blackboard model; the blackboard model includes at least a data storage layer for storing context data, a task collaboration layer for storing dynamic collaboration data, and an agent state layer for storing agent attribute data. The collaboration relationship graph in the task collaboration layer is traversed to identify a second agent that has a dependency relationship with the first agent. A notification message containing the context data to be updated is pushed to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

[0082] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0083] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, the computer program being executed by a processor, the computer being able to execute the multi-agent context management method provided by the above methods, the method including: in response to a context update request sent by a first agent, determining the context data to be updated in the context update request; Based on the identifier of the first agent, the real-time state information of the first agent is determined from the agent state layer of the blackboard model, and when it is determined that the real-time state information matches the writing constraint of the context data to be updated, the context data to be updated is updated in the data storage layer of the blackboard model; the blackboard model includes at least a data storage layer for storing context data, a task collaboration layer for storing dynamic collaboration data, and an agent state layer for storing agent attribute data. The collaboration relationship graph in the task collaboration layer is traversed to identify a second agent that has a dependency relationship with the first agent. A notification message containing the context data to be updated is pushed to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

[0084] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a multi-agent context management method provided by the above methods, the method comprising: in response to a context update request sent by a first agent, determining context data to be updated in the context update request; Based on the identifier of the first agent, the real-time state information of the first agent is determined from the agent state layer of the blackboard model, and when it is determined that the real-time state information matches the writing constraint of the context data to be updated, the context data to be updated is updated in the data storage layer of the blackboard model; the blackboard model includes at least a data storage layer for storing context data, a task collaboration layer for storing dynamic collaboration data, and an agent state layer for storing agent attribute data. The collaboration relationship graph in the task collaboration layer is traversed to identify a second agent that has a dependency relationship with the first agent. A notification message containing the context data to be updated is pushed to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

[0085] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0086] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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; and these 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.

Claims

1. A multi-agent context management method, characterized in that, include: In response to a context update request sent by the first agent, determine the context data to be updated in the context update request; Based on the identifier of the first agent, the real-time state information of the first agent is determined from the agent state layer of the blackboard model, and when it is determined that the real-time state information matches the writing constraint of the context data to be updated, the context data to be updated is updated in the data storage layer of the blackboard model; the blackboard model includes at least a data storage layer for storing context data, a task collaboration layer for storing dynamic collaboration data, and an agent state layer for storing agent attribute data. The collaboration relationship graph in the task collaboration layer is traversed to identify a second agent that has a dependency relationship with the first agent. A notification message containing the context data to be updated is pushed to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

2. The multi-agent context management method according to claim 1, characterized in that, The step of traversing the collaboration graph in the task collaboration layer to determine the second agent that has a dependency relationship with the first agent includes: Determine the current task node where the context data to be updated is located in the collaboration relationship graph; Traverse downstream along the directed connection edge of the current task node to determine the subsequent task node with the current task node as a prerequisite. From the subsequent task nodes, determine the second intelligent agent that has a dependency relationship with the first intelligent agent.

3. The multi-agent context management method according to claim 1, characterized in that, The step of determining whether the real-time status information matches the write constraints of the context data to be updated includes: Based on the write constraints, determine the permission status information that allows updating the context data to be updated in the data storage layer; If the real-time status information matches the permission status information, it is determined that the real-time status information matches the write constraint condition of the context data to be updated.

4. The multi-agent context management method according to claim 1, characterized in that, The step of pushing a notification message containing the context data to be updated to the second agent includes: Determine the data type of the context data to be updated; If the data type is the first type, the notification message will be pushed. If the data type is of the second type, the notification message is stored in the batch sending queue, and the sending operation of the notification message is performed according to the sending order of the batch sending queue.

5. The multi-agent context management method according to claim 1, characterized in that, The data storage layer includes a first storage unit and a second storage unit; The first storage unit is built on a key-value storage database and is used to store data whose access frequency is greater than a preset access frequency threshold; The second storage unit is built on a relational database and is used to store data whose access frequency is less than or equal to a preset access frequency threshold.

6. The multi-agent context management method according to claim 1, characterized in that, The blackboard model further includes a parameter configuration layer, which includes a read / write permission matrix recording read / write permission information for different agents. After determining the context data to be updated in the context update request, the model further includes: Based on the identifier of the first agent, the operation permission of the context data to be updated is updated in the operation permission determined by the read / write permission matrix for the first agent.

7. The multi-agent context management method according to claim 1, characterized in that, Also includes: The third agent that subscribes to the context data to be updated is determined from the subscription list of the task collaboration layer, and the context data to be updated is sent to the third agent.

8. A multi-agent context management device, characterized in that, include: The request processing module is used to respond to the context update request sent by the first intelligent agent and determine the context data to be updated in the context update request; An update module is used to determine the real-time state information of the first agent from the agent state layer of the blackboard model based on the identifier of the first agent, and update the context data to be updated in the data storage layer of the blackboard model when it is determined that the real-time state information matches the writing constraint of the context data to be updated; the blackboard model includes at least a data storage layer for storing context data, a task collaboration layer for storing dynamic collaboration data, and an agent state layer for storing agent attribute data. The push module is used to traverse the collaboration relationship graph in the task collaboration layer, determine the second agent that has a dependency relationship with the first agent, and push a notification message containing the context data to be updated to the second agent. The notification message is used to trigger the second agent to perform a data update operation associated with the context data to be updated.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the multi-agent context management method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multi-agent context management method as described in any one of claims 1 to 7.