Multi-agent oriented task decomposition and capability routing operation method and system
By constructing a multi-agent task decomposition and capability routing operating system, the fragmentation problem of cross-platform intelligent agent systems is solved, achieving unified management and efficient task execution, supporting both active and passive modes, and enhancing the application value of intelligent agents in smart cities and other fields.
Patent Information
- Application Number
- CN202511635680.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-10
AI Technical Summary
Existing intelligent agent systems suffer from problems such as platform fragmentation, capability duplication, and uncontrollable execution in cross-platform environments. The lack of a unified operating system to coordinate the capabilities of heterogeneous intelligent agents results in the inability to effectively unleash their productivity potential.
A task decomposition and capability routing operating system for multi-agent systems is constructed, including an identity and registration management module, a memory and context kernel module, a task decomposition and capability orchestration module, and a capability routing and SLA scoring module. This enables unified cross-platform access, task decomposition and capability routing, and supports both active and passive dual-mode operation.
It enables unified management of intelligent agents across platforms, improves the accuracy and reliability of task planning and execution, supports continuous learning and adaptive evolution, reduces human intervention, and significantly enhances the application value of intelligent agents in smart cities and other fields.
Smart Images

Figure CN121116253B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a multi-agent oriented task decomposition and capability routing operation method and system. BACKGROUND
[0002] In recent years, with the rapid development of artificial intelligence, especially large language models, model-based agents have gradually become an important technical form in the fields of smart cities, smart buildings and energy management. Agents encapsulate model capabilities, tool interfaces and knowledge bases to achieve natural language instruction understanding and execution, and have been widely applied to question and answer services, operation and maintenance, energy consumption prediction and security monitoring scenarios. In practical applications, agents are usually built by different platforms, such as Dify, Coze and LangChain. Various platforms provide diversified agent development and deployment capabilities, resulting in a large number of agents with diverse functions in the industry. However, most of the above agents still mainly respond to user instructions passively, and lack the ability to actively run and spontaneously optimize long-term goals. At the same time, due to the differences between agent construction platforms, the implementation of capabilities is not unified, resulting in a lack of effective collaboration and unified governance between agents in a cross-platform environment.
[0003] In typical scenarios of smart cities, such as building energy management, device predictive maintenance and emergency response, different capabilities of multiple agents, such as prediction, diagnosis, control and compliance check, need to be called simultaneously, and complex tasks are completed in a pipeline or graph structure. If there is no unified operating system to coordinate these heterogeneous agent capabilities, there will be problems such as platform fragmentation, repeated or wasted capabilities, and the need for frequent human intervention, which cannot truly realize the productivity potential of agents. For the coordination of agents, there are currently some typical technical solutions, including: (1) Multi-agent orchestration framework, such as AutoGen and LangGraph, provides dialogue and collaboration mechanisms between multiple agents, but mainly focuses on the application framework layer, and focuses on workflow orchestration within a single project, lacking standardized registration, unified governance and cross-platform capability routing of external agents; (2) AIOS (Agent Operating System, Intelligent Operating System), such as the AIOS framework, emphasizes providing operating system services such as context management, storage, scheduling and access control for agents. However, its research focus is mainly on the running efficiency and resource scheduling of a single platform or single model, and does not solve the problem of cross-platform, cross-agent capability-level routing and task decomposition. (3) Cloud computing and microservice SLA routing mechanism, in traditional IT systems, there are SLA-based service selection methods for selecting the best service according to performance, delay or cost indicators. However, the object of these methods is microservices or network resources, which have not been migrated to the agent level, and there is no combination of agent personas, permission constraints and active running mechanisms. Therefore, there is currently a need for an operating system architecture that can face cross-platform external agents, has the ability as the smallest routing granularity, and supports active and passive dual-mode operation. SUMMARY
[0004] In order to solve the technical problems of existing agent system cross-platform fragmentation, coarse routing granularity, single running mode and insufficient industry landing, an embodiment of the present application provides a multi-agent-oriented task decomposition and capability routing operation method and system. The technical solution is as follows:
[0005] On the one hand, a multi-agent-oriented task decomposition and capability routing operation method is provided, which is realized by a multi-agent-oriented task decomposition and capability routing operation device, and the method comprises:
[0006] S1, a multi-agent-oriented task decomposition and capability routing operation system architecture is constructed; wherein the architecture comprises: an identity and registration management module, a memory and context kernel module, a task decomposition and capability orchestration module, and a capability routing and SLA scoring module;
[0007] S2, acquiring a task instruction required by a user to solve a sudden situation in a smart city digital building; inputting the task instruction into the operating system, and the identity and registration management module accessing intelligent agents of external multi-platforms into the operating system through an interface, completing unification and identity registration, and generating an intelligent agent directory;
[0008] S3, the memory and context kernel module retrieves memory related to the task instruction by using a memory recall mechanism through a preselected memory library according to the received task instruction, and outputs a recall result;
[0009] S4, inputting the recall result and the task instruction into the task decomposition and capability arrangement module, generating a candidate task graph by using a pre-trained large language model; based on the candidate task graph, filtering step nodes of the task graph by calculating correlation and coverage, and obtaining a high-quality task graph; wherein the task graph includes nodes and dependency relationships;
[0010] S5, inputting the task graph into the capability routing and SLA scoring module, filtering out intelligent agents without execution qualifications by using a feasible domain filtering mechanism according to the intelligent agent directory, obtaining a candidate intelligent agent set; selecting an optimal capability intelligent agent by calculating SLA scores according to the candidate intelligent agent set, and executing the optimal capability intelligent agent, and outputting an execution result related to the task instruction.
[0011] On the other hand, a multi-agent-oriented task decomposition and capability routing operating system is provided, which is applied to a multi-agent-oriented task decomposition and capability routing operation method, and the system comprises:
[0012] A construction unit is configured to construct a multi-agent-oriented task decomposition and capability routing operating system architecture; wherein the architecture comprises an identity and registration management module, a memory and context kernel module, a task decomposition and capability arrangement module, and a capability routing and SLA scoring module.
[0013] An identity and registration management unit is configured to acquire a task instruction required by a user to solve a sudden situation in a smart city digital building; input the task instruction into the operating system, and the identity and registration management module accesses intelligent agents of external multi-platforms into the operating system through an interface, completes unification and identity registration, and generates an intelligent agent directory.
[0014] A memory retrieval unit is configured to use a memory recall mechanism to retrieve memory related to the task instruction by using a preselected memory library according to the received task instruction, and output a recall result.
[0015] The generating unit is configured to input the recall result and the task instruction into the task decomposition and capability arrangement module, and generate a candidate task graph by using a pre-trained large language model; and filter step nodes of the task graph based on the candidate task graph by calculating correlation and coverage, to obtain a high-quality task graph; wherein the task graph comprises nodes and dependency relationships.
[0016] The output unit is configured to input the task graph into the capability routing and SLA scoring module, filter out agents without execution qualification by using a feasible domain filtering mechanism according to an agent directory, to obtain a candidate agent set; select an optimal capability agent by calculating an SLA score according to the candidate agent set, and execute the selected agent, to output an execution result related to the task instruction.
[0017] In another aspect, a multi-agent-oriented task decomposition and capability routing operation device is provided, which comprises a processor and a memory having computer readable instructions stored thereon, wherein the computer readable instructions are executed by the processor to implement any one of the above multi-agent-oriented task decomposition and capability routing operation methods.
[0018] In another aspect, a computer readable storage medium is provided, which stores at least one instruction loaded and executed by a processor to implement any one of the above multi-agent-oriented task decomposition and capability routing operation methods.
[0019] The technical scheme provided by the embodiments of the present application has at least the following beneficial effects:
[0020] The embodiment of the application shields platform differences by constructing an identity and registration management module, uniformly describing intelligent agents from different platforms in a standardized structure body Persona, realizing unified access across platforms and sources, and ensuring that the intelligent agents do not lose their personas, capabilities and permission information when migrating. The embodiment of the application effectively avoids the problems of "data island" and "capability lock" caused by platform fragmentation in traditional solutions. The embodiment of the application combines short-term, medium-term and long-term memory with a knowledge graph by constructing a memory and context kernel, providing rich context support for task decomposition. During execution, the system can reuse historical cases and experience to improve the accuracy and personalization of task planning and execution. The memory library can be dynamically updated according to the execution results, enabling the system to have continuous learning and self-adaptive evolution capabilities. The embodiment of the application converts user instructions or targets into a task graph by constructing a task decomposition and capability arrangement module. The embodiment of the application uses a correlation and coverage scoring mechanism to ensure that the planned task graph is both simple and covers the target. The embodiment of the application uses a constraint self-checking mechanism to eliminate unexecutable or high-risk steps, ensuring that the output task graph can be implemented in engineering. This mechanism breaks through the bottleneck of "limited task capabilities of a single intelligent agent and difficulty in decomposing complex tasks" in traditional intelligent agent systems. The embodiment of the application performs comprehensive scoring based on accuracy, delay, cost and compliance in the legal candidate set by constructing a capability routing and SLA scoring module. The embodiment of the application introduces node-level routing preference weights to enable customized optimal selection for different task nodes. The embodiment of the application supports single execution, parallel execution and result fusion, and provides cross-validation and arbitration mechanisms in high-risk tasks, significantly improving the credibility and robustness of the results. The embodiment of the application avoids the defects of traditional methods that rely on fixed platforms or single models and cannot dynamically optimize execution quality.
[0021] The system constructed by the application can be compatible with active and passive dual modes; the system can respond to user immediate instructions (passive mode) and can autonomously plan and execute tasks based on long-term goals or KPIs (active mode). In energy management and predictive maintenance of devices and other scenarios, the active mode can achieve continuous optimization and reduce manual intervention. The embodiment of the application is extensible and universal. The architecture design of the embodiment of the application is not limited to the digital building scenario, but can also be extended to smart city subfields such as safety emergency and digital new energy, and even can be popularized to non-smart city fields, providing unified operating system support for cross-industry intelligent agent applications. The embodiment of the application not only solves the problems of platform fragmentation, capability heterogeneity, task decomposition difficulty and uncontrollable execution in existing intelligent agent systems, but also realizes unified support for active and passive task modes, has explainability, reproducibility and evolution capabilities, and can significantly improve the landing value and technical competitiveness of intelligent agents in smart cities and other fields. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments description. Obviously, the drawings in the following description only some of the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0023] Figure 1 is a kind of multi-agent task decomposition and capability routing operation method flow chart provided in the embodiment of the present application;
[0024] Figure 2 is a kind of system overall architecture schematic diagram provided in the embodiment of the present application;
[0025] Figure 3 is a kind of memory layering and recall mechanism schematic diagram provided in the embodiment of the present application;
[0026] Figure 4 is a kind of task decomposition and task graph flow schematic diagram provided in the embodiment of the present application;
[0027] Figure 5 is a kind of capability routing and SLA scoring process schematic diagram provided in the embodiment of the present application;
[0028] Figure 6 is a kind of multi-agent task decomposition and capability routing operation system block diagram provided in the embodiment of the present application;
[0029] Figure 7 is a kind of multi-agent task decomposition and capability routing operation device structure schematic diagram provided in the embodiment of the present application. DETAILED DESCRIPTION
[0030] The technical solutions in the present application will be described below with reference to the drawings.
[0031] In the embodiments of the present application, the words such as "example", "for example" are used to represent as an example, illustration or description. Any embodiment or design scheme described as "example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present application, the meaning expressed by "and / or" can be both, or can be either one of the two.
[0032] In the embodiments of the present application, the terms "image" and "picture" can be used interchangeably, and it should be pointed out that the meanings expressed are consistent when the distinction is not emphasized.
[0033] In the embodiments of the present application, sometimes the subscript such as W1 can be written in the form of non-subscript such as W1, and the meanings expressed are consistent when the distinction is not emphasized.
[0034] To make the technical problems, technical solutions and advantages to be solved by the present application clearer, the following will be described in detail in conjunction with the drawings and specific embodiments.
[0035] The embodiments of the present application provide a multi-agent-oriented task decomposition and capability routing operation method, which can be implemented by a multi-agent-oriented task decomposition and capability routing operation device. The multi-agent-oriented task decomposition and capability routing operation device can be a terminal or a server. Figure 1 As shown in the flowchart of the multi-agent-oriented task decomposition and capability routing operation method, the processing flow of the method can include the following steps:
[0036] S1, construct a multi-agent-oriented task decomposition and capability routing operation system architecture; wherein the architecture includes: an identity and registration management module, a memory and context kernel module, a task decomposition and capability arrangement module, and a capability routing and SLA scoring module.
[0037] Optionally, the identity and registration management module is configured to be responsible for the access and registration of external agents, abstract the external agent capability list, permission constraints and human setup information into a standardized structure body Persona, and form a cross-platform unified agent directory; wherein the agent directory can provide a basis for subsequent task arrangement and capability calling.
[0038] The memory and context kernel module is configured to maintain short-term, medium-term and long-term hierarchical memories, store historical tasks, cases, external knowledge and execution feedback; wherein the memory and context kernel module can also provide context basis for task decomposition and capability routing, and support continuity and traceability of tasks at different time spans.
[0039] The task decomposition and capability arrangement module is configured to decompose a complex task input by a user into a plurality of executable operations, wherein each executable operation is mapped to a capability type including prediction, retrieval, control, and verification, thereby providing a task blueprint for capability routing, and the task decomposition and capability arrangement module is configured to convert a user instruction (passive mode) or a system target / event (active mode) into operation steps and establish a dependency relationship and an execution order between the steps.
[0040] The capability routing and SLA scoring module is configured to filter out an optimal agent of a capability to complete execution of a complex task, wherein the capability routing and SLA scoring module is capable of realizing single capability calling, parallel calling, and fusion calling, ensuring that each task is executed by the most suitable agent capability, and outputting a routing log for subsequent auditing and memory updating.
[0041] The capability routing and SLA scoring module is configured to filter out an optimal agent of a capability to complete execution of a complex task, wherein the capability routing and SLA scoring module is capable of realizing single capability calling, parallel calling, and fusion calling, ensuring that each task is executed by the most suitable agent capability, and outputting a routing log for subsequent auditing and memory updating. Figure 2 is a system overall architecture schematic diagram provided by an embodiment of the present application; the multi-agent-oriented task decomposition and capability routing operating system architecture constructed by the embodiment of the present application can simultaneously support passive triggering triggered by a user instruction and active mode based on a target / KPI / event triggering, thereby realizing efficient and reliable multi-agent capability arrangement in scenarios such as digital buildings of smart cities, energy consumption optimization, and equipment maintenance and emergency response.
[0042] S2, a task instruction required by a user to solve a certain sudden situation in a digital building of a smart city is acquired; the task instruction is input into an operating system, and an identity and registration management module accesses intelligent agents of external multi-platforms into the operating system through an interface, completes unified identity registration, and generates an intelligent agent directory.
[0043] The task instruction required by the user to solve the certain sudden situation can be building energy consumption management, equipment predictive maintenance, and emergency event response.
[0044] In a feasible implementation manner, the identity and registration management module is configured to realize unified access and identity registration of external intelligent agents. Since the intelligent agents can be constructed by different platforms such as Dify and Coze, there are differences in interface styles and capability descriptions. In order to eliminate platform fragmentation, the identity and registration management module abstracts key information of the intelligent agents into a standardized structure body Persona and registers the same to an intelligent agent directory of the system, thereby realizing unified management across platforms and across sources.
[0045] The Persona data structure is the abstract identity of the agent at the operating system layer, including the following core fields: (1) agent_id: unique identifier of the agent, used for subsequent task invocation and capability routing; (2) persona_desc: persona description, used to describe the role positioning and professional attributes of the agent, which can be used as context input for high-level prompts; (3) capability_list: capability list, defining the types of capabilities that the agent can provide (such as prediction, diagnosis, control and knowledge retrieval), which is the basic unit for task decomposition and routing; (4) policies: set of permission constraints, using a combination of RBAC (role-based access control) and ABAC (attribute-based access control) to limit the range of data that the agent can access, the tools that can be invoked, or the system interfaces that can be operated; (5) version: version number, used to support cache consistency and update management.
[0046] In one feasible implementation, the registration process includes: (1) Access request: The external agent submits its own information to the operating system through the registration interface, including agent_id, persona_desc and capability_list, etc.; (2) Structure mapping: The system maps the platform-specific description to the standard Persona structure; (3) Policy binding: Based on the capabilities and permissions declared by the agent, the corresponding policies are generated and written into the Persona structure; (4) Directory registration: The registered Personas are stored in a unified agent directory for subsequent task decomposition and capability routing calls; (5) Version management: Each update has a version field, and the operating system can determine whether the cache needs to be refreshed by verifying the version.
[0047] In one feasible implementation, the identity and registration management module serves the following functions: unified access, which shields differences between different platforms and enables unified management of intelligent agents from different sources; identity binding, which ensures that each intelligent agent has a unique agent_id and a clear list of capabilities; access control, which ensures that the calling process complies with regulations, access control and security boundary requirements through RBAC / ABAC mechanisms; and caching and updating, which reduces the overhead of repeated verification and calls through version management.
[0048] The S3 memory and context kernel module retrieves memories related to the task instructions based on the received task instructions using a pre-selected memory bank and a memory retrieval mechanism, and outputs the retrieval results.
[0049] in, Figure 3This is a schematic diagram of a memory layering and recall mechanism provided in an embodiment of the present invention; specifically, the memory in the memory bank is updated based on the execution result feedback; the memory is recalled based on the updated memory and the recall results are sorted and output. The memory and context kernel module is used to implement context management of intelligent agent task execution at the operating system layer; wherein, the functions of the memory and context kernel module include: (1) storing multi-layer memory types including: short-term memory, medium-term memory and long-term memory; (2) providing context recall during task decomposition and capability routing to ensure the continuity and traceability of task execution; (3) after the task is completed, updating or eliminating memory according to the execution effect and feedback, thereby gradually improving the system's adaptive capability;
[0050] Optionally, the specific implementation process of S3 includes S31-S33:
[0051] S31. Based on the task instructions, retrieve the memories related to the task instructions through a pre-constructed memory bank to obtain a candidate memory set;
[0052] Each memory is stored in a structured entry format, including the following core fields: (1) memory_id: unique identifier; agent_id: source agent; type: memory type; content: specific content, such as natural language fragments, task summaries, case information, and knowledge entries; vector: vectorized representation, used for semantic retrieval and similarity calculation; timestamp: timestamp, used to determine lifespan and time decay; (4) frequency: number of calls, used to measure usage frequency; (5) trust: trust score [0,1], derived from system self-evaluation and human feedback; source: data sources include: task results, user feedback, and external knowledge bases, etc. The above structured design ensures that memories can be used as retrievalable data units and can also be statistically calculated during the updating and elimination process.
[0053] S32. Calculate the overall score for each candidate memory based on the candidate memory set and the pre-defined memory types; where memory types include: short-term memory, medium-term memory, and long-term memory.
[0054] Short-term memory stores information within 24 hours or less, such as conversation context and immediate task status; medium-term memory stores information greater than 24 hours but less than or equal to 30 days, such as weekly energy consumption trends and equipment operation statistics; long-term memory stores information greater than 30 days, such as historical cases, expert knowledge graphs, and information typically retained long-term. When recalling memories, the system assigns basic weights to different memory types, for example, short-term memory is weighted at 1.0, medium-term memory at 0.8, and long-term memory at 0.6, thus ensuring context priority while still considering historical knowledge.
[0055] wherein the formula for calculating the comprehensive score of each candidate memory is represented by the following formula (1):
[0056] (1)
[0057] wherein, represents the number of memory calls; represents the comprehensive score of each candidate memory; represents the memory type weight, short-term = 1.0, medium-term = 0.8, long-term = 0.6; represents the semantic similarity, range [0, 1]; represents the first weighting coefficient; represents the second weighting coefficient; represents the third weighting coefficient; represents the fourth weighting coefficient, satisfying α+β+γ+δ=1; represents the time decay function; represents the memory credibility, range [0, 1]; represents the difference between the current time and the memory timestamp; q represents the vector representation of the output task instruction or target; represents the i-th candidate memory;
[0058] wherein the number of memory calls is represented by the following formula (2):
[0059] (2)
[0060] wherein, is the 95th percentile; represents the number of calls within the window;
[0061] S33, according to the comprehensive score of each candidate memory, each candidate memory is sorted in descending order, and the top K candidate memories are selected as the recall result; wherein the value of K is 5-20, which is set according to the task complexity.
[0062] In a feasible implementation, when the user input task instruction is completed or the system feedback arrives, the system writes new memories into the memory and context kernel module, and updates the memories through the memory update mechanism; after the system executes each instruction or task, the task-related input, execution process, and execution result are saved as new memories; wherein the steps of the memory update mechanism include: (1) candidate screening: calculate the similarity between new content and existing memories to obtain a candidate set; wherein the process of obtaining the candidate set is represented by the following formula (3):
[0063] (3)
[0064] (2) Strong match merge: judge whether there is a candidate memory based on the candidate set , if there is a candidate memory and that is, the similarity between the new memory x and the current candidate memory is greater than the preset threshold , =0.9, then merge the memory, update the frequency and trust fields;
[0065] (3) Small cluster merge: if the similarity between multiple memories in the candidate set , wherein represents the similarity threshold; take the memory corresponding to the median vector as the anchor point, merge the new memory with the top three similar items sorted between scores [0.85-0.9], update the frequency and trust, and generate a summary;
[0066] (4) New memory: if it is judged that the above merging conditions are not met, a new memory item is created to generate a new memory_id (identifier).
[0067] In a feasible implementation, the memory trust value is calculated by combining system self-evaluation and artificial feedback for updating; wherein the calculation process of the memory trust value is represented by the following formula (4):
[0068] (4)
[0069] wherein, represents the updated memory trust value; represents the forgetting coefficient, the range is (0.1), which controls the historical weight decay; represents the trust value of the memory before updating; represents the incremental trust score of system and artificial feedback;
[0070] wherein,
[0071] wherein, represents the first weight coefficient, which is 0.4; represents the artificial evaluation, such as "prediction correct =1, partial correct =0.5, error =0"; represents the second weight coefficient, which is 0.6; represents the system side self-evaluation, for example, based on SLA error rate (prediction error ≤5%=1, ≤10%=0.5, greater than 10%=0);
[0072] The role of the memory and context kernel module includes: in the passive mode, the most relevant historical context and case can be provided for task decomposition to reduce repetitive work; in the active mode, experience data related to KPI can be continuously accumulated and updated to form a long-term optimization closed loop; in the routing stage, the execution effect prior of SLA score can be provided to improve the accuracy of capability selection; and in the system level, the agent operating system can have long-term learning and evolution ability through hierarchical management and feedback correction.
[0073] S4, input the recall result and the task instruction into the task decomposition and capability arrangement module, generate a candidate task graph through a pre-trained large language model; based on the candidate task graph, the step nodes of the task graph are screened through correlation and coverage calculation to obtain a high-quality task graph; wherein, the task graph includes nodes and dependency relationships.
[0074] wherein, Figure 4 is a task decomposition and task graph process schematic diagram provided by the embodiment of the present application; specifically, assuming that it is a complex task of building energy consumption optimization, for example, a user or system inputs a target "maintain comfort while reducing energy consumption as much as possible during tomorrow's office peak period"; the target is decomposed into executable sub-steps through task decomposition of a large model or an operating system layer, and each sub-step is completed by different agents. Wherein, the instruction or target input is a natural language instruction given by the user or a system-generated energy-saving target; N1 query data (serial starting point) is to call the query data capability of the energy consumption expert agent to obtain historical energy consumption, load and device operation log; N2 load prediction (one of the parallel branches) is to call the prediction capability of the energy consumption expert agent to predict future load demand; N3 knowledge retrieval (the second of the parallel branches) is that the "knowledge base expert agent" and the "device expert agent" both have knowledge retrieval capability. The system selects a better agent to execute the retrieval operation by scoring (such as selecting a knowledge base expert); wherein, N2 and N3 belong to parallel steps and can be started simultaneously; N4 generates an optimization strategy, that is, the energy consumption expert agent calls its strategy generation capability to fuse the prediction result and the knowledge retrieval result to generate an energy-saving scheme; N5 strategy feasibility judgment is to verify whether the generated optimization strategy can be implemented under technical and operating conditions by the device expert agent. If feasible, go to compliance verification and instruction issuance; if not feasible, go back to N4 to re-plan; N7 compliance verification is to give compliance operation precautions in safety, legality, budget and industry standards for the feasible strategy by the device expert agent; N6 control issuance is to issue instructions by the control capability of the energy consumption expert to convert the optimization strategy into device control instructions and issue them to the building system; N8 report generation is to generate a report by the report generation capability of the energy consumption expert to summarize the optimization process and results to generate a report for human managers, which can include energy consumption prediction value, strategy comparison and energy-saving effect.
[0075] In an implementable embodiment, the task decomposition and capability orchestration module first generates a candidate task graph through a pre-trained large language model, filters the step nodes of the task graph by calculating the correlation and coverage, and obtains a high-quality task graph, i.e., a minimum coverage task graph set; performs constraint self-checking and rule optimization based on the small coverage set to ensure the engineering feasibility and semantic consistency of the output task graph; and uses a graph executor to topologically sort the high-quality task graph and input it into the capability routing and SLA scoring module.
[0076] The task decomposition and capability orchestration module can maintain system interpretability, replaceability, and scalability, and its input includes: I | G, i.e., a natural language instruction in passive mode I or a target / KPI / event G in active mode; M_ctx, i.e., a recall result; C_onto, i.e., a system-level capability type ontology; and Pol_onto, i.e., a system-level permission or resource ontology. C_onto and Pol_onto are system-level vocabularies and do not contain specific agent information, so they cannot form a coupling with the identity and registration management module. The output of the task decomposition and capability orchestration module includes a task graph, node metadata, and node running records in the execution period. The task graph includes a node set and a dependent edge. The node metadata includes capability requirements, general constraints such as required permissions, time delay, and cost upper limit, node-level routing preferences, failure handling strategies, and success determination criteria.
[0077] The pre-trained large language model may generate redundant or deviated steps at one time, and a quantitative filtering process is needed to remove irrelevant or repetitive steps and leave a "small but complete" step set.
[0078] The minimum step node set that can cover the task target is selected from the candidate task graph.
[0079] Correlation can measure the degree of fit between step s and the task target, i.e., quantitatively identify whether the step is necessary or reasonable. Coverage is a certain proportion threshold that selects a subset to make its total correlation reach the overall upper limit, i.e., to ensure "comprehensive coverage" without missing key links.
[0080] Alternatively, the calculation formula of the correlation of S4 is represented by the following formula (5)
[0081] (5)
[0082] Wherein, represents the correlation score between step node s and the global target or input, with a value range of [0, 1]; represents the first weighting coefficient, represents the second weighting coefficient, which controls the weight of semantic similarity and capability matching degree, and satisfies + =1; represents the capability requirement description of step node s; represents the system capability ontology, a standardized set of capability types, for unifying the capability labels of different agents; represents the vector representation of global input or target; represents the semantic vector representation of candidate step node s, obtained by a large model encoder, for calculating the semantic similarity with the global target; represents the semantic similarity function; represents the capability matching function;
[0083] wherein the calculation formula of coverage is represented by the following formula (6):
[0084] (6)
[0085] wherein, represents the coverage of the candidate step node subset; represents the relevance score of step node s; represents the lower limit threshold of coverage; represents all possible node subsets; represents the finally selected step node subset; S represents all steps after task decomposition.
[0086] wherein, the greedy approximation algorithm is adopted to select steps from high to low until the preset coverage threshold is reached, to obtain the minimum coverage set .
[0087] In a feasible implementation, the embodiment of the present application performs constraint self-checking and optimization on unreasonable nodes, ensuring the overall executability of the task graph. The self-checking can exclude steps that are obviously unlandable or semantically illegal without relying on specific agents, ensuring the feasibility and semantic consistency of the task graph engineering output by the module. The process of constraint self-checking and optimization includes: (1) checking the semantic legality of the authority, typical time delay or cost envelope, and Figure 1consistency, i.e. checking if the input references non-existing output, if there is loop or dangling node, etc. If the detected graph is inconsistent, mark must_replace and perform local correction. Figure 1 consistency, i.e. checking if the input references non-existing output, if there is loop or dangling node, etc. If the detected graph is inconsistent, mark must_replace and perform local correction.
[0088] If marked must_replace, trigger local replacement or rewriting in the planning stage (minimal disturbance correction to the affected subgraph) to ensure the final output task graph is executable and semantically legal. If marked high_risk, keep the mark and let the capability routing and SLA scoring module decide whether to fallback or re-plan in the execution stage.
[0089] In a feasible implementation, the node-level routing preference weight can be generated by the following formula (7) or default rules; wherein the node-level routing preference weight can be generated by the following formula (7):
[0090] (7)
[0091] wherein, represents the extracted context feature; represents the mapping parameter, which can be empirically set or offline trained; represents the node-level routing preference weight; represents the context feature; represents the node operation type; represents the priority / importance of the node in the entire task link; wherein the context feature includes emergency flag, node type and importance, etc.
[0092] Among them, the default rules (which can be directly landed) include: emergency identification type: delay latency 0.6, accuracy 0.3, cost 0.05, compliance 0.05; Control issuing type: accuracy 0.4, compliance 0.3, latency 0.2, cost 0.1; Analysis report type: accuracy 0.5, compliance 0.3, cost 0.1, latency 0.1.
[0093] Among them, when individual nodes may fail due to empty feasible region or unmet indicators, failure handling and local re-planning are performed to repair through the minimum cost; Specifically, when the triggered node fails and still fails after retry or operation rollback, the capability routing and SLA scoring module reports that the feasible region is empty, that is, no agent meets the required permission set or SLA, and then generates an alternative path or node for all nodes Scope that need local re-planning by calling the pre-trained large language model with failure reason, capability routing and SLA scoring module routing log and actual indicators as new constraints; The input or output dependency of the successful node is not changed; The upper limit is set to R_{max}=2 to avoid oscillation. Wherein, Scope is represented by the following formula (8):
[0094] (8)
[0095] Among them, Indicates all subsequent nodes dependent on the failed node; Indicates the failed node.
[0096] S5, input the task graph into the capability routing and SLA scoring module, filter out agents without execution qualifications according to the agent directory using the feasible region filtering mechanism to obtain a candidate agent set; According to the candidate agent set, select the optimal agent with the best capability by calculating the SLA score and execute it, and output the execution result related to the task instruction.
[0097] Among them, Figure 5is a capability routing and SLA scoring process schematic diagram provided by an embodiment of the present application; in a feasible implementation, an input node requests and performs feasible domain filtering processing to eliminate agents without execution qualifications, obtains a candidate agent set; according to the candidate agent set, an agent with optimal capability is selected by calculating an SLA score and executed, and an execution result is output; the execution result is backfilled and a log is generated. Wherein, the performance of different agents on the same capability is significantly different (such as accuracy, delay, cost and compliance are different); processing through the capability routing and SLA scoring module can follow permission and policy constraints to avoid calling agents without legal access permissions; in high-risk tasks, multiple agent cross-validation is required to avoid single-point errors.
[0098] Among them, the feasible domain filtering mechanism can eliminate agents without execution qualifications, eliminate agents with average delay that will inevitably exceed the maximum delay that can be tolerated, and eliminate agents with average cost that will inevitably exceed the highest cost that can be tolerated, to ensure legality.
[0099] Optionally, the process of S5 adopting the feasible domain filtering mechanism to eliminate agents without execution qualifications to obtain a candidate agent set is represented by the following formula (9):
[0100] (9)
[0101] Among them, v represents a task node; F represents a candidate agent set; represents a certain agent a registered in the system; represents a permission set required by the task node v; represents a permission set granted to the agent a; represents a capability requirement description of the task node v; represents a capability list of the agent a.
[0102] Optionally, S5 according to the candidate agent set, selecting an agent with optimal capability by calculating an SLA score, includes:
[0103] Four index dimensions are calculated based on the candidate agent set; wherein the four index dimensions include: accuracy, delay, cost and compliance;
[0104] Optionally, the calculation process of the accuracy is represented by the following formula (10):
[0105] (10)
[0106] Among them, represents the accuracy; represents an offline benchmark; represents online operation; denotes the fusion weight, which is 0.5 for offline or online;
[0107] wherein the offline reference is represented by the following formula (11):
[0108] (11)
[0109] wherein the online operation is represented by the following formula (12):
[0110] (12)
[0111] wherein N denotes the number of samples within the time window; denotes the true value of the i-th sample; denotes the predicted value or output value of the i-th sample;
[0112] wherein the calculation process of the delay is represented by the following formula (13):
[0113] (13)
[0114] wherein, denotes the delay; denotes the original delay statistic within the window t; denotes the maximum delay threshold allowed by the node;
[0115] wherein the original delay statistic within the window t is represented by the following formula (14):
[0116] (14)
[0117] wherein N denotes the number of samples within the event window; denotes the end time of the sample; denotes the start time of the sample;
[0118] wherein the calculation formula of the cost is represented by the following formula (15):
[0119] (15)
[0120] wherein, denotes the cost; denotes the unit call cost statistic within the window t; denotes the maximum unit cost threshold allowed by the node;
[0121] wherein the unit call cost statistic within the window t is represented by the following formula (16):
[0122] (16)
[0123] wherein, represents the cost of consumption of each sample;
[0124] wherein, the calculation formula of the compliance is represented by the following formula (17):
[0125] (17)
[0126] wherein, represents the compliance; represents the violation rate; represents the violation severity coefficient;
[0127] wherein, the violation rate is represented by the following formula (18):
[0128] (18)
[0129] wherein, represents the number of violation samples; represents the total number of samples within the time window;
[0130] According to the four index dimensions and the node-level routing preference in the node, the SLA score is calculated;
[0131] wherein, the calculation formula of the SLA score is represented by the following formula (19):
[0132] (19)
[0133] wherein, represents the accuracy rate; represents the delay; represents the cost; represents the compliance; represents the SLA score; represents the first weight of the node-level routing preference; represents the second weight of the node-level routing preference; represents the third weight of the node-level routing preference; represents the fourth weight of the node-level routing preference.
[0134] In an embodiment, when the score difference between the first candidate agent and the second candidate agent selected by calculating the SLA score is greater than or equal to a preset threshold, a single agent with the highest score is selected; when the score difference between the first candidate agent and the second candidate agent is greater than the preset threshold, multiple candidate agents are invoked in parallel, and then the agent execution result fusion is performed; wherein the agent execution result fusion can adopt a weighted average method or a non-maximum suppression algorithm; wherein the weighted average method is weighted according to the confidence of each agent; the non-maximum suppression algorithm can eliminate low-confidence candidate agents with high similarity of execution results. After execution is completed, the execution result and the related indicators are stored in the memory of the memory and context kernel module; the execution result can be recorded in the audit log and returned to the task decomposition and capability arrangement module to continue the task graph operation.
[0135] When the newly registered agent lacks online data, the offline test stage or the trial operation stage data can be used initially; after the agent is formally put into operation, more and more real data in the operation stage can be obtained, and the weight of the recent data can be gradually increased.
[0136] In an embodiment, when a high-risk node such as an emergency control node task is executed, multiple agents can be forced to execute in parallel, and the execution result is output; if the execution results conflict, the consistency is calculated; when the consistency result is lower than a preset threshold, the conflict is reported, and local re-planning is performed by triggering the task decomposition and capability arrangement module. The process of calculating the consistency can be represented by the following formula (20):
[0137] (20)
[0138] Wherein, the number of consistent results refers to the number of results that are consistent or highly similar in the output results of all agents; the total number of participants refers to the total number of agents participating in parallel execution; AgreeRate represents the degree of consistency of the results of the agents on the task; wherein, the consistency result is close to 1, indicating that most of the agent results are the same, and the scheme is reliable; the consistency result is low (such as <0.6), indicating that the results are seriously divergent, and arbitration or re-planning needs to be triggered.
[0139] Wherein, the explanation chain and the log generated each time the route is generated include: (1) input constraints, candidate set and filtering reasons; (2) SLA indicators and total scores of each candidate; (3) the final execution mode; (4) the actual execution result and the evaluation indicators.
[0140] In an implementable embodiment, the embodiment of the present application has two modes including an active mode and a passive mode; the active mode is target-driven, without step-by-step intervention of the user, and the system can run autonomously; that is, the user sets a long-term target or KPI, such as "reduce energy consumption by 10% in the coming week", the system periodically triggers the memory and context kernel module to recall data cases; according to the recalled data domain case task decomposition and capability arrangement module, a task graph is planned, such as energy consumption prediction, optimization control, compliance verification and report output; based on the task graph capability routing and SLA scoring module, appropriate agents are selected at each node for execution, the system regularly outputs strategies and results, and continuously writes back to the memory. The passive mode is instruction-driven, the task is triggered by the user, and the system can quickly respond; that is, the user inputs an immediate instruction, such as "help me generate an energy consumption control strategy for tomorrow", the system recalls the context according to the input immediate instruction calling the memory and context kernel module; based on the context task decomposition and capability arrangement module, a task graph is planned, such as prediction, optimization and report; based on the task graph task graph capability routing and SLA scoring module, the appropriate agents are routed to the node level, the execution result is output, and the memory bank is updated.
[0141] In an implementable embodiment, the following is an embodiment 1 provided by an embodiment of the present application, which can be applied in large building circles such as office buildings or exhibition halls, energy consumption management and energy saving optimization of air conditioning or lighting systems. The traditional method relies on manual experience to start and stop the air conditioner and set the temperature, lacks fine control, and leads to energy waste. Specifically, start the system, the user inputs the task instruction "reduce energy consumption by 10% in the next 7 days"; through the identity and registration management module, the energy consumption expert agent and the HVAC control agent are connected to the system through the registration interface, and a persona is generated for them, marking the ability (such as prediction ability, optimization ability and control ability) and authority (such as HVAC control authority and energy consumption database access authority); based on the user input instruction, the memory and context kernel module recalls the energy consumption data, weather forecast data and historical optimization scheme of the past 30 days through the preselected memory library; sort the memory and extract high-confidence cases related to the current target; input the user input instruction and the high-confidence cases related to the current target into the task decomposition and capability arrangement module, and generate a task graph through a pre-trained large language model, including: N1: query energy consumption and weather data; N2: predict future energy consumption load; N3: generate optimization control strategy; N4: compliance verification (avoid exceeding the power consumption safety threshold); N5: generate energy saving report; according to the task graph, evaluate the above N2 node through the capability routing and SLA scoring module, and evaluate two prediction agents A1 and A2; among them, agent A1 has the characteristics of high accuracy, low delay and high; agent A2 has the characteristics of low accuracy and fast response; calculate the SLA score by calculating the node preference weight biasing accuracy, and select agent A1; at the N3 node, route to the optimal HVAC control agent; at the N4 node, trigger the cross-validation mechanism, and check two compliance agents in parallel, calculate the consistency result, and judge whether the consistency result is greater than the preset threshold 0.8, if greater, then pass; the system generates a control strategy and issues it to the air conditioning system, with an expected energy saving rate of 11%; write the execution result and index into the memory library to provide new experience for subsequent optimization.
[0142] In a feasible implementation manner, the following is an embodiment 2 provided by the embodiment of the application, and the embodiment of the application can also be applied to device predictive maintenance, that is, in a smart building, if an elevator and a cold machine and the like suddenly fail, a safety hazard and service interruption can be caused. Traditional maintenance cannot predict potential problems in real time depending on regular inspection. Specifically, a user inputs a task instruction "discover an elevator in advance to avoid shutdown"; a system is started, elevator sensor diagnosis agents and maintenance knowledge expert agents are connected to the system through an identity and registration management module, and the agents are generated with a Persona registered ability (for example, an anomaly detection ability, a detection ability and a maintenance suggestion) and a permission (for example, device data reading and maintenance record access); according to similarity, an abnormal mode with high confidence is extracted as a reference; a user-set task target and a recall result are input into a task decomposition and ability arrangement module to generate a task graph including N1: collecting elevator operation data; N2: diagnosing whether there is an anomaly; N3: if there is an anomaly, recommending a maintenance measure; and N4: generating a maintenance report; the task graph is input into an ability routing and SLA scoring module, and two candidate diagnosis agents B1 and B2 are evaluated at the N2 node; wherein the agent B1 has high accuracy but high calling cost; the agent B2 has low cost but poor accuracy; the SLA score is further calculated by calculating a node preference weight biasing accuracy to filter out the agent B1; at the N3 node, a maintenance knowledge expert agent gives a suggestion, which is cross-verified by a second agent to avoid misjudgment; the system generates a report "elevator main motor shaft anomaly, suggestion to replace within 7 days", and the execution result is fed back to a memory bank to improve the accuracy of future diagnosis.
[0143] The two embodiments above show the application value of the embodiment of the application in the digital building field, specifically including: in energy consumption management, target-driven automatic energy-saving optimization is realized; in device maintenance, predictive maintenance and risk prevention and control are realized; further, the embodiment of the application is universally applicable to agent-assisted approval and execution detection; rapid response to safety emergency events and multi-source data collaborative analysis; energy consumption prediction of digital new energy, virtual power plant scheduling and transaction optimization. In a feasible implementation manner, the embodiment of the application can not only be applied in the field of smart cities, but also be applied in non-smart city fields, such as medical treatment or finance and the like.
[0144] The embodiment of the application shields platform differences by constructing an identity and registration management module, uniformly describing agents from different platforms in a standardized Persona structure. Unified access across platforms and sources is achieved, and the persona, ability and permission information of the agent is ensured not to be lost during migration. The problems of "data island" and "ability lock" caused by platform fragmentation in traditional solutions are effectively avoided. The short-term, medium-term and long-term memory and knowledge graph are combined by constructing a memory and context kernel, providing rich context support for task decomposition. During execution, the system can reuse historical cases and experience to improve the accuracy and personalization of task planning and execution. The memory library can be dynamically updated with the execution results, enabling the system to have continuous learning and self-adaptive evolution capabilities. The user instruction or target is converted into a task graph by constructing a task decomposition and capability arrangement module. The correlation and coverage scoring mechanism is adopted to ensure that the planned task graph is simple and covers the target. Through the constraint self-checking mechanism, unexecutable or high-risk steps are eliminated to ensure that the output task graph can be implemented in engineering. This mechanism breaks through the bottleneck of "limited task ability of single agent and difficulty in decomposing complex tasks" in traditional agent systems. In the legal candidate set, the accuracy, delay, cost and compliance are scored based on four dimensions by constructing a capability routing and SLA scoring module. The node-level routing preference weight is introduced, which can realize customized optimal selection for different task nodes. Single execution, parallel execution and result fusion are supported, and cross-validation and arbitration mechanisms are provided in high-risk tasks, which significantly improves the credibility and robustness of the results. The defects of traditional methods that rely on fixed platforms or single models and cannot dynamically optimize execution quality are avoided.
[0145] The system constructed by the application can be compatible with active and passive dual modes; the system can respond to user's immediate instructions (passive mode) and can autonomously plan and execute tasks based on long-term goals or KPIs (active mode). In energy management and predictive maintenance of devices and other scenarios, the active mode can achieve continuous optimization and reduce manual intervention; the embodiment of the application has scalability and universality, and the architecture design of the embodiment of the application is not limited to the digital building scenario, but can also be extended to smart city subfields such as safety emergency and digital new energy, and even can be popularized to non-smart city fields, providing unified operating system support for cross-industry agent applications. The embodiment of the application not only solves the problems of platform fragmentation, ability heterogeneity, task decomposition difficulty and uncontrollable execution in existing agent systems, but also realizes unified support for active and passive task modes, has explainability, reproducibility and evolution ability, and can significantly improve the landing value and technical competitiveness of agents in smart cities and other fields.
[0146] Figure 6The system is a multi-agent-oriented task decomposition and capability routing operating system diagram provided by an embodiment of the application, which is used for a multi-agent-oriented task decomposition and capability routing operation method. Figure 6 The system includes a construction unit 610, an identity and registration management unit 620, a retrieval memory unit 630, a generation unit 640, and an output unit 650. Among them:
[0147] The construction unit 610 is configured to construct a multi-agent-oriented task decomposition and capability routing operating system architecture; wherein the architecture includes an identity and registration management module, a memory and context kernel module, a task decomposition and capability arrangement module, and a capability routing and SLA scoring module;
[0148] The identity and registration management unit 620 is configured to obtain a task instruction required by a user to solve a sudden situation in a smart city digital building; input the task instruction into the operating system, and the identity and registration management module accesses the operating system through an interface by an external multi-platform agent, completes unified identity registration, and generates an agent directory;
[0149] The retrieval memory unit 630 is configured to use a memory recall mechanism to retrieve memories related to the task instruction by a preselected memory library according to the received task instruction, and output a recall result;
[0150] The generation unit 640 is configured to input the recall result and the task instruction into the task decomposition and capability arrangement module, generate a candidate task graph by a pre-trained large language model; based on the candidate task graph, filter the step nodes of the task graph by calculating the correlation and coverage, and obtain a high-quality task graph; wherein the task graph includes nodes and dependency relationships;
[0151] The output unit 650 is configured to input the task graph into the capability routing and SLA scoring module, use a feasible domain filtering mechanism to eliminate agents without execution qualifications according to the agent directory, obtain a candidate agent set; select the optimal capability agent by calculating the SLA score according to the candidate agent set and execute, and output the execution result related to the task instruction.
[0152] Optionally, the identity and registration management module is configured to be responsible for the access and registration of external agents, abstract external agent capability lists, permission constraints, and persona information into a standardized structure body Persona, and form a cross-platform unified agent directory;
[0153] The memory and context kernel module is configured to maintain short-term, medium-term, and long-term hierarchical memories, and store historical tasks, cases, external knowledge, and execution feedbacks;
[0154] The task decomposition and capability arrangement module is configured to decompose a complex task input by a user into a plurality of executable operations.
[0155] The capability routing and SLA scoring module is configured to filter out an optimal capability agent to complete execution of the complex task.
[0156] Optionally, the memory retrieval unit 630 is configured to:
[0157] According to the task instruction, a candidate memory set is obtained by searching a preselected memory bank for memories related to the task instruction.
[0158] According to the candidate memory set and pre-divided memory types, a comprehensive score of each candidate memory is calculated, wherein the memory types include short-term memory, medium-term memory, and long-term memory.
[0159] The formula for calculating the comprehensive score of each candidate memory is represented by the following formula (1):
[0160] (1)
[0161] wherein, represents the number of memory calls; represents the comprehensive score of each candidate memory; represents the memory type weight, short-term = 1.0, medium-term = 0.8, and long-term = 0.6; represents the semantic similarity, ranging from 0 to 1; represents the first weighting coefficient; represents the second weighting coefficient; represents the third weighting coefficient; represents the fourth weighting coefficient, satisfying α+β+γ+δ=1; represents the time decay function; represents the memory credibility, ranging from 0 to 1; represents the difference between the current time and the memory timestamp; q represents the vector representation of the output task instruction or target; represents the i-th candidate memory;
[0162] wherein the number of memory calls is represented by the following formula (2):
[0163] (2)
[0164] wherein, is the 95th significant digit; represents the number of calls within the window;
[0165] According to the comprehensive score of each candidate memory, the candidate memories are ranked in descending order, and the top K candidate memories are selected as the recall result; wherein, the value of K is 5-20.
[0166] Optionally, the calculation formula of the correlation is represented by the following formula (3)
[0167] (3)
[0168] wherein, represents the correlation score of the step node s and the global target or input, and the value range is [0, 1]; represents the first weighted coefficient, represents the second weighted coefficient, which controls the weight of the semantic similarity and the ability matching degree, and satisfies + =1; represents the ability requirement description of the step node s; represents the system ability ontology, a standardized ability type set, which is used to unify the ability labels of different agents; represents the vector representation of the global input or target; represents the semantic vector representation of the candidate step node s, which is obtained by a large model encoder, and is used to calculate the semantic similarity with the global target; represents the semantic similarity function; represents the ability matching function;
[0169] Optionally, the calculation formula of the coverage is represented by the following formula (4):
[0170] (4)
[0171] wherein, represents the coverage of the candidate step node subset; represents the correlation score of the step node s; represents the lower limit threshold of the coverage; represents all possible node subsets; represents the finally selected step node subset; S represents all steps after task decomposition.
[0172] Optionally, the process of filtering out agents without execution qualification by using the feasible region filtering mechanism to obtain the candidate agent set is represented by the following formula (5):
[0173] (5)
[0174] wherein, v represents the task node; F represents the candidate agent set; represents a certain agent a registered in the system; a set of permissions required by a node v; a set of permissions granted to an agent a; a capability requirement description of a task node v; a capability inventory of an agent a.
[0175] Optionally, the selecting an optimal capability agent from the set of candidate agents according to the set of candidate agents by calculating an SLA score comprises:
[0176] calculating four index dimensions based on the set of candidate agents; wherein the four index dimensions comprise: accuracy, latency, cost, and compliance;
[0177] calculating an SLA score according to the four index dimensions and a node-level routing preference in the node;
[0178] wherein the calculation formula of the SLA score is represented by the following formula (6):
[0179] (6)
[0180] wherein, accuracy; latency; cost; compliance; SLA score; a first weight of the node-level routing preference; a second weight of the node-level routing preference; a third weight of the node-level routing preference; a fourth weight of the node-level routing preference.
[0181] Optionally, the calculation process of the accuracy is represented by the following formula (7):
[0182] (7)
[0183] wherein, accuracy; offline benchmark; online running; a fusion weight of the offline or online, taking a value of 0.5;
[0184] wherein, the calculation process of the latency is represented by the following formula (8):
[0185] (8)
[0186] wherein, latency; denotes the original delay statistics in the window t; denotes the maximum delay threshold allowed by the node;
[0187] wherein the cost is calculated by the following formula (9):
[0188] (9)
[0189] wherein, denotes the cost; denotes the unit call cost statistics in the window t; denotes the maximum unit cost threshold allowed by the node;
[0190] wherein the compliance is calculated by the following formula (10):
[0191] (10)
[0192] wherein, denotes the compliance; denotes the violation rate; denotes the violation severity coefficient.
[0193] The embodiment of the application shields platform differences by constructing an identity and registration management module, and uniformly describes agents from different platforms in a standardized structure body Persona. Unified access across platforms and sources is realized, and the information of personas, capabilities and permissions is ensured not to be lost when the agent is migrated. The problems of "data island" and "capability lock" caused by platform fragmentation in the traditional scheme are effectively avoided. The short-term, medium-term and long-term memory and knowledge graph are combined by constructing a memory and context kernel, and rich context support is provided for task decomposition. In the execution process, the system can reuse historical cases and experience to improve the accuracy and personalization of task planning and execution. The memory library can be dynamically updated according to the execution result, so that the system has the ability of continuous learning and self-adaptation. The user instruction or target is converted into a task graph by constructing a task decomposition and capability arrangement module. The correlation and coverage scoring mechanism is adopted to ensure that the planned task graph is simple and covers the target. Through the constraint self-checking mechanism, the unexecutable or high-risk steps are removed to ensure that the output task graph can be landed in engineering. This mechanism breaks through the bottleneck of "single agent task capability is limited and difficult to decompose complex tasks" in the traditional agent system. In the legal candidate set, the four dimensions of accuracy, delay, cost and compliance are scored based on the accuracy, delay, cost and compliance. The node-level routing preference weight is introduced, which can realize customized optimal selection for different task nodes. Single execution, parallel execution and result fusion are supported, and cross-validation and arbitration mechanisms are provided in high-risk tasks, which significantly improves the credibility and robustness of the results. The defects of the traditional method that relies on fixed platforms or single models and cannot dynamically optimize the execution quality are avoided.
[0194] The system constructed by the application can be compatible with active and passive double modes; the system can respond to user's instant instruction (passive mode) and can autonomously plan and execute tasks based on long-term goals or KPI (active mode). In energy consumption management and device predictive maintenance scenarios, the active mode can realize continuous optimization and reduce manual intervention; the embodiment of the application has scalability and universality, and the architecture design of the embodiment of the application is not limited to the digital building scene, but can also be extended to the smart city subfields of safety emergency and digital new energy, and even can be popularized to non-smart city fields, providing unified operating system support for cross-industry agent applications. The embodiment of the application not only solves the problems of platform fragmentation, capability heterogeneity, task decomposition difficulty and uncontrollable execution in the existing agent system, but also realizes unified support for active and passive task modes, has explainability, reproducibility and evolution ability, and can significantly improve the landing value and technical competitiveness of the agent in smart cities and other fields.
[0195] Figure 7 is a structural schematic diagram of a multi-agent oriented task decomposition and capability routing operation device provided by the embodiment of the application, as Figure 7As shown, the multi-agent oriented task decomposition and capability routing operating device can include the above Figure 6 As shown, the multi-agent oriented task decomposition and capability routing operating system. Optionally, the multi-agent oriented task decomposition and capability routing operating device 710 can include a first processor 2001.
[0196] Optionally, the multi-agent oriented task decomposition and capability routing operating device 710 can further include a memory 2002 and a transceiver 2003.
[0197] Wherein, the first processor 2001 is connected with the memory 2002 and the transceiver 2003, such as through a communication bus.
[0198] The following will be described in detail Figure 7 The various components of the multi-agent oriented task decomposition and capability routing operating device 710 will be specifically introduced:
[0199] Wherein, the first processor 2001 is the control center of the multi-agent oriented task decomposition and capability routing operating device 710, which can be a processor or a plurality of processing elements collectively. For example, the first processor 2001 is one or more central processing units (CPU), which can also be an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application, such as one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA).
[0200] Optionally, the first processor 2001 can execute various functions of the multi-agent oriented task decomposition and capability routing operating device 710 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.
[0201] In a specific implementation, as an embodiment, the first processor 2001 can include one or more CPUs, such as the CPU0 and CPU1 shown in Figure 7
[0202] In a specific implementation, as an embodiment, the multi-agent oriented task decomposition and capability routing operating device 710 can also include a plurality of processors, such as Figure 7 The first processor 2001 and the second processor 2004 are shown in the diagram. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0203] The memory 2002 is used to store the software program that executes the present invention, and is controlled by the first processor 2001 to execute it. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.
[0204] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently, and may be operated via the interface circuit of the multi-agent task decomposition and capability routing operating device 710. Figure 7 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0205] The transceiver 2003 is used to communicate with network devices or with terminal devices.
[0206] Alternatively, transceiver 2003 may include a receiver and a transmitter. Figure 7 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.
[0207] Optionally, the transceiver 2003 can be integrated with the first processor 2001 or exist independently, and operate through the interface circuit of the multi-agent task decomposition and capability routing device 710. Figure 7 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0208] It should be noted that, Figure 7 The structure of the multi-agent oriented task decomposition and capability routing operation device 710 shown in the figure does not constitute a limitation on the router, and the actual multi-agent oriented task decomposition and capability routing operation device can include more or fewer components than the figure, or combine certain components, or different component arrangements.
[0209] In addition, the technical effects of the multi-agent oriented task decomposition and capability routing operation device 710 can refer to the technical effects of the multi-agent oriented task decomposition and capability routing operation method described in the above method embodiments, which will not be repeated here.
[0210] It should be understood that the first processor 2001 in the embodiments of the present application can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor.
[0211] It should also be understood that the memory in the embodiments of the present application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. Nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as external cache. By way of example, and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0212] The above-described embodiments can be implemented in whole or in part by software, hardware (such as a circuit), firmware, or any combination thereof. When implemented in software, the above-described embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.
[0213] It should be understood that the term "and / or" herein merely describes an association relationship of associated objects, which means that there can be three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone, where A and B can be singular or plural. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after it, but it can also represent an "and / or" relationship, which can be understood in the context before and after it.
[0214] In the present application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or the like means any combination of the items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
[0215] It should be understood that in various embodiments of the present application, the size of the sequence number of the above-described processes does not mean the order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0216] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0217] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the devices, systems and units described above can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0218] In several embodiments provided by the present application, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be through some interfaces, indirect coupling or communication connection between the systems or units, which can be electrical, mechanical or other forms.
[0219] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0220] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0221] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0222] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A multi-agent oriented task decomposition and capability routing operation method, characterized in that, The method comprises: S1, constructing a multi-agent-oriented task decomposition and capability routing operating system architecture; wherein the architecture comprises: an identity and registration management module, a memory and context kernel module, a task decomposition and capability arrangement module, and a capability routing and SLA scoring module; S2, obtaining a task instruction for solving a sudden situation required by a user in a smart city digital building; inputting the task instruction into the operating system, and completing unified identity registration and generating an agent directory through the interface of the identity and registration management module to access the operating system from the external multi-platform agent; S3, the memory and context kernel module retrieves the memory related to the task instruction through the preselected memory library by using the memory recall mechanism according to the received task instruction, and outputs the recall result; Wherein, the memory and context kernel module of the S3 retrieves the memory related to the task instruction through the preselected memory library by using the memory recall mechanism according to the received task instruction, and outputs the recall result, comprising: S31, according to the task instruction, the candidate memory set is obtained by retrieving the memory related to the task instruction through the preselected memory library; S32, according to the candidate memory set and the pre-divided memory type, the comprehensive score of each candidate memory is calculated; wherein the memory type includes: short-term memory, medium-term memory and long-term memory; Wherein, the formula for calculating the comprehensive score of each candidate memory is represented by the following formula (1): (1) wherein, represents the number of memory recalls; represents the combined score of each candidate memory; represents the memory type weight, short-term = 1.0, medium-term = 0.8, long-term = 0.6; represents the semantic similarity, range [0, 1]; represents the first weighting coefficient; represents the second weighting coefficient; represents the third weighting coefficient; represents the fourth weighting coefficient, satisfying ; represents the time decay function; represents the memory credibility, range [0, 1]; represents the difference between the current time and the memory timestamp; q represents the vector representation of the output task instruction or target; represents the i-th candidate memory; wherein the number of memory call times is represented by the following equation (2): (2) wherein, is a 95th percentile; represents the number of calls within a window. S33, according to the comprehensive score of each candidate memory, each candidate memory is sorted in descending order, and the top K candidate memories are selected as the recall result; wherein the value of K is 5-20; S4, inputting the recall result and the task instruction into the task decomposition and capability arrangement module, generating a candidate task graph through a pre-trained large language model; based on the candidate task graph, the step nodes of the task graph are filtered by calculating the correlation and coverage to obtain a high-quality task graph; wherein the task graph includes: nodes and dependency relationships; Wherein, the calculation formula of the correlation of the S4 is represented by the following formula (3): (3) wherein, represents the relevance score of step node s to the global goal or input, taking value in the range [0, 1]; represents the first weighting coefficient, represents the second weighting coefficient, controlling the weight of semantic similarity and capability matching degree, satisfying + = 1; represents the capability requirement description of step node s; represents the system capability ontology, a standardized set of capability types, used to unify the capability labels of different agents; represents the vector representation of the global input or goal; represents the semantic vector representation of the candidate step node s, obtained by a large model encoder, used to calculate the semantic similarity with the global goal; represents the semantic similarity function; represents the capability matching function; Wherein, the calculation formula of the coverage is represented by the following formula (4): (4) wherein, denotes a coverage of a subset of candidate step nodes; denotes a relevance score of a step node s; denotes a coverage lower threshold value; denotes all possible subsets of step nodes; denotes a final selected subset of step nodes; S denotes all step nodes after task decomposition; S5, inputting the task graph into the capability routing and SLA scoring module, according to the agent directory, using the feasible region filtering mechanism to eliminate the agents without execution qualification, obtaining a candidate agent set; according to the candidate agent set, selecting the optimal capability agent by calculating the SLA score and executing, and outputting the execution result related to the task instruction.
2. The multi-agent oriented task decomposition and capability routing operation method according to claim 1, characterized in that, The identity and registration management module is responsible for the access and registration of external agents, abstracts the external agent capability list, permission constraints and human setup information into a standardized structure Persona, forms a unified agent directory across platforms; Wherein, the memory and context kernel module is used to maintain short-term, medium-term and long-term hierarchical memory, and store historical tasks, cases, external knowledge and execution feedback; Wherein, the task decomposition and capability arrangement module is used to decompose the complex task input by the user into multiple executable operations; The capability routing and SLA scoring module is configured to filter out the intelligent agent with optimal capability to complete the execution of the complex task.
3. The multi-agent oriented task decomposition and capability routing operation method according to claim 1, wherein, The process of filtering out the intelligent agent without execution qualification through the feasible domain filtering mechanism and obtaining the candidate intelligent agent set is represented by the following formula (5): (5) where v represents a task node; F represents a candidate agent set; represents a certain agent a registered in the system; represents a set of permissions required by the node v; represents a set of permissions granted to the agent a; represents the capability requirement description of the task node v; represents the capability list of the agent a.
4. The multi-agent oriented task decomposition and capability routing operation method according to claim 1, wherein, The process of selecting the intelligent agent with optimal capability through the calculation of the SLA score according to the candidate intelligent agent set comprises: The four index dimensions are calculated based on the candidate intelligent agent set, wherein the four index dimensions comprise accuracy, delay, cost and compliance; The SLA score is calculated according to the four index dimensions and the node-level routing preference in the node; The calculation formula of the SLA score is represented by the following formula (6): (6) wherein, represents accuracy; represents latency; represents cost; represents compliance; represents SLA score; represents a first weight for node-level routing preference; represents a second weight for node-level routing preference; represents a third weight for node-level routing preference; represents a fourth weight for node-level routing preference.
5. The multi-agent oriented task decomposition and capability routing operation method according to claim 4, wherein, The calculation process of the accuracy is represented by the following formula (7): (7) wherein, represents accuracy rate; represents offline reference; represents online operation; represents fusion weight of offline or online, and the value is 0.5; The calculation process of the delay is represented by the following formula (8): (8) wherein, denotes a delay; denotes the original latency statistics within the window t; denotes the maximum latency threshold allowed by the node; The calculation formula of the cost is represented by the following formula (9): (9) wherein, represents a cost; represents a unit invocation cost statistic within a window t; represents a maximum unit cost threshold allowed by a node; The calculation formula of the compliance is represented by the following formula (10): (10) wherein, represents compliance; represents violation rate; represents violation severity coefficient.
6. A multi-agent oriented task decomposition and capability routing operating system for implementing the multi-agent oriented task decomposition and capability routing operating method according to any one of claims 1 to 5, characterized in that, The system comprises: A construction unit configured to construct a multi-intelligent agent-oriented task decomposition and capability routing operating system architecture, wherein the architecture comprises an identity and registration management module, a memory and context kernel module, a task decomposition and capability arrangement module, and a capability routing and SLA scoring module; An identity and registration management unit configured to obtain a task instruction for solving a sudden situation required by a user in a smart city digital building, input the task instruction into the operating system, and complete unified identity registration and generate an intelligent agent directory through the interface access of external multi-platform intelligent agents to the operating system. A retrieval memory unit configured to retrieve and output the recall result through the preselected memory library and the memory recall mechanism according to the received task instruction by the memory and context kernel module. A generation unit configured to input the recall result and the task instruction into the task decomposition and capability arrangement module, generate a candidate task graph through a pre-trained large language model, filter the step nodes of the task graph based on the candidate task graph through the calculation of the correlation and coverage, and obtain a high-quality task graph, wherein the task graph comprises nodes and dependency relationships. An output unit configured to input the task graph into the capability routing and SLA scoring module, filter out the intelligent agent without execution qualification through the feasible domain filtering mechanism according to the intelligent agent directory, obtain a candidate intelligent agent set, select the intelligent agent with optimal capability through the calculation of the SLA score according to the candidate intelligent agent set, and output the execution result related to the task instruction.
7. A multi-agent oriented task decomposition and capability routing operation device, characterized by, The multi-intelligent agent-oriented task decomposition and capability routing operating device comprises: A processor; A memory having computer readable instructions stored thereon, wherein the computer readable instructions are executed by the processor to implement the method according to any one of claims 1 to 5.
8. A computer readable storage medium, characterized in that, The computer readable storage medium stores program codes, wherein the program codes can be invoked by the processor to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Large language model training method oriented to city field and city generation type intelligent method and device
CN118760898A
Power transmission and distribution production task cooperation system and method based on intelligent agent
CN120338452A