A multi-agent cooperative control method and system, a terminal and a storage medium
By employing a task allocation strategy based on RAG-memory bidirectional empowerment and the MCP/A2A protocol, the problems of knowledge updating and multi-agent collaborative control in TV voice assistants are solved, enabling plug-and-play functionality of agents and improving the efficiency of long conversations, thereby enhancing the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN COOCAA NETWORK TECH CO LTD
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-31
AI Technical Summary
Existing TV voice assistant technologies have significant shortcomings in terms of slow knowledge updates, multi-agent collaborative control, and long dialogue memory and efficiency. They are unable to proactively absorb user interaction data, have inconsistent agent interfaces, and have limited context windows for long dialogues, leading to forgetting and reasoning delays.
The RAG-memory bidirectional empowerment strategy is used to analyze user behavior logs. Through the bidding-style task allocation and context active management mechanism of the MCP/A2A protocol, multi-agent collaborative control is realized. Personalized recommendation content is generated using a large language model and then comprehensively analyzed.
It accelerated the speed of knowledge updates, enabled plug-and-play multi-agent communication, improved the efficiency of voice control in long dialogue scenarios, and enhanced user experience and business conversion.
Smart Images

Figure CN122493840A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a multi-agent collaborative control method, system, terminal, and storage medium. Background Technology
[0002] Currently, most TV voice assistants on the market are based on a single-turn question-and-answer (QA) model or limited to a fixed domain's interaction framework. These systems typically use predefined rules or finite state machines to respond to user commands; for example, they only support basic operations such as channel switching, volume adjustment, and movie / TV search. Although some more advanced solutions have introduced domain-specific question-and-answer models (such as movie / TV recommendations, weather inquiries, and encyclopedic knowledge), their overall architecture still exhibits obvious "static" and "fragmented" characteristics. Specific shortcomings are manifested in the following three aspects: First, the knowledge base is static and outdated, lacking the ability to continuously learn and absorb scenario-based data. Existing TV voice assistants cannot proactively and continuously absorb the interactive data and behavioral feedback generated by users in diverse scenarios such as watching movies, shopping, and learning. The knowledge base behind them often stops updating after system deployment, resulting in a failure to keep up with information such as newly released film and television content, dynamically changing product information, and real-time updated educational materials. This static knowledge structure makes it difficult for the assistant to adapt to the evolution of users' personalized interests and long-term usage habits, ultimately resulting in rigid answers, inaccurate recommendations, and a gradual decline in user experience.
[0003] Second, the lack of standardized interfaces between multiple intelligent agents leads to low collaboration efficiency. With the enrichment of the TV application ecosystem, specialized intelligent agents with different responsibilities have emerged, such as movie recommendation assistants, customer service assistants, and tutoring assistants. However, these agents are typically developed independently by different teams or based on different technology stacks, resulting in a lack of unified standards for communication protocols, data formats, and API calls. If a user needs to switch services (e.g., from movie advice to educational Q&A), they must reactivate the target agent using a wake word or button press, or even exit the current dialogue interface. This not only creates a fragmented operational experience but also severely restricts the smooth execution of cross-domain collaborative tasks. For example, the complex needs of simultaneously querying product information and obtaining learning suggestions while watching a movie are difficult to meet efficiently.
[0004] Third, the limited context window of large models in long dialogue scenarios leads to forgetting and inference delays. Some advanced TV voice assistants have begun to introduce large language models to improve semantic understanding and generation capabilities, but they face severe context management challenges in actual deployment. Due to the hard limit on the length of the context window of large models (usually a few kilobytes to tens of kilobytes), when users engage in multi-turn, long-duration, or topic-spanning dialogues, early key information is easily truncated or forgotten, causing the model to ask repeated questions, make logical contradictions, or provide answers that deviate from the user's intent. At the same time, as the number of dialogue turns increases, the input sequence that the model needs to process becomes longer and longer, and the overhead of inference computation increases significantly, resulting in a gradual increase in response latency. In scenarios like TVs where real-time performance is critical, this seriously affects the smoothness of interaction.
[0005] In summary, existing TV voice assistant technology has significant shortcomings in handling dynamic knowledge updates, multi-agent collaborative control, long-conversation memory, and efficiency, and the technology needs further improvement. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a multi-agent collaborative control method, system, terminal and storage medium to address the shortcomings of existing technologies, such as slow knowledge updates, multi-agent collaborative control, long dialogue memory and low efficiency.
[0007] The technical solution adopted by this invention to solve the technical problem is as follows: In a first aspect, the present invention provides a multi-agent cooperative control method, comprising: The system acquires user behavior logs generated during movie viewing and analyzes these logs using the RAG-Memory bidirectional empowerment strategy to generate corresponding personalized recommendation content. Obtain user voice control commands, distribute sub-tasks to multiple agents based on the bidding-style task allocation sequence diagram of the MCP / A2A protocol, and obtain content generated collaboratively by multiple agents; Based on the personalized recommended content and the content generated collaboratively by multiple agents, a comprehensive analysis is performed using a context-based active management mechanism to output the final voice control result.
[0008] In one implementation, the step of acquiring user behavior logs generated during movie viewing and analyzing the behavior logs according to the RAG-Memory Bidirectional Empowerment Strategy to generate corresponding personalized recommendation content includes: The user's behavior logs during movie viewing are obtained and then written into the incremental memory pool after vectorization. Knowledge distillation is periodically triggered in the incremental memory pool to generate new indexes and write back the RAG results; The RAG results are used as contextual cue words and input into the incremental memory pool for summary deposition, forming a new memory database; Based on the new memory database, personalized recommendation content corresponding to the behavior log is generated using a large language model.
[0009] In one implementation, the step of periodically triggering knowledge distillation in the incremental memory pool to generate a new index and write back the RAG results includes: Knowledge distillation is triggered based on a scheduled task or an incremental pool size threshold. Unprocessed behavior vectors are read in batches from the incremental memory pool, the large language model is called to perform knowledge distillation, the distilled new index is written into the main index library of the RAG knowledge retrieval machine, and the distillation results are written into the data warehouse as long-term memory.
[0010] In one implementation, the step of obtaining user voice control commands and distributing sub-tasks to multiple agents based on a bidding-style task allocation sequence diagram using the MCP / A2A protocol to obtain content collaboratively generated by multiple agents includes: Obtain the user's voice control command; Based on the A2A protocol, the master control agent broadcasts task bidding information and submits bids to the movie assistant agent and the IoT assistant agent respectively based on cost / confidence information; Based on the bidding results, the main control agent distributes sub-tasks to the corresponding agents. The task processing results of each agent are summarized using a large language model to obtain the content generated collaboratively by the multi-agent system.
[0011] In one implementation, the step of distributing sub-tasks to corresponding agents using the master agent based on the bidding results includes: The compiled list of bids is sent to the main control agent, and a comprehensive evaluation strategy based on confidence weight, speed penalty weight, and cost weight is used for evaluation. Based on the evaluation scores, a winning agent is selected for each task, and sub-tasks and task execution instructions are distributed to the corresponding agent. After each agent executes its task, the execution result is returned to the master agent asynchronously or synchronously via the A2A protocol, so that the master agent can feed the execution result back to the large language model for aggregation.
[0012] In one implementation, the step of comprehensively analyzing the personalized recommended content and the multi-agent collaboratively generated content using a context-based active management mechanism to output the final voice control result includes: Based on the personalized recommendation content and the content generated collaboratively by the multi-agent, short-term memory and long-term memory are loaded, a preliminary natural language response draft is generated through context retrieval, and context information after the summary is generated through context enhancement and token control strategies. The summarized contextual information is input into a large language model, a structured speech command is forced to be output, and the final speech control result is broadcast using the user's personal voice.
[0013] In one implementation, the step of generating a preliminary natural language response draft through context retrieval and generating the summarized context information through context enhancement and token control strategies includes: The personalized recommendation content, the content generated collaboratively by multiple agents, the short-term memory, and the long-term memory are concatenated to form the original context. The corresponding background knowledge is supplemented from the vector database by a retrieval enhancement generation strategy, and the large language model is called to generate the preliminary natural language response draft. The total token of the original context and the initial natural language response draft is detected, and context summarization processing is triggered based on the detection result; The core intent is preserved, the recommendation list is compressed, and redundant task results are merged to obtain the context information after the summary.
[0014] In a second aspect, the present invention provides a multi-agent cooperative control system, comprising: The RAG-Memory Bidirectional Empowerment Module is used to acquire user behavior logs generated during movie watching, and analyze the behavior logs according to the RAG-Memory Bidirectional Empowerment Strategy to generate corresponding personalized recommendation content. The bidding-style task allocation module is used to obtain user voice control commands and distribute sub-tasks to multiple agents based on the bidding-style task allocation sequence diagram of the MCP protocol / A2A protocol, so as to obtain content generated collaboratively by multiple agents. The context active management module is used to perform comprehensive analysis based on the personalized recommended content and the content generated collaboratively by the multi-agent, and output the final voice control result.
[0015] Thirdly, the present invention provides a terminal, comprising: a processor and a memory, wherein the memory stores a multi-agent cooperative control program, and the multi-agent cooperative control program, when executed by the processor, is used to implement the operation of the multi-agent cooperative control method as described in the first aspect.
[0016] Fourthly, the present invention also provides a computer-readable storage medium storing a multi-agent cooperative control program, which, when executed by a processor, is used to implement the operation of the multi-agent cooperative control method as described in the first aspect.
[0017] The present invention, by employing the above technical solution, has the following effects: This invention accelerates the knowledge update speed of voice assistants by re-accumulating retrieval results into long memory and updating the index in reverse through a RAG-memory bidirectional empowerment closed loop. Furthermore, it achieves plug-and-play multi-agent operation on the TV side by using a bidding-style task allocation and context-active management strategy based on MCP / A2A. By utilizing selective loading and intelligent summarization context-active management, it breaks through the embedded context length bottleneck and improves the efficiency of multi-agent collaborative control and voice control in long dialogue scenarios. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0019] Figure 1 This is a flowchart of the multi-agent cooperative control method in this invention.
[0020] Figure 2 This is the overall framework diagram of the multi-agent cooperative control system in this invention.
[0021] Figure 3 This is a flowchart of the RAG-memory bidirectional empowerment process in this invention.
[0022] Figure 4 This is the timing diagram for the MCP / A2A bidding-style task allocation in this invention.
[0023] Figure 5 This is a schematic diagram of the context active management mechanism in this invention.
[0024] Figure 6 This is a functional schematic diagram of the terminal in one implementation of the present invention.
[0025] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0027] Exemplary methods Existing TV voice assistant technology still has the following three shortcomings: First, the knowledge base is static and outdated, lacking the ability to continuously learn and absorb scenario-based data. Existing TV voice assistants cannot proactively and continuously absorb the interactive data and behavioral feedback generated by users in diverse scenarios such as watching movies, shopping, and learning. The knowledge base behind them often stops updating after system deployment, resulting in a failure to keep up with information such as newly released film and television content, dynamically changing product information, and real-time updated educational materials. This static knowledge structure makes it difficult for the assistant to adapt to the evolution of users' personalized interests and long-term usage habits, ultimately resulting in rigid answers, inaccurate recommendations, and a gradual decline in user experience.
[0028] Second, the lack of standardized interfaces between multiple intelligent agents leads to low collaboration efficiency. With the enrichment of the TV application ecosystem, specialized intelligent agents with different responsibilities have emerged, such as movie recommendation assistants, customer service assistants, and tutoring assistants. However, these agents are typically developed independently by different teams or based on different technology stacks, resulting in a lack of unified standards for communication protocols, data formats, and API calls. If a user needs to switch services (e.g., from movie advice to educational Q&A), they must reactivate the target agent using a wake word or button press, or even exit the current dialogue interface. This not only creates a fragmented operational experience but also severely restricts the smooth execution of cross-domain collaborative tasks. For example, the complex needs of simultaneously querying product information and obtaining learning suggestions while watching a movie are difficult to meet efficiently.
[0029] Third, the limited context window of large models in long dialogue scenarios leads to forgetting and inference delays. Some advanced TV voice assistants have begun to introduce large language models to improve semantic understanding and generation capabilities, but they face severe context management challenges in actual deployment. Due to the hard limit on the length of the context window of large models (usually a few kilobytes to tens of kilobytes), when users engage in multi-turn, long-duration, or topic-spanning dialogues, early key information is easily truncated or forgotten, causing the model to ask repeated questions, make logical contradictions, or provide answers that deviate from the user's intent. At the same time, as the number of dialogue turns increases, the input sequence that the model needs to process becomes longer and longer, and the overhead of inference computation increases significantly, resulting in a gradual increase in response latency. In scenarios like TVs where real-time performance is critical, this seriously affects the smoothness of interaction.
[0030] In summary, existing TV voice assistant technology has significant shortcomings in handling dynamic knowledge updates, multi-agent collaborative control, long-conversation memory, and efficiency, and the technology needs further improvement.
[0031] To address the above technical issues, this invention provides a multi-agent collaborative control method. The method includes: acquiring user behavior logs generated during movie viewing, analyzing the behavior logs according to a RAG-memory bidirectional empowerment strategy, and generating corresponding personalized recommendation content; acquiring user voice control commands, distributing sub-tasks to multiple agents based on a bidding-style task allocation sequence diagram using the MCP / A2A protocol, and obtaining multi-agent collaboratively generated content; and performing comprehensive analysis based on the personalized recommendation content and the multi-agent collaboratively generated content using a context-active management mechanism to output the final voice control result. This invention accelerates the knowledge update speed of the voice assistant through a RAG-memory bidirectional empowerment closed-loop approach, and improves the efficiency of multi-agent collaborative control and voice control in long dialogue scenarios based on the MCP / A2A bidding-style task allocation and context-active management strategy.
[0032] like Figure 1 As shown, this embodiment of the invention provides a multi-agent cooperative control method, including the following steps: Step S100: Obtain the user's behavior logs generated during movie viewing, and analyze the behavior logs according to the RAG-Memory bidirectional empowerment strategy to generate corresponding personalized recommendation content.
[0033] In this embodiment, by using "RAG-memory" bidirectional empowerment, the MCP / A2A open protocol, and the context active management strategy, a multi-agent collaborative control system that becomes smarter with use, is plug-and-play, and supports ultra-long dialogues can be built on the TV, which can significantly improve user experience and business conversion.
[0034] like Figure 2 As shown, the multi-agent cooperative control system provided in this embodiment includes: TV SoC, RAG-Memory Dual Engine, Intelligent Agent Bus (MCP / A2A), Context Active Manager, Peripherals (Camera, Speaker, EPG).
[0035] Based on the aforementioned multi-agent collaborative control system, in this embodiment, during the RAG-memory bidirectional empowerment process, the behavior logs generated by the user during movie watching are analyzed in real time according to the RAG-memory bidirectional empowerment strategy to generate corresponding personalized recommendation content, so as to absorb user movie watching, shopping, education and other scenario data and realize dynamic updates of the knowledge base.
[0036] Specifically, in one implementation of this embodiment, step S100 includes the following steps: Step S101: Obtain the behavior log generated by the user while watching the movie, and write the behavior log into the incremental memory pool after vectorization processing. Step S102: Periodically trigger knowledge distillation in the incremental memory pool to generate new indexes and write back the RAG results; In one implementation of this embodiment, step S102 includes the following steps: Step S102a: Based on a scheduled task or an incremental pool size threshold, knowledge distillation is triggered. Unprocessed behavior vectors are read in batches from the incremental memory pool, the large language model is called to perform knowledge distillation, the distilled new index is written into the main index library of the RAG knowledge retrieval machine, and the distillation result is written into the data warehouse as long-term memory.
[0037] Specifically, in one implementation of this embodiment, step S100 further includes the following steps: Step S103: The RAG results are input into the incremental memory pool as contextual prompts for summary deposition, forming a new memory database; Step S104: Based on the new memory database, generate personalized recommendation content corresponding to the behavior log using a large language model.
[0038] In this embodiment, when a user is watching a movie, the system acquires the user's behavior during the viewing process. For example, the user enters filter criteria in an input box or clicks a "button" (such as like / dislike, favorite, or viewing duration). Afterward, the system collects behavioral data such as viewing progress, pause / fast forward, repeated viewing of segments, ratings, tags, comments, and sharing.
[0039] After collecting this behavioral data, the video tool module is called to convert each behavioral log into a text description, and a vector is generated by calling the Embedding model through the newly added memory Embedding component. Then, the vector and its metadata are written to the incremental memory pool (which can be regarded as short-term memory, a temporary collection stored in Redis or a vector database). On the first write, the update cache mechanism is triggered to improve the subsequent read and write speed.
[0040] In the incremental memory pool, knowledge distillation is triggered by a timed task (e.g., every 15 minutes) or an incremental pool size threshold (e.g., 500 entries). During this process, the agent reads unprocessed behavior vectors in batches from the incremental memory pool, and then calls LLM (Large Language Model) to perform knowledge distillation, clustering similar behaviors, extracting common preferences, and generating structured knowledge fragments. After knowledge distillation is complete, the newly distilled indexes (e.g., user profile vectors, preference keywords) are written to the main index of the RAG knowledge retrieval system. Simultaneously, the distillation results are written to the data warehouse as long-term memory. By refreshing the retrieval cache, the new knowledge becomes effective immediately. Finally, the RAG knowledge retrieval system returns a successful write status, and the agent records the distillation log.
[0041] In this embodiment, after generating a new index through knowledge distillation and writing back to the RAG, the RAG retrieval results are then used as context prompts and input into the memory pool for summary deposition. The specific method is as follows: In the RAG knowledge retrieval system, top-K knowledge fragments are retrieved based on the user's current request. The retrieved fragments, combined with the recommendation reasons generated by LLM, are combined into a context summary. Then, the agent calls the tool module, inputting the context summary as a prompt into the LLM, requesting the generation of a short text (e.g., "The user is interested in hard science fiction and family themes and has a high acceptance of films longer than 2.5 hours"). The summary is then vectorized and written into the incremental memory pool (forming a new short-term memory). If the summary conflicts with existing long-term memory, the update or deletion module is called to correct it. In this way, each RAG interaction can feed back into the memory pool, making the memory pool not just a raw log, but containing high-value information after reasoning.
[0042] In this embodiment, a closed loop of "use-accumulation-re-retrieval" is formed through the RAG-memory bidirectional empowerment method (i.e., user behavior → memory pool → RAG knowledge base → recommendation results → user feedback → re-entering the memory pool), which significantly improves the accuracy of personalized recommendations; as the number of cycles increases, the knowledge retrieved by RAG becomes closer and closer to the user's deep preferences.
[0043] like Figure 1 As shown, this embodiment of the invention provides a multi-agent cooperative control method, including the following steps: Step S200: Obtain user voice control commands, distribute sub-tasks to multiple agents based on the bidding-style task allocation sequence diagram of the MCP protocol / A2A protocol, and obtain content generated collaboratively by multiple agents.
[0044] In this embodiment, after analyzing user behavior logs based on the RAG-memory bidirectional empowerment strategy, sub-tasks are distributed to multiple agents based on a bidding-style task allocation sequence diagram using the MCP / A2A protocol. During this process, the user initiates natural language commands, and the ASR engine converts speech into text. The system's master agent is responsible for intent decomposition, task list generation, bidding, evaluation, and result summarization. The MCP protocol (Multi-Agent Communication Protocol) defines a standardized message format for bidding / tendering / evaluation, and the A2A protocol (Agent-to-Agent Protocol) is used for broadcasting bidding, tender responses, and sub-task distribution. Finally, a large language model is used to summarize the results of multiple sub-tasks in natural language, and the summary results are broadcast using the user's personal voice.
[0045] Specifically, in one implementation of this embodiment, step S200 includes the following steps: Step S201: Obtain the user's voice control command; Step S202: Based on the A2A protocol, the master control agent broadcasts task bidding information and submits bids to the movie assistant agent and IoT assistant agent respectively based on cost / confidence information; Step S203: Based on the bidding results, distribute sub-tasks to the corresponding intelligent agents using the main control intelligent agent; In one implementation of this embodiment, step S203 includes the following steps: Step S203a: The summarized bid list is sent to the main control agent, and the bids are evaluated using a comprehensive evaluation strategy based on confidence weight, speed penalty weight, and cost weight. Step S203b: Select the winning agent for each task based on the evaluation score, and distribute the sub-task and task execution instructions to the corresponding agent; Step S203c: After each agent executes its task, the execution result is returned to the master agent asynchronously or synchronously via the A2A protocol, so that the master agent can feed back the execution result to the large language model for aggregation.
[0046] Specifically, in one implementation of this embodiment, step S200 further includes the following steps: Step S204: Summarize the task processing results of each agent using a large language model to obtain the content generated collaboratively by the multi-agents.
[0047] In this embodiment, user voice input is acquired, such as "Find me a sci-fi movie and turn off the lights." Then, the speech is converted to text using an ASR engine and sent to the main control agent. The main control agent invokes internal intent decomposition (which can be based on LLM or rules) to identify two independent intents: Intent A: Recommend a sci-fi movie; Intent B: Turn off the lights. Based on the decomposed intents, a task list is generated: Task 1: Search and recommend sci-fi movies (requires film knowledge); Task 2: Control the lights to turn off (requires IoT device control). Finally, the task list is returned to the main control agent to prepare for the bidding stage.
[0048] During the task bidding phase of the main control agent broadcasting, the task list is encapsulated into a tender document (RFP, Request for Proposal), which includes: tender ID, task list (each task has a type label, input parameters, and expected output format), bid deadline (millisecond level, such as 500ms), and evaluation weight preference (e.g., speed priority, accuracy priority).
[0049] After the broadcast task is tendered, the movie assistant, IoT assistant, and other registered smart agents (such as the weather assistant) receive the broadcast. Each smart agent determines for itself whether it can complete the task.
[0050] For example, the film and television assistant evaluation task T1: Skill matching: High (has access to movie database); Estimated response time: 200ms; Confidence level: 0.95; Cost (computing power / API consumption): Low; Generate a tender document for a video editing assistant.
[0051] IoT Assistant Evaluation Task T2: Skill matching: High (connected to the home hub); Estimated response time: 150ms; Confidence level: 0.99 (high certainty in turning off the lights); Cost: Extremely low; Generate an IoT assistant tender document.
[0052] Assuming the weather assistant believes it is not a match and therefore does not bid, the smart speaker assistant believes it can partially complete T1 (confidence level 0.3) and can choose to bid or not.
[0053] All bids received by the deadline are aggregated in the MCP Manager.
[0054] The MCP manager submits the compiled bid list to the main control agent's evaluation engine. The evaluation strategy is as follows: Overall score = (confidence × confidence weight) - (est_time_ms / max_time) × speed penalty weight - cost × cost weight; for example: confidence weight 0.6, speed weight 0.3, cost weight 0.1.
[0055] In the master control agent, the winning agent is selected for each task: T1 Movie Assistant (score 0.88); T2 IoT Assistant (score 0.96). If no agent bids or the score is too low, the master control agent can downgrade to call its own capabilities or LLM to handle the task directly.
[0056] For the winning agents, the master agent distributes sub-tasks to each winning agent through the A2A protocol and sends task execution instructions; after each agent executes the task, it returns the execution result to the master agent asynchronously or synchronously through the A2A protocol.
[0057] After the master agent receives the task execution results from each winning agent, it sends the results and the original user request to the LLM. After the LLM generates a summary text, it sends the summary text to the TTS engine through the master agent, carrying the user's personal voice identifier for voice broadcast.
[0058] like Figure 1 As shown, this embodiment of the invention provides a multi-agent cooperative control method, including the following steps: Step S300: Based on the personalized recommended content and the content generated collaboratively by the multi-agent, a comprehensive analysis is performed using a context-active management mechanism to output the final voice control result.
[0059] In this embodiment, personalized recommended content and multi-agent collaboratively generated content (task execution results) are managed in a unified context. Through proactive token control, summary compression, and structured output, a natural, accurate voice control result that matches the user's personal voice is finally generated.
[0060] Specifically, in one implementation of this embodiment, step S300 includes the following steps: Step S301: Based on the personalized recommendation content and the multi-agent collaboratively generated content, load short-term memory and long-term memory, generate a preliminary natural language response draft through context retrieval, and generate the context information after the summary through context enhancement and token control strategies; In one implementation of this embodiment, step S301 includes the following steps: Step S301a: The personalized recommendation content, the multi-agent collaboratively generated content, the short-term memory, and the long-term memory are concatenated into the original context. Step S301b: Supplement the corresponding background knowledge from the vector database by using the retrieval enhancement generation strategy, and call the large language model to generate the preliminary natural language response draft; Step S301c: Detect the total token of the original context and the preliminary natural language response draft, and trigger context summarization processing based on the detection result; Step S301d: Retain the core intent, compress the recommendation list, and merge redundant task results to obtain the context information after the summary.
[0061] Step S302: Input the summarized context information into the large language model, force the output of structured speech commands, and use the user's personal voice to broadcast the final voice control result.
[0062] In this embodiment, personalized recommendation content is generated through a RAG-memory bidirectional empowerment closed loop. This personalized recommendation content includes a structured recommendation list and a user preference summary. Multi-agent collaboratively generated content is obtained through MCP / A2A bidding task allocation. This multi-agent collaboratively generated content includes the execution results of each subtask and execution logs. The personalized recommendation content and the multi-agent collaboratively generated content are comprehensively analyzed using a context-active management mechanism. The specific process is as follows: First, load short-term and long-term memory: Short-term memory: historical interactions in the current session (commands the user just gave, last recommendation feedback); Long-term memory: Retrieve historical preferences related to the current user and the current scene from the vector database (e.g., movie viewing records and lighting control habits over the past week). Incremental memory: New preference changes generated by this interaction (such as a user's silence or like on the recommendation result) are written in real time and updated to the vector library through embedding.
[0063] Then, the personalized recommendation content, multi-agent results, and short-term / long-term memory are concatenated into the original context, and relevant background knowledge (such as movie synopsis and lighting equipment status) is supplemented from the vector database using RAG. Finally, LLM is invoked to generate a preliminary natural language response draft.
[0064] Finally, the context after the summary is input into LLM again, forcing the output of structured speech commands, and simultaneously outputting action confirmation. After confirmation, the final voice control result is broadcast using the user's personal voice.
[0065] In this embodiment, after each broadcast, the results of the comprehensive analysis (whether the user interrupted or asked the same question repeatedly) can be written into the vector database as incremental memory to further update the user's short-term / long-term memory.
[0066] like Figure 3 As shown, as an example, in the actual application scenario of this embodiment, the RAG-memory bidirectional empowerment process includes the following steps: Step S10: A behavior log is generated when the user watches the movie; Step S20: The log is vectorized and written to the incremental memory pool; Step S30: The memory pool periodically triggers knowledge distillation to generate new indexes and write them back to RAG; Step S40: The RAG search results are then used as context prompts and input into the memory pool for summary accumulation. Step S50 forms a closed loop of use-accumulation-re-retrieval, which improves the accuracy of personalized recommendations by ≥22%.
[0067] like Figure 4 As shown, as an example, in the actual application scenario of this embodiment, the MCP / A2A bidding-style task allocation process includes the following steps: Step S1: The user says, "Find me a sci-fi movie and turn off the lights." Step S2: The main control agent broadcasts a task tender (A2A protocol). Step S3: Bids are submitted for the video assistant and the IoT assistant respectively (including cost / confidence level). Step S4: The main controller distributes sub-tasks according to the evaluation strategy; Step S5: After summarizing the results, they are uniformly broadcast by individual voice TTS.
[0068] like Figure 5 As shown, as an example, in the actual application scenario of this embodiment, the principle of the context active management mechanism is as follows: When the long dialogue window contains more than 8,000 tokens, the selective loading module trims the history in two dimensions: importance and timeliness. The intelligent summary module generates a summary of less than 400 tokens, enabling window looping and inference latency of less than 120 ms.
[0069] This embodiment enables the knowledge base to be automatically updated weekly based on the above method, without the need for manual maintenance; moreover, the insertion and removal time of heterogeneous intelligent agents is less than 5 minutes, with zero code modification; in long dialogue scenarios with 8k+ tokens, the word loss rate is less than 0.5%, and the average response time is 600 ms.
[0070] Based on the technical solution provided in this embodiment, the solution can be improved or replaced according to actual needs: 1) Deploy the RAG-Memory closed loop to the cloud, with the TV serving only as a lightweight client; 2) Replace A2A bidding protocols with Function Calling as a low-cost workaround; 3) The summary module has been changed to a sliding Differential Window.
[0071] All the above-mentioned improvements or replacements should fall within the protection scope of the embodiments of this invention.
[0072] This embodiment achieves the following technical effects through the above technical solution: This invention, through a RAG-memory bidirectional empowerment closed loop, re-accumulates retrieval results into long memory and updates the index in reverse, accelerating the knowledge update speed of the voice assistant; and based on the MCP / A2A bidding-style task allocation and context active management strategy, it realizes plug-and-play multi-agent operation on the TV side, and utilizes selective loading and intelligent summary context active management to break through the embedded context length bottleneck, improving the efficiency of multi-agent collaborative control and voice control in long dialogue scenarios.
[0073] Exemplary device Based on the above embodiments, the present invention also provides a multi-agent cooperative control system, comprising: The RAG-Memory Bidirectional Empowerment Module is used to acquire user behavior logs generated during movie watching, and analyze the behavior logs according to the RAG-Memory Bidirectional Empowerment Strategy to generate corresponding personalized recommendation content. The bidding-style task allocation module is used to obtain user voice control commands and distribute sub-tasks to multiple agents based on the bidding-style task allocation sequence diagram of the MCP protocol / A2A protocol, so as to obtain content generated collaboratively by multiple agents. The context active management module is used to perform comprehensive analysis based on the personalized recommended content and the content generated collaboratively by the multi-agent, and output the final voice control result.
[0074] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 6 As shown.
[0075] The terminal includes: a processor, a memory, an interface, a display screen, and a communication module connected via a system bus; wherein, the processor of the terminal provides computing and control capabilities; the memory of the terminal includes a computer-readable storage medium and internal memory; the computer-readable storage medium stores an operating system and computer programs; the internal memory provides an environment for the operation of the operating system and computer programs in the computer-readable storage medium; the interface is used to connect to external devices; the display screen is used to display relevant information; and the communication module is used to communicate with a cloud server or other devices.
[0076] When executed by a processor, this computer program is used to implement the operation of a multi-agent cooperative control method.
[0077] It will be understood by those skilled in the art that Figure 6 The schematic diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0078] In one embodiment, a terminal is provided, comprising: a processor and a memory, the memory storing a multi-agent cooperative control program, which, when executed by the processor, is used to implement the operation of the multi-agent cooperative control method as described above.
[0079] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a multi-agent cooperative control program, which, when executed by a processor, is used to implement the operation of the multi-agent cooperative control method described above.
[0080] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, database, or other media used in the embodiments provided by this invention can include both non-volatile and volatile memory.
[0081] In summary, this invention provides a multi-agent collaborative control method, system, terminal, and storage medium, comprising: acquiring user behavior logs generated during movie viewing, analyzing the behavior logs according to a RAG-memory bidirectional empowerment strategy, and generating corresponding personalized recommendation content; acquiring user voice control commands, distributing sub-tasks to multiple agents based on a bidding-style task allocation sequence diagram using the MCP / A2A protocol, and obtaining multi-agent collaboratively generated content; and performing comprehensive analysis based on the personalized recommendation content and the multi-agent collaboratively generated content using a context-active management mechanism to output the final voice control result. This invention accelerates the knowledge update speed of the voice assistant through a RAG-memory bidirectional empowerment closed loop, and improves the efficiency of multi-agent collaborative control and voice control in long dialogue scenarios based on the MCP / A2A bidding-style task allocation and context-active management strategy.
[0082] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A multi-agent cooperative control method, characterized in that, include: The system acquires user behavior logs generated during movie viewing and analyzes these logs using the RAG-Memory bidirectional empowerment strategy to generate corresponding personalized recommendation content. Obtain user voice control commands, distribute sub-tasks to multiple agents based on the bidding-style task allocation sequence diagram of the MCP / A2A protocol, and obtain content generated collaboratively by multiple agents; Based on the personalized recommended content and the content generated collaboratively by multiple agents, a comprehensive analysis is performed using a context-based active management mechanism to output the final voice control result.
2. The multi-agent cooperative control method according to claim 1, wherein, The process of acquiring user behavior logs during movie viewing and analyzing these logs according to the RAG-Memory Bidirectional Empowerment Strategy to generate corresponding personalized recommendations includes: The user's behavior logs during movie viewing are obtained and then written into the incremental memory pool after vectorization. Knowledge distillation is periodically triggered in the incremental memory pool to generate new indexes and write back the RAG results; The RAG results are used as contextual cue words and input into the incremental memory pool for summary deposition, forming a new memory database; Based on the new memory database, personalized recommendation content corresponding to the behavior log is generated using a large language model.
3. The multi-agent cooperative control method according to claim 2, wherein, The process of periodically triggering knowledge distillation in the incremental memory pool to generate new indexes and write back the RAG results includes: Knowledge distillation is triggered based on a scheduled task or an incremental pool size threshold. Unprocessed behavior vectors are read in batches from the incremental memory pool, the large language model is called to perform knowledge distillation, the distilled new index is written into the main index library of the RAG knowledge retrieval machine, and the distillation results are written into the data warehouse as long-term memory.
4. The multi-agent collaborative control method of claim 1, wherein, The process of acquiring user voice control commands and distributing sub-tasks to multiple agents based on a bidding-style task allocation sequence diagram using the MCP / A2A protocol to obtain content collaboratively generated by multiple agents includes: Obtain the user's voice control command; Based on the A2A protocol, the master control agent broadcasts task bidding information and submits bids to the movie assistant agent and the IoT assistant agent respectively based on cost / confidence information; Based on the bidding results, the main control agent distributes sub-tasks to the corresponding agents. The task processing results of each agent are summarized using a large language model to obtain the content generated collaboratively by the multi-agent system.
5. The multi-agent cooperative control method according to claim 4, wherein, The step of distributing sub-tasks to corresponding agents using the master control agent based on the bidding results includes: The compiled list of bids is sent to the main control agent, and a comprehensive evaluation strategy based on confidence weight, speed penalty weight, and cost weight is used for evaluation. Based on the evaluation scores, a winning agent is selected for each task, and sub-tasks and task execution instructions are distributed to the corresponding agent. After each agent executes its task, the execution result is returned to the master agent asynchronously or synchronously via the A2A protocol, so that the master agent can feed the execution result back to the large language model for aggregation.
6. The multi-agent collaborative control method of claim 1, wherein, The process involves comprehensively analyzing the personalized recommended content and the content generated collaboratively by multiple agents, utilizing a context-based active management mechanism, and outputting the final voice control result, including: Based on the personalized recommendation content and the content generated collaboratively by the multi-agent, short-term memory and long-term memory are loaded, a preliminary natural language response draft is generated through context retrieval, and context information after the summary is generated through context enhancement and token control strategies. The summarized contextual information is input into a large language model, a structured speech command is forced to be output, and the final speech control result is broadcast using the user's personal voice.
7. The multi-agent cooperative control method according to claim 6, wherein, The process of generating a preliminary natural language response draft through context retrieval and generating a summary using context enhancement and token control strategies includes the following contextual information: The personalized recommendation content, the content generated collaboratively by multiple agents, the short-term memory, and the long-term memory are concatenated to form the original context. The corresponding background knowledge is supplemented from the vector database by a retrieval enhancement generation strategy, and the large language model is called to generate the preliminary natural language response draft. The total token of the original context and the initial natural language response draft is detected, and context summarization processing is triggered based on the detection result; The core intent is preserved, the recommendation list is compressed, and redundant task results are merged to obtain the context information after the summary.
8. A multi-agent cooperative control system, characterized by, include: The RAG-Memory Bidirectional Empowerment Module is used to acquire user behavior logs generated during movie watching, and analyze the behavior logs according to the RAG-Memory Bidirectional Empowerment Strategy to generate corresponding personalized recommendation content. The bidding-style task allocation module is used to obtain user voice control commands and distribute sub-tasks to multiple agents based on the bidding-style task allocation sequence diagram of the MCP protocol / A2A protocol, so as to obtain content generated collaboratively by multiple agents. The context active management module is used to perform comprehensive analysis based on the personalized recommended content and the content generated collaboratively by the multi-agent, and output the final voice control result.
9. A terminal, characterized by comprising: include: The processor and memory, wherein the memory stores a multi-agent cooperative control program, which, when executed by the processor, is used to implement the operation of the multi-agent cooperative control method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a multi-agent cooperative control program, which, when executed by a processor, is used to implement the operation of the multi-agent cooperative control method as described in any one of claims 1-7.