Multi-agent scheduling control method and related equipment
By receiving scheduling rule information from the control unit in the multi-agent interaction system, creating and sending instantiation signals to the service unit, the orderly execution of tasks by multiple agent instances is ensured, solving the problem of chaotic scheduling in multi-agent collaborative work and realizing efficient business process execution.
Patent Information
- Application Number
- CN202410591955.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2025-11-14
AI Technical Summary
Existing multi-agent collaborative work solutions have a low scheduling success rate when executing complex business processes, affecting the consistency and accuracy of business processes, leading to scheduling chaos and reduced work efficiency.
The control unit in the multi-agent interaction system receives scheduling rule information, creates and sends instantiation signals to the service unit, ensuring that multiple agent instances execute tasks in an orderly manner and send task information in sequence to follow consistent standard operating procedures.
It improves the consistency and accuracy of business processes involving multi-agent collaboration, avoids scheduling chaos, and enhances overall work efficiency.
Smart Images

Figure CN120950192A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information technology, and in particular to a multi-agent scheduling and control method and related equipment. Background Technology
[0002] With the rapid development of artificial intelligence technology, large language models are widely used in various industries. Currently, large language models can include multiple agents that perform different data processing tasks. These agents work together to achieve the corresponding model functions. However, as the functions of the models become more complex, the number of data processing tasks and agents involved in the models increases, and the complexity of business processes involving multiple agents working together also rises significantly. Existing solutions such as AutoGen and CrewAI, which attempt to achieve collaborative work between multiple agents, mainly rely on the model's own reasoning ability and prompt word construction ability. They have low scheduling success rates when performing multi-agent scheduling and control to execute complex business processes, affecting the consistency and accuracy of business processes when multiple agents work together. This leads to multiple agents being unable to follow consistent standard operating procedures, easily causing scheduling chaos and reducing work efficiency. Summary of the Invention
[0003] This application provides a multi-agent scheduling and control method and related equipment, which can create and orderly send task information to multiple agent instances in multiple scheduling states based on the acquired scheduling rule information, so as to ensure the consistency and accuracy of business processes when multiple agents work together, thereby following consistent standard operating procedures, avoiding scheduling chaos, and improving work efficiency.
[0004] To achieve the above objectives, a first aspect of this application provides a multi-agent scheduling and control method, applied to a control unit in a multi-agent interaction system. The multi-agent interaction system further includes several service units communicatively connected to the control unit. The method includes: receiving scheduling rule information, the scheduling rule information including scheduling combinations of multiple agents in multiple scheduling states in the service units; sending an instantiation signal to the service units based on the scheduling rule information, so that the service units create multiple agent instances corresponding to the multiple scheduling combinations; and sequentially sending task information corresponding to the multiple scheduling states to the multiple agent instances, so that the multiple agent instances respectively execute tasks based on the task information.
[0005] To achieve the above objectives, a second aspect of this application provides a multi-agent interaction system, comprising: a control unit, and a plurality of service units communicatively connected to the control unit; the control unit is configured to receive scheduling rule information, the scheduling rule information including scheduling combinations of multiple agents in the service units under multiple scheduling states; send an instantiation signal to the service units based on the scheduling rule information, so that the service units create multiple agent instances corresponding to the multiple scheduling combinations; and sequentially send task information corresponding to the multiple scheduling states to the multiple agent instances, so that the multiple agent instances respectively execute tasks based on the task information.
[0006] To achieve the above objectives, a third aspect of the present application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the multi-agent scheduling and control method as described in any embodiment of the first aspect.
[0007] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing computer-executable instructions for performing the multi-agent scheduling and control method as described in any embodiment of the first aspect.
[0008] To achieve the above objectives, a fifth aspect of this application provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform a multi-agent scheduling and control method as described in any embodiment of the first aspect.
[0009] The multi-agent scheduling and control method and related equipment provided in this application embodiment can receive rule information containing scheduling combinations of multiple agents in different scheduling states through the control unit in the multi-agent interaction system. The rule information guides the agents on how to collaborate according to current business needs, enabling the control unit to send an instantiation signal to the service unit based on the received scheduling rule information. Upon receiving the signal, the service unit can create a number of agent instances corresponding to the scheduling rule information, with each agent instance used to execute a specific task or task combination. Furthermore, the control unit can sequentially send task information corresponding to each agent instance's scheduling state according to the scheduling rules, so that the agent instances can execute corresponding tasks based on this information. It is understood that this is achieved by obtaining the scheduling rules. Sending instantiation signals ensures that agent instances involved in the business process can be created in advance. During the process of sending task information corresponding to multiple scheduling states to multiple agent instances, the control unit can determine the current scheduling state from multiple scheduling states and determine the scheduling combination corresponding to the current scheduling state according to scheduling rules. This allows the control unit to send corresponding task information to several agents corresponding to that scheduling combination, enabling the multiple created agent instances to be scheduled sequentially under the scheduling order corresponding to multiple scheduling states. This allows for the orderly execution of related tasks, completing complex business processes for the corresponding model functions. The orderly sending of task information improves the consistency and accuracy of multi-agent collaborative work when handling multi-step tasks, ensuring that multiple agents can follow consistent standard operating procedures, avoiding scheduling conflicts and chaos among multiple agents, and effectively improving the overall work efficiency when multiple agents collaborate. Attached Figure Description
[0010] Figure 1 A flowchart of a multi-agent scheduling and control method provided in an embodiment of this application;
[0011] Figure 2 A flowchart illustrating the process of sending task information to multiple agent instances in a multi-agent scheduling and control method provided in an embodiment of this application;
[0012] Figure 3 A flowchart of another additional step after sending the first task information to the first instance in a multi-agent scheduling and control method provided in an embodiment of this application;
[0013] Figure 4 Another flowchart of the multi-agent scheduling and control method provided in an embodiment of this application, which sends task information to multiple agent instances;
[0014] Figure 5A flowchart illustrating the process of sending an instantiation signal to a service unit in a multi-agent scheduling and control method provided in an embodiment of this application;
[0015] Figure 6 A flowchart illustrating a multi-agent scheduling and control method provided in an embodiment of this application;
[0016] Figure 7 A flowchart illustrating the process of sending task information to multiple agent instances under normal flow in a multi-agent scheduling and control method provided in an embodiment of this application;
[0017] Figure 8 A flowchart illustrating the process of sending task information to multiple agent instances under abnormal flow conditions in a multi-agent scheduling and control method provided in an embodiment of this application.
[0018] Figure 9 Another flowchart illustrating the multi-agent scheduling and control method provided in an embodiment of this application, which sends task information to multiple agent instances;
[0019] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0021] In some embodiments, although functional modules are divided in the system diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the foregoing drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0022] Furthermore, unless otherwise explicitly specified and limited, the term "connection / linkage" should be interpreted broadly, for example, it can be a fixed connection or a movable connection, a detachable connection or a non-detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection or a connection that can communicate with each other; it can be a direct connection or an indirect connection through an intermediate medium.
[0023] In the description of the embodiments in this application, the terms "one embodiment / implementation," "another embodiment / implementation," or "some embodiments / implementations," "in the above embodiments / implementations," etc., refer to specific features, structures, materials, or characteristics described in conjunction with embodiments or examples that are included in at least two embodiments or implementations disclosed in this application. In this application disclosure, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or implementation. It should be noted that although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the flowcharts.
[0024] With the rapid development of artificial intelligence technology, large language models are widely used in various industries. Currently, large language models can include multiple agents that perform different data processing tasks. These agents work together to achieve the corresponding model functions. However, as the functions of the models become more complex, the number of data processing tasks and agents involved in the models increases, and the complexity of business processes involving multiple agents working together also rises significantly. Existing solutions such as AutoGen and CrewAI, which attempt to achieve collaborative work between multiple agents, mainly rely on the model's own reasoning ability and prompt word construction ability. They have low scheduling success rates when performing multi-agent scheduling and control to execute complex business processes, affecting the consistency and accuracy of business processes when multiple agents work together. This leads to multiple agents being unable to follow consistent standard operating procedures, easily causing scheduling chaos and reducing work efficiency.
[0025] Based on this, this application provides a multi-agent scheduling and control method and related equipment. The method is applied to a control unit in a multi-agent interaction system. The multi-agent interaction system also includes several service units communicatively connected to the control unit. The method includes: receiving scheduling rule information, which includes scheduling combinations of multiple agents in multiple scheduling states in the service units; sending an instantiation signal to the service units based on the scheduling rule information, so that the service units create multiple agent instances corresponding to multiple scheduling combinations; and sequentially sending task information corresponding to multiple scheduling states to the multiple agent instances, so that the multiple agent instances execute tasks based on the task information respectively. This application can ensure the consistency and accuracy of business processes when multiple agents work collaboratively, thereby enabling them to follow consistent standard operating procedures, avoid scheduling chaos, and improve work efficiency.
[0026] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0027] refer to Figure 1 , Figure 1A flowchart of a multi-agent scheduling and control method provided in one embodiment of this application; in some embodiments, this application discloses a multi-agent scheduling and control method applied to a control unit in a multi-agent interaction system. The multi-agent interaction system further includes several service units communicatively connected to the control unit. The method includes, but is not limited to, the following steps:
[0028] Step S110: Receive scheduling rule information, which includes scheduling combinations of multiple agents in the service unit under multiple scheduling states;
[0029] Step S120: Based on the scheduling rule information, an instantiation signal is sent to the service unit so that the service unit can create multiple agent instances corresponding to multiple scheduling combinations;
[0030] Step S130: Send task information corresponding to multiple scheduling states to multiple agent instances in sequence, so that the multiple agent instances can execute tasks based on the task information respectively.
[0031] Among them, the multi-agent interaction system is a system composed of multiple agents. These agents can interact and cooperate to perform tasks and complete highly complex business processes corresponding to the model functions. For example, when the model is a large language model, when a user inputs a text question at the front end of the multi-agent interaction system, the system will determine the multiple agents corresponding to handle the user's text question through the above steps S110 to S130, and create and orderly send task information to multiple agent instances in multiple scheduling states based on the obtained scheduling rule information, so as to execute the various task steps corresponding to the model processing business process and realize the model function of outputting text question-related content.
[0032] In some embodiments, the control unit is the core component of the multi-agent interaction system, responsible for receiving scheduling rule information and sending instantiation signals and task information to the service units. It controls the scheduling process of the entire system. The service units communicate with the control unit and are responsible for creating agent instances based on the instantiation signals sent by the control unit. Multiple service units can be designed to support tasks in different domains, such as data analysis, natural language processing, and image recognition. That is, the service units can be specialized according to the role played by the agent in the system, such as assistant, expert, coordinator, etc., or they can be differentiated according to the resources and capabilities they can access, such as service units connected to a specific database or service units with better computing power. By creating multiple agent instances corresponding to multiple scheduling combinations through multiple service units, the multi-agent interaction system can respond to user requests more flexibly and efficiently, handle complex business processes, and provide high-quality services. It can be understood that the control unit plays a coordinating role in the whole process, ensuring that the various service units and agent instances can work together to achieve the best system performance.
[0033] Among them, an agent instance is an entity created in the service unit according to the instantiation signal of the control unit, which is used to execute a specific task or a combination of tasks. The scheduling rule information contains the rules on how multiple agents should cooperate in different scheduling states, which are used to guide agents to work together according to business needs. The scheduling state represents the specific state that an agent can be in during the scheduling of agents to execute tasks, which is used to determine the combination of several agent instances that should be activated to execute the current task step. This combination is the aforementioned scheduling combination.
[0034] Understandably, to avoid confusion and improve work efficiency, it is necessary to ensure that multiple agents follow consistent standard operating procedures when performing multi-step, cross-domain tasks. Therefore, this application proposes a scheduling state management mode based on the above steps S110 to S130. The control unit in the multi-agent interaction system can receive rule information containing scheduling combinations of multiple agents in different scheduling states. The rule information is used to guide agents on how to collaborate according to current business needs. The control unit can send an instantiation signal to the service unit based on the received scheduling rule information. When the service unit receives the signal, it can create a number of agent instances corresponding to the scheduling rule information according to the instantiation signal. Multiple agent instances are used to execute specific tasks or task combinations. Furthermore, the control unit can send task information corresponding to their respective scheduling states to each agent instance in sequence according to the scheduling rules. The task information includes specific instructions or data corresponding to the agent's scheduling state, which is used to guide the agent instance to execute specific task steps. After receiving the task information, the agent instance can execute the corresponding task according to this information. This scheduling state management mode aims to ensure the stability and traceability of the entire business process of multi-agent coordinated work by guiding agents to switch states and transmit information in an orderly manner.
[0035] In some embodiments, by acquiring scheduling rules and sending instantiation signals, this application can ensure that the agent instances involved in the business process can be created in advance. Furthermore, during the process of sending task information corresponding to multiple scheduling states to multiple agent instances, the control unit can determine the current scheduling state from among the multiple scheduling states and determine the scheduling combination corresponding to the current scheduling state according to the scheduling rules. This allows the control unit to send corresponding task information to several agents corresponding to the scheduling combination, thereby enabling the multiple created agent instances to be scheduled sequentially under the scheduling order corresponding to multiple scheduling states, thus executing related tasks in an orderly manner and completing the complex business process of the corresponding model function. The orderly sending of task information improves the consistency and accuracy of multi-agent collaborative work when handling multi-step tasks, ensuring that multiple agents can follow consistent standard operating procedures, avoiding scheduling conflicts and chaos among multiple agents, and effectively improving the overall work efficiency when multiple agents collaborate.
[0036] In some embodiments, multiple agent instances corresponding to multiple scheduling combinations in a multi-agent interaction system correspond to different task steps. Each agent instance under a scheduling combination is designed to execute a specific task or task combination. Therefore, multiple agents can be combined and divided based on task type and processing stage. Task type refers to the different agent instances being designed to execute different types of tasks, such as data analysis, decision support, information retrieval, and content generation. Processing stage refers to the specific stage or link each agent instance can be responsible for in a multi-step business process. Furthermore, multiple agents can also be combined and divided based on characteristics such as professional domain and user needs to form scheduling combinations of multiple agents in multiple scheduling states. The professional domain refers to the partial intelligent... Agent instances can focus on specific knowledge domains or professional fields, such as medical consultation, legal services, and technology development. User needs mean that some agent instances can be customized according to different user requirements to meet the personalized services of specific users. It is conceivable that by pre-creating several agent instances in scheduling combinations corresponding to different scheduling states, a multi-agent interaction system can determine the scheduling state corresponding to the current step in the execution of a multi-step business process, send task information to several agent instances in the corresponding scheduling combination, and activate the corresponding agent instances accurately and efficiently based on the state process. This can seamlessly connect the workflows of multiple agent instances, ensuring that the entire business process can be executed accurately and without errors, achieving efficient task allocation and scheduling, thereby improving the efficiency of the entire system and the user experience.
[0037] In some embodiments, the method further includes: responding to state termination information fed back by the agent instances, sending a deletion signal to the service unit, so that the service unit deletes multiple agent instances. It is understood that in a multi-agent interaction system, adopting a process of creating and then deleting instances, rather than directly calling previously existing agent instances, can more effectively utilize computing resources. When a task is completed, deleting instances can release occupied resources and avoid resource waste. Simultaneously, since multiple service units may have the same agent instances depending on task requirements, to avoid mutual interference between different tasks, creating independent agent instances for each task or task combination can provide more efficient processing. Good isolation; furthermore, this application can create agent instances based on task scheduling requests after receiving them from service units, or create agent instances periodically, to ensure the timeliness of agent instances in the system for the current task. That is, the scheduling rules and task requirements in a multi-agent interaction system can change according to user input. Directly calling previously existing agent instances may not be timely for the current task. Therefore, this application creates new agent instances each time to reflect the latest scheduling rules and task requirements in a timely and effective manner, thereby improving the accuracy of business processes and increasing work efficiency when multiple agents work together.
[0038] In some embodiments, the multi-agent interaction system further includes an interaction unit communicatively connected to the control unit, receiving scheduling rule information, including: receiving scheduling rule information sent by the interaction unit, wherein the scheduling rule information is generated by the interaction unit based on the user's first input information, that is, the system receives the user's input information through the interaction unit, and then generates scheduling rule information based on these input information; the control unit receives these scheduling rule information, preparing it for subsequent agent instantiation and task scheduling; the control unit sends an instantiation signal to the service unit according to the received scheduling rule information, and the service unit creates the corresponding agent instance accordingly. It can be understood that this application receives user input information through the interaction unit and generates corresponding scheduling rule information, enabling the system to respond more directly to user needs, generate scheduling rules based on user input, effectively simplify the configuration process for non-developers, and ensure that multiple agents can follow the state management pattern when performing multi-step tasks, thereby improving the stability of the entire collaborative process.
[0039] In some embodiments, the multi-agent interaction system further includes an interaction unit communicatively connected to the control unit. The interaction unit is communicatively connected to several service units and sends an instantiation signal to the service units based on scheduling rule information. This includes: when receiving a task scheduling request sent by a service unit, sending an instantiation signal corresponding to the task scheduling request to the service unit based on the scheduling rule information. The task scheduling request is generated by the service unit according to the data processing task received from the interaction unit. The data processing task is generated by the interaction unit according to the user's second input information. It is understood that the service unit can periodically trigger the sending of the instantiation signal, or it can generate a task scheduling request based on the task after receiving a data processing task from the interaction unit. When the service unit receives a task scheduling request, the control unit can automatically send an instantiation signal based on the scheduling rule information. The service unit can generate a task scheduling request based on the received data processing task, enabling the system to flexibly handle various tasks.
[0040] In some embodiments, the scheduling rule information includes multiple scheduling combinations of the service unit under multiple application scenarios. Sending an instantiation signal corresponding to a task scheduling request to the service unit based on the scheduling rule information includes: determining the target application scenario based on the task scheduling request; and sending an instantiation signal corresponding to multiple scheduling combinations under the target application scenario to the service unit based on the scheduling rule information. The scheduling rule information includes scheduling combinations of the service unit under multiple application scenarios, enabling the system to optimize scheduling according to different application scenarios. By determining the target application scenario and sending the corresponding scheduling combination instantiation signal, the system can determine the corresponding intelligent scheduling combination according to the needs of different application scenarios, thereby more effectively allocating and utilizing resources and improving overall system performance.
[0041] refer to Figure 2 , Figure 2 In a multi-agent scheduling and control method provided in an embodiment of this application, a flowchart is included for sending task information to multiple agent instances. In some embodiments, the agent instances include a first instance in a first scheduling state and a second instance in a second scheduling state. The agent instances store a scheduling order, which includes switching from the first scheduling state to the second scheduling state and sequentially sending task information corresponding to multiple scheduling states to multiple agent instances, including but not limited to the following steps:
[0042] Step S210: When the initial state is the first scheduling state, send the first task information to the first instance;
[0043] Step S220: In response to the first state information fed back by the first instance based on the scheduling order, with the second scheduling state as the change target, the second task information corresponding to the first state information is sent to the second instance.
[0044] In some embodiments, steps S210 to S220 correspond to the process of sending task information to multiple agent instances under normal flow. Agent instances can perceive their own scheduling state through internal scheduling order information and receive and execute tasks according to this state. After an agent instance completes a task or changes its state, it will feed back status information to the control unit so that the control unit can understand the current execution state based on the feedback information of the agent instance, determine the next scheduling state, and dynamically send task information to other agent instances corresponding to the next scheduling state. It can be understood that the first status information takes the second scheduling state as the change target, that is, it represents that the corresponding next scheduling state is the second scheduling state. In this way, by sending the corresponding task information according to the current scheduling state of the agent instance, the agent instance can change its state based on the internally stored scheduling order and trigger the sending of task information of the next agent instance through feedback information, so as to ensure the orderliness and consistency of the collaborative work of agents in executing tasks.
[0045] In some embodiments, the scheduling order is preset and stored within the agent instance. The scheduling order within the agent instance can be viewed as a state machine model, which defines the transition rules between different states. The agent instance can change its state according to the internal scheduling order and guide the control unit to switch the corresponding scheduling state through feedback information. Specifically, when the agent instance receives task information and executes the corresponding task, it will feed back the corresponding state information to the control unit. The control unit determines the next scheduling state based on this information, and then allocates tasks to the corresponding agent instance according to the state information fed back by the agent instance and the predefined scheduling order, so as to achieve orderly switching of scheduling states. The scheduling order of the scheduling state switching can correspond to the step order of the business process, so that the system can ensure that the business process is executed according to the predetermined step order, thereby improving the logic and efficiency of business execution.
[0046] refer to Figure 3 , Figure 3 A flowchart of another additional step after sending the first task information to the first instance in the multi-agent scheduling and control method provided in one embodiment of this application; in some embodiments, the agent instance further includes a third instance in a third scheduling state, and the scheduling order further includes switching from the second scheduling state to the third scheduling state. After sending the first task information to the first instance, the method further includes, but is not limited to, the following steps:
[0047] Step S310: In response to the second status information fed back by the first instance with the third scheduling status as the target of change, send the third task information corresponding to the second status information to the third instance;
[0048] In step S320, in response to the third state information fed back by the third instance based on the scheduling order, which takes the second scheduling state as the change target, the fourth task information corresponding to the third state information is sent to the second instance.
[0049] In some embodiments, steps S310 to S320 correspond to the process of sending task information to multiple agent instances under abnormal flow. It can be understood that during the execution phase, if the first instance encounters an abnormal situation, it will report its status to the control unit as a second status information with the third scheduling status as the target. This is an unexpected status, indicating that the first instance cannot continue to execute its task. At this time, the control unit, according to the fixed scheduling rules, after receiving the second status information with the third scheduling status as the target, can decide to skip the steps that the second instance should handle and directly pass the task to the third instance. After the third instance receives the third task information, it will troubleshoot and handle the problem. Once the third instance successfully solves the problem, it will update its status to the second scheduling status and feed back the third status information with the second scheduling status as the target to the control unit. After receiving the third status information with the second scheduling status as the target, the control unit can adjust the flow logic and send a new task instruction to the second instance. After the second instance receives the task, executes the task, and returns the TERMINATE status signal, it can be determined that the task flow under abnormal flow has been successfully completed.
[0050] Steps S310 to S320 allow the system to perform effective exception handling according to predetermined scheduling rules when an anomaly is detected, instead of simply failing or stopping. Even when an anomaly occurs, the system can maintain the continuity of the process and solve the problem by skipping or rescheduling tasks. This allows the control unit to flexibly adjust the process logic to adapt to different anomaly situations, thereby enhancing the stability and robustness of the system.
[0051] refer to Figure 4 , Figure 4 In a multi-agent scheduling and control method provided in one embodiment of this application, another flowchart illustrates sending task information to multiple agent instances; in some embodiments, the agent instances further include a fourth instance in a first scheduling state, sequentially sending task information corresponding to multiple scheduling states to multiple agent instances, including but not limited to the following steps:
[0052] Step S410: When the initial state is the first scheduling state, send the first task information to the first instance and send the fifth task information to the fourth instance;
[0053] Step S420: In response to the fourth status information with the second scheduling state as the target of change, send the second task information to the second instance, wherein the fourth status information includes the first part of the status information fed back by the first instance based on the scheduling order, and the second part of the status information fed back by the fourth instance based on the scheduling order.
[0054] In some embodiments, steps S410 to S420 correspond to the process of sending task information to multiple agent instances. The system design allows multiple agent instances to execute tasks simultaneously, thereby improving processing speed and efficiency. It is conceivable that task scheduling is based on the state information of agent instances. After completing a task or changing its state, an agent instance will report its state information to the control unit. When making task scheduling decisions, the control unit can consider not only the feedback of a single agent instance, but also the state information of multiple agent instances to achieve collaborative work of multiple agent instances under the same scheduling combination. For example, by sending task information to two different instances in the first scheduling state, the system can achieve parallel processing of tasks, ensure the consistency of multiple agent instances under the same scheduling combination, avoid scheduling chaos, and improve work efficiency.
[0055] refer to Figure 5 , Figure 5 The flowchart of the multi-agent scheduling and control method provided in one embodiment of this application includes sending an instantiation signal to a service unit. In some embodiments, the first instance is an agent instance of a first service unit, and the second instance is an agent instance of a second service unit. The instantiation signal is sent to the service unit based on scheduling rule information so that the service unit can create multiple agent instances corresponding to multiple scheduling combinations, including but not limited to the following steps:
[0056] Step S510: Send a first instantiation signal to the first service unit based on the scheduling rule information, so that the first service unit creates the first instance;
[0057] Step S520: Send a second instantiation signal to the second service unit based on the scheduling rule information, so that the second service unit creates a second instance.
[0058] In some embodiments, steps S510 to S520 describe the process of creating agents within different service units. Before a task arrives, creating agent instances in different service units allows the system to assign the task to the most suitable agent based on its specific requirements. It is understood that different service units may have different computing capabilities, storage resources, or access permissions to specific databases. Creating agent instances in different service units enables the system to allocate and utilize resources more efficiently, thereby improving the efficiency and quality of task processing. Furthermore, steps S510 to S520 can also enable cross-microservice agent collaboration, further promoting the effective integration and optimized configuration of collaborative resources, enabling efficient collaboration in a wider range of business scenarios and improving adaptability.
[0059] It is understandable that, in the case where the first instance is an agent instance of the first service unit and the second instance is an agent instance of the second service unit corresponding to multiple service units, this application can create multiple instances across service units based on steps S510 to S520. Then, in subsequent steps, corresponding task information can be sent across service units through service addressing and remote call protocols to achieve cross-service unit collaboration. Multiple agents can communicate and cooperate under the service framework corresponding to different service units to deepen the collaboration depth between agents within the system and improve the overall collaborative work efficiency of the system.
[0060] refer to Figure 6 , Figure 6 This is a flowchart illustrating a multi-agent scheduling and control method provided in one embodiment of this application; in some embodiments, corresponding to Figure 6 This application includes the following steps:
[0061] ① Users can customize scheduling rules through the front-end page. Based on the agent resources stored in the database, they can independently construct agent scheduling combinations adapted to different states to meet the needs of specific work scenarios. After completing the orchestration, users can submit this scheduling rule information to the control unit for registration. The control unit not only has receiving and sending functions, but also accurately identifies the current state when it receives message status parameters, and accurately assigns tasks to the corresponding agents according to the user-defined rule system through the sending mechanism, such as... Figure 6 Agent1, Agent2, and Agent3.
[0062] ② In the scene matching and backend assistant invocation stage, the text question entered by the user on the front end will be accurately matched by the system to the corresponding backend service unit and its corresponding scene mode. The matched output scene will then be passed to the corresponding service unit, such as... Figure 6Service Unit A in Service Unit A and Service Unit B.
[0063] ③ After receiving the task retrieval request, the backend assistant will send a request to the control unit, which will then select the corresponding scheduling rule information based on the scenario template in the request.
[0064] ④ The control unit is responsible for creating all necessary agent instances according to the selected rule system. Even if an agent exists in other service units, the control unit can efficiently trigger the corresponding service unit to create the required agent instance through cross-service request mechanisms, such as service addressing discovery and remote call protocols, to achieve seamless collaborative work across microservices.
[0065] ⑤ During the task distribution and execution phase, the control unit accurately identifies the agent instance of the next task to be executed according to preset rules, and sends the task to the corresponding agent via a network request. The agent that receives the task will process the message and execute the task in its receiving method.
[0066] ⑥ After completing the task, the agent requests status information from the control unit via the network. Upon receiving the StateSet feedback, the control unit determines the next agent to be executed based on the rule system and issues corresponding instructions. In the special case involving composite states [StateSet1, StateSet2], the control unit will remain in a waiting state until Agent1 completes StateSet1 and Agent2 completes StateSet2, ensuring that both states meet the requirements of composite states, before switching to the execution of the next agent.
[0067] ⑦ The entire workflow will terminate after the last Agent completes its task, at which point the Agent will send a termination status TEMERATE to the control unit. Upon receiving this status signal, the control unit will clear all Agent instances under this rule system.
[0068] Through the above-described interaction steps of the standard operating procedure for large multi-agent models, this application can effectively ensure the consistency and accuracy of business processes when multiple agents work together, thereby enabling them to follow consistent standard operating procedures, avoid scheduling chaos, and improve work efficiency.
[0069] refer to Figure 7 , Figure 7 A flowchart illustrating the process of sending task information to multiple agent instances under normal circumstances in a multi-agent scheduling and control method provided in one embodiment of this application; in some embodiments, Figure 7This paper details the complete operation of the scheduling rule information flow interaction method based on a multi-agent normal process proposed in this application. During the interaction between the user and the system, the user defines a complete set of states for a specific business scenario through the state scheduling rule customization interface provided by the system, including stages such as INI T, StateSet2, StateSet3, and TERMINATE. For each state set, the user can select a suitable agent (such as Agent1, Agent2, Agent3, etc.) from the list of registered agents in the system and accurately associate it with the corresponding state set.
[0070] After the user completes the settings and saves them, the control unit will automatically generate a precise scheduling rule based on the received configuration data. This rule specifies in detail which Agent instance should be activated and invoked in different StateSet states, specifically: {INI T:Agent1,StateSet2:Agent2,StateSet3:Agent3,TERMINATE:stop}.
[0071] In actual operation, the system first waits for user input. Once the corresponding scenario and required service unit are identified, the service unit quickly sends a request to the control unit. Based on a pre-defined set of rules, the control unit ensures that all relevant Agent instances (such as Agent1, Agent2, and Agent3) are successfully created. Using the Agent instance information and efficient service addressing and remote invocation protocols, the system can accurately access the corresponding service unit, thus ensuring that each service unit can successfully create the required Agent instance.
[0072] In the initial stage of the process, the control unit sends task information to Agent1, which is in the INI T state, via a network request according to predetermined rules. After Agent1 completes its task, it sends a StateSet2 status change message to the control unit via a network request. Upon receiving this status information, the control unit immediately assigns the next designated Agent2 according to the rules and transmits the necessary processing information. Similarly, after completing its own work, Agent2 reports the updated StateSet3 status to the control unit.
[0073] As the process progresses, the control unit continues to follow the rule chain, sending new task instructions to Agent3, which is scheduled to work in StateSet3. When Agent3 successfully completes its duties and returns a TERMINATE status signal, the control unit confirms that the entire process has reached its termination point. Finally, upon receiving confirmation of the TERMINATE status, the control unit will, according to the predetermined cleanup logic, orderly shut down and delete all Agent instances involved in this round of the process, thereby ensuring that the entire intelligent agent collaborative workflow from initialization to termination is completed accurately and efficiently.
[0074] refer to Figure 8 , Figure 8 A flowchart illustrating the process of sending task information to multiple agent instances under abnormal flow conditions in a multi-agent scheduling and control method provided in one embodiment of this application; in some embodiments, Figure 8 The corresponding scheduling rule information exchange mechanism in the multi-agent exception process refers to... Figure 7 In a corresponding implementation, the control unit follows a fixed scheduling rule: {INIT:Agent1,StateSet2:Agent2,StateSet3:Agent3,TERMINATE:stop}. First, the control unit creates all relevant Agent instances according to the normal process. During execution, the control unit sends task instructions to Agent1, which is in the INIT state, via a network request according to predetermined rules. However, if an abnormal situation occurs during this process, causing Agent1 to be unable to complete the task or encounter an unsolvable problem, Agent1 will abnormally report its state as StateSet3 to the control unit via a network request, indicating that it cannot continue to execute in the original order.
[0075] Understandably, despite receiving this unexpected feedback, the control unit adhered to its scheduling responsibilities. Based on the received StateSet3 status information, the control unit, following its rules, decided to skip the steps that should have been handled by Agent2 and directly pass the task to Agent3 for troubleshooting and resolution. Once Agent3 successfully resolved the problem and completed the task, it would update the StateSet2 status back to the control unit.
[0076] After receiving the updated status information, the control unit flexibly adjusts the process logic and sends the new task instructions to Agent2, which should have been working in the StateSet2 state, via a network request. Upon receiving the task, Agent2 efficiently completes it according to its responsibilities and returns a TERMINATE status signal, indicating that the entire process has successfully reached the termination state. Finally, after confirming the process is complete, the control unit deletes all Agent instances involved in this round according to the security policy to ensure effective reclamation of system resources and prepare for possible normal or abnormal processing in the next round.
[0077] refer to Figure 9 , Figure 9 In a multi-agent scheduling and control method provided in one embodiment of this application, another flowchart illustrating the sending of task information to multiple agent instances is shown; in some embodiments, Figure 9 Corresponding to the scheduling rule information interaction mechanism in this application when handling multiple agents and complex sub-state sets, it is assumed that the scheduling rules of the control unit are more hierarchical: {INIT:[Agent1.1,Agent1.2],[StateSet2.1,StateSet2.2]:Agent2,StateSet3:Agent3,TERMINATE:stop}. Here, it is assumed that Agent1.1 and Agent1.2 come from service unit A, while Agent2 and Agent3 come from service unit B. First, the control unit is responsible for creating all associated Agent instances and ensuring that the state information of these instances can be broadcast to all members of the entire Agent network in real time. During the initialization phase, the control unit simultaneously sends task instructions to Agent1.1 and Agent1.2, which are in the INIT state, via network requests. It is worth noting that the difference in this task execution is that each Agent, after completing its own task, will individually return state information via network requests, collectively constructing a composite state set. Specifically, Agent1.1 will feed back the StateSet2.1 status information to the control unit after completing its task, while Agent1.2 will submit the StateSet2.2 status information after completing its task.
[0078] In essence, the control unit performs a judgment upon receiving any sub-state information. If the received state information is only a subset of the pre-defined state set, the control unit will remain in a waiting state until the complete sub-state set (e.g., [StateSet2.1, StateSet2.2]) is collected. Only when the complete sub-state set is collected will the control unit trigger a state transition and issue corresponding operation instructions to Agent2, which is designated to handle the next stage of the task. Subsequently, Agent2 will update to StateSet3 after completing its task and report this state change to the control unit. The control unit will then continue operating according to the established process, dispatching new task messages to Agent3. When Agent3 successfully fulfills its responsibilities and sends a TERMINATE signal, it signifies that the entire process has successfully reached its expected endpoint.
[0079] Furthermore, after confirming that the current process has completely ended, the control unit will send a deletion signal to the service unit in response to the status termination information fed back by the agent instance, based on the pre-set security policy. This will cause the service unit to delete multiple agent instances, thereby releasing and reclaiming resources from all involved Agent instances to ensure system stability and efficient resource utilization.
[0080] This application also provides a multi-agent interaction system, including: a control unit and several service units communicatively connected to the control unit; the control unit is used to receive scheduling rule information, the scheduling rule information including scheduling combinations of multiple agents in multiple scheduling states in the service units; send an instantiation signal to the service units based on the scheduling rule information, so that the service units create multiple agent instances corresponding to multiple scheduling combinations; and sequentially send task information corresponding to multiple scheduling states to the multiple agent instances, so that the multiple agent instances execute tasks based on the task information respectively. The multi-agent interaction system can be used to execute the multi-agent scheduling control method mentioned in any of the above embodiments, thereby achieving the effect of avoiding scheduling chaos and improving work efficiency, and therefore will not be elaborated further here.
[0081] Some embodiments of this application provide an electronic device. Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, with reference to... Figure 10 The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the multi-agent scheduling and control method of any of the above embodiments, for example, executing the above-described... Figure 1 Method steps S110 to S130, Figure 2 Method steps S210 to S220, Figure 3 Method steps S310 to S320, Figure 4 Method steps S410 to S420, Figure 5 Method steps S510 to S520.
[0082] The electronic device 1000 of this application embodiment includes one or more processors 1010 and memory 1020. Figure 10 The example uses a processor 1010 and a memory 1020.
[0083] The processor 1010 and the memory 1020 can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.
[0084] Memory 1020, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 1020 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 1020 may optionally include memory 1020 remotely located relative to processor 1010. These remote memories can be connected to electronic device 1000 via a network, and examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0085] In some embodiments, when the processor executes a computer program, it executes the multi-agent scheduling and control method of any of the above embodiments at preset intervals.
[0086] Those skilled in the art will understand that Figure 10 The device structure shown does not constitute a limitation on the electronic device 1000, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0087] exist Figure 10 In the electronic device 1000 shown, the processor 1010 can be used to call the multi-agent scheduling and control method stored in the memory 1020, thereby realizing the multi-agent scheduling and control method.
[0088] Based on the hardware structure of the above-mentioned electronic device 1000, various embodiments of the multi-agent interaction system of this application are proposed. Meanwhile, the non-transient software program and instructions required to implement the multi-agent scheduling and control method of the above embodiments are stored in the memory. When executed by the processor, the multi-agent scheduling and control method of the above embodiments is executed.
[0089] This application also provides a computer-readable storage medium storing computer-executable instructions for executing the multi-agent scheduling and control method described above. These instructions enable one or more processors to execute the multi-agent scheduling and control method described above, for example, to execute the method described above. Figure 1 Method steps S110 to S130, Figure 2 Method steps S210 to S220, Figure 3 Method steps S310 to S320, Figure 4 Method steps S410 to S420, Figure 5 Method steps S510 to S520.
[0090] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform a multi-agent scheduling and control method implementing any of the above embodiments, for example, performing the method described above. Figure 1 Method steps S110 to S130, Figure 2 Method steps S210 to S220, Figure 3 Method steps S310 to S320, Figure 4 Method steps S410 to S420, Figure 5 Method steps S510 to S520.
[0091] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network nodes. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0092] Those skilled in the art will understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer-readable storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer-readable storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0093] The above is a detailed description of the preferred embodiments of this application. However, this application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A multi-agent scheduling and control method, applied to a control unit in a multi-agent interaction system, wherein the multi-agent interaction system further includes a plurality of service units communicatively connected to the control unit, the method comprising: Receive scheduling rule information, the scheduling rule information including scheduling combinations of multiple agents in the service unit under multiple scheduling states; Based on the scheduling rule information, an instantiation signal is sent to the service unit so that the service unit can create multiple agent instances corresponding to multiple scheduling combinations. The task information corresponding to the scheduling states is sent sequentially to the intelligent agent instances, so that the intelligent agent instances execute tasks based on the task information respectively.
2. The multi-agent scheduling and control method according to claim 1, characterized in that, The agent instance includes a first instance in a first scheduling state and a second instance in a second scheduling state. The agent instance stores a scheduling order, which includes switching from the first scheduling state to the second scheduling state. The step of sequentially sending task information corresponding to multiple scheduling states to multiple agent instances includes: When the initial state is the first scheduling state, send the first task information to the first instance; In response to the first instance's feedback of first status information based on the scheduling order, with the second scheduling status as the target for change, the second task information corresponding to the first status information is sent to the second instance.
3. The multi-agent scheduling and control method according to claim 2, characterized in that, The agent instance further includes a third instance in a third scheduling state, the scheduling order further includes switching from the second scheduling state to the third scheduling state, and after sending the first task information to the first instance, the method further includes: In response to the second status information fed back by the first instance, which takes the third scheduling status as the target of change, the third task information corresponding to the second status information is sent to the third instance; In response to the third instance sending third status information based on the scheduling order, with the second scheduling state as the target for change, the third instance sends fourth task information corresponding to the third status information to the second instance.
4. The multi-agent scheduling and control method according to claim 2, characterized in that, The agent instance further includes a fourth instance of the first scheduling state, and the step of sequentially sending task information corresponding to multiple scheduling states to multiple agent instances includes: When the initial state is the first scheduling state, send the first task information to the first instance and send the fifth task information to the fourth instance; In response to fourth status information with the second scheduling state as the target of change, second task information is sent to the second instance, wherein the fourth status information includes a first part of status information fed back by the first instance based on the scheduling order, and a second part of status information fed back by the fourth instance based on the scheduling order.
5. The multi-agent scheduling and control method according to claim 2, characterized in that, The first instance is an agent instance of a first service unit, and the second instance is an agent instance of a second service unit. The step of sending an instantiation signal to the service unit based on the scheduling rule information, so that the service unit creates multiple agent instances corresponding to the multiple scheduling combinations, includes: Based on the scheduling rule information, a first instantiation signal is sent to the first service unit so that the first service unit creates the first instance; Based on the scheduling rule information, a second instantiation signal is sent to the second service unit so that the second service unit creates the second instance.
6. The multi-agent scheduling and control method according to claim 1, characterized in that, The multi-agent interaction system further includes an interaction unit communicatively connected to the control unit, wherein receiving scheduling rule information includes: The system receives scheduling rule information sent by the interaction unit, wherein the scheduling rule information is generated by the interaction unit based on the user's first input information.
7. The multi-agent scheduling and control method according to claim 1, characterized in that, The multi-agent interaction system further includes an interaction unit communicatively connected to the control unit, the interaction unit communicatively connected to several service units, and the step of sending an instantiation signal to the service unit based on the scheduling rule information includes: When a task scheduling request is received from the service unit, an instantiation signal corresponding to the task scheduling request is sent to the service unit based on the scheduling rule information. The task scheduling request is generated by the service unit based on the data processing task sent by the interaction unit, and the data processing task is generated by the interaction unit based on the user's second input information.
8. The multi-agent scheduling and control method according to claim 7, characterized in that, The scheduling rule information includes multiple scheduling combinations of the service unit in multiple application scenarios. Sending the instantiation signal corresponding to the task scheduling request to the service unit based on the scheduling rule information includes: The target application scenario is determined based on the task scheduling request; Based on the scheduling rule information, the instantiation signals corresponding to multiple scheduling combinations under the target application scenario are sent to the service unit.
9. The multi-agent scheduling and control method according to claim 1, characterized in that, The method further includes: In response to the status termination information fed back by the agent instance, a deletion signal is sent to the service unit so that the service unit deletes multiple agent instances.
10. A multi-agent interaction system, characterized in that, include: A control unit, and several service units communicatively connected to the control unit; The control unit is configured to receive scheduling rule information, which includes scheduling combinations of multiple agents in the service unit under multiple scheduling states; send an instantiation signal to the service unit based on the scheduling rule information, so that the service unit creates multiple agent instances corresponding to the multiple scheduling combinations; and sequentially send task information corresponding to the multiple scheduling states to the multiple agent instances, so that the multiple agent instances execute tasks based on the task information respectively.
11. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; The scheduling control method as described in any one of claims 1 to 9 is implemented when at least one of the programs is executed by at least one of the processors.
12. A computer-readable storage medium storing computer-executable instructions for performing the scheduling control method as described in any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the multi-agent scheduling and control method according to any one of claims 1 to 9.