Multi-agent-based training data generation method and server

By generating training data collaboratively through multiple agents and utilizing global session context and directed acyclic graphs, the problem of low efficiency and difficulty in guaranteeing the quality of training data generation in existing technologies is solved, achieving efficient and automated training data generation that adapts to the diversity and complexity of television service scenarios.

CN122045810APending Publication Date: 2026-05-15JUHAOKAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JUHAOKAN TECH CO LTD
Filing Date
2025-12-30
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively integrate multimodal information from television business scenarios when generating training data, resulting in training data that lacks scenario authenticity and contextual coherence. Furthermore, manual annotation is inefficient and of questionable quality.

Method used

A multi-agent-based training data generation method is adopted, which generates a global session context through a planning agent and utilizes directed acyclic graphs and multi-agent collaboration, including generative, processing and evaluation agents, to automatically generate and optimize training data, ensuring the logical consistency and quality of the data.

Benefits of technology

It improves the efficiency and quality of training data generation, can adapt to complex and ever-changing television business scenarios, reduces manual intervention, enhances the automation and controllability of data, and ensures the consistency between generated data and real user interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122045810A_ABST
    Figure CN122045810A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multi-agent-based training data generation method and a server. Automatic construction of training data in a television interaction scene is realized through a multi-agent cooperation mechanism, and in the construction process, by introducing a task flow arrangement structure of a directed acyclic graph, it is ensured that all agents execute tasks according to a preset logic sequence, redundancy and conflicts are avoided, and the data generation efficiency is improved. Through the constraint of the context of the sub-session, the context consistency of each agent in a local task is ensured, information diffusion and deviation accumulation in a multi-workflow parallel scene are prevented, and the generation effect of the training data is improved on the basis of ensuring the generation efficiency of the training data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of training data generation technology, and in particular to a training data generation method and server based on multi-agent systems. Background Technology

[0002] Model training relies on a large amount of labeled multi-turn dialogue data. Diverse multi-turn dialogue data can be used to conduct supervised training, thereby effectively adjusting model parameters and improving training performance. However, data labeling largely depends on manual annotation.

[0003] Manually labeled data involves professionals recording the TV interface status through screenshots, screen recordings, etc., and then manually writing dialogue content using tables. This can improve the accuracy of data labeling, but it is inefficient and relies on the subjective judgment of professionals. When the amount of data is large and the subjective judgment of different professionals varies, it is difficult to ensure the consistency and scalability of a large amount of training data.

[0004] To improve the efficiency of training data annotation, generative large models can be used to automatically generate and annotate dialogue content. However, relying solely on generative large models is limited by the model's parameters and architecture, making it difficult to fully integrate dialogue-related scene information. This means it is difficult to guarantee the correlation between the generated dialogue data and the visuals, resulting in low-quality training data that cannot adapt to complex and ever-changing television business scenarios. Summary of the Invention

[0005] This application provides a training data generation method and server based on multi-agent systems to solve the problem that training data generated by generative large models cannot adapt to complex and ever-changing television service scenarios.

[0006] In a first aspect, embodiments of this application provide a method for generating training data based on multiple agents, including: Upon receiving a training data generation task, a global session context is generated through a planning agent; the global session context is used to maintain the task execution flow of the training data generation task. The planning agent creates a data generation workflow and sub-session contexts of the data generation workflow based on the global session context; the data generation workflow includes multiple work nodes; wherein, the data structure of the sub-session context is the same as the data structure of the global session context; the sub-session context includes a context identifier, which is used to distinguish different data generation workflows; The data generation workflow is encapsulated into a directed acyclic graph based on the sub-session context; the directed acyclic graph includes multiple task packages corresponding to the work nodes and the context relationships of the multiple task packages; the task packages and the work nodes have a mapping relationship; the context relationships of the multiple task packages are determined according to the sub-session context; Load the multiple task packages in the directed acyclic graph into the corresponding agent queues; The training data generation task is performed by generative agents, processing agents, and evaluation agents based on task packages with the same context identifier in the corresponding queues. If the evaluation metrics of the training data output by the evaluative agent reach the expected value, the training data generated based on the task package with the same context identifier is stored.

[0007] In this way, the task execution flow is uniformly maintained through a global session context, ensuring the orderliness and overall controllability of task execution. Sub-session contexts and context identifiers are used to associate work nodes within the same workflow, ensuring logical consistency of task packages during distribution and execution. The directed acyclic graph structure clearly expresses the dependencies and order between tasks, avoiding loops or conflicts during execution and improving system efficiency and reliability. Multi-agent collaboration enables adaptation to complex data generation tasks and automatically stores data when the evaluation results meet expectations, enhancing the automation and quality control of the training data generation process.

[0008] In some feasible implementations, upon receiving a training data generation task, a global session context is generated through a planning agent, specifically including: The training data generation task is analyzed to determine the task theme, task round, query type corresponding to the task round, and task execution logic.

[0009] A global task package is encapsulated based on the task topic, task round, query type corresponding to the task round, and task execution logic.

[0010] A global session context is generated based on a global task package by a planning agent.

[0011] In this way, by analyzing the training data to generate tasks, key information such as the task theme, rounds, query type, and execution logic are clarified, making the task objectives specific and structured. Based on this information, a global task package is encapsulated, providing clear and complete input for the planning agent, which helps to generate accurate and targeted global session context. This step makes the task initialization phase more standardized, reduces process errors caused by misunderstandings of the task or missing information, lays a reliable foundation for subsequent workflow creation and multi-agent collaborative execution, and improves the system's ability to grasp task intent and the rationality of execution paths.

[0012] In some feasible implementations, the training data includes dialogue training data; the training data generation task is performed by generative agents, processing agents, and evaluation agents based on task packages with the same context identifier in their respective queues, specifically including: Generative agents identify entities corresponding to the tasks generated from the training data based on the task theme. Entities are the participants in the conversational scenario simulated by the training data.

[0013] Generative agents generate multi-round dialogue training data based on entities and sub-conversation contexts. In this multi-round dialogue training data, later rounds include pronouns that represent entities from earlier rounds.

[0014] In this way, the generative agent first identifies entities based on the task topic, providing specific participants for simulating real-world dialogue scenarios, making the generated dialogue data more realistic and relevant to the context. Building on this, it generates multi-turn dialogues by combining sub-conversation contexts, and introduces pronouns in later turns to refer to entities from earlier turns. This design simulates common referential phenomena in real-world dialogues, making the generated dialogue data more consistent with natural language habits and actual dialogue logic, thereby improving the naturalness and usability of the generated training data.

[0015] In some feasible implementations, after generating dialogue training data based on entities and sub-conversation contexts using a generative agent, the method further includes: The processing agent replaces pronouns in subsequent dialogue training data with entities from previous dialogue training data.

[0016] In this way, the processing agent replaces pronouns with corresponding specific entities in subsequent rounds, eliminating referential ambiguity and ensuring that each round of dialogue has clear semantics even when read independently. This step normalizes the initial data produced by the generative agent, improving data consistency and readability, and providing clearer and more accurate samples for subsequent model training. This helps reduce the risk of misunderstandings caused by ambiguous pronoun references, thereby improving the accuracy of the model trained using this data in entity association and contextual understanding.

[0017] In some feasible implementations, after the processing agent replaces pronouns in subsequent rounds of dialogue training data with entities from previous rounds of dialogue training data, the method further includes: An evaluative agent compares the dialogue format and logic of the training data with the expected training data to generate a first comparison result.

[0018] The evaluative agent generates first correction information based on the first comparison result. This first correction information drives the planning agent, generative agent, and processing agent to adjust the execution parameters of the dialogue training data generation task.

[0019] In this way, by comparing the generated dialogue data with the expected data in terms of dialogue format and logic, deviations in the structure and logic of the generated data can be automatically identified. Correction information is generated based on the comparison results, which can then drive the planning, generation, and processing agents to adjust their execution parameters, forming a closed-loop optimization mechanism that includes evaluation and feedback. This mechanism can continuously iterate and optimize the data generation process, reduce human intervention, and systematically improve the quality and compliance of the generated data, ensuring that the final training data better conforms to the preset format specifications and logical requirements.

[0020] In some feasible implementations, the training data includes trajectory training data; the training data generation task is performed by generative agents, processing agents, and evaluation agents based on task packets with the same context identifier in their respective queues, specifically including: Generative agents generate task processing trajectories and tools corresponding to tasks based on task themes and training data.

[0021] The generative agent initiates a request to the processing agent to invoke the task processing tool.

[0022] The task processing tool is determined by the processing agent based on the task processing tool call request.

[0023] The processing agent simulates the results of task processing based on the task processing tool.

[0024] In this way, the generative agent determines the task processing trajectory and tools based on the task theme, enabling it to structurally plan the task execution path and simulate the task-solving process, including specific steps and tool usage. By initiating tool call requests to the processing agent and generating processing results, the task execution process is concretized and instantiated. This method can automatically generate trajectory training data containing task decomposition, tool calls, and result outputs, providing high-quality, streamlined training samples for training models with task planning and tool usage capabilities.

[0025] In some feasible implementations, after the processing agent generates the task processing result based on the task processing tool, the method further includes: A second comparison result is generated by comparing the task execution trajectory and task processing results of the trajectory training data with the expected trajectory training data using an evaluative agent.

[0026] The evaluative agent generates second correction information based on the second comparison result. This correction information drives the planning, generative, and processing agents to adjust the execution parameters of the trajectory data generation task.

[0027] In this way, by comparing the generated trajectory data with the expected data in terms of task execution trajectory and processing results through an evaluative agent, the rationality of the generated task trajectory and the validity of the results can be automatically verified. Correction information is generated based on the comparison results, driving relevant agents to adjust parameters, thus achieving automated quality monitoring and iterative optimization of the trajectory data generation process. This mechanism helps ensure that the generated trajectory data not only conforms to the preset task logic but also produces correct processing results, thereby continuously improving the reliability and educational value of the trajectory data and providing a guarantee for training models that can accurately plan and execute tasks.

[0028] In some feasible implementations, after generating a second comparison result by comparing the task execution trajectory and task processing result with the expected trajectory training data using an evaluative agent, the process is further configured as follows: In response to user-inputted corrections, the planning agent, generative agent, and processing agent adjust the execution parameters of the trajectory data generation task based on these corrections.

[0029] Thus, by introducing a user-manual correction step on top of automatic evaluation and correction, the system gains an interface for external intervention and knowledge injection. When automatic evaluation fails to fully identify problems or when users have specific requirements, manual correction information can directly guide the agent to adjust its behavior, enhancing the system's flexibility and controllability. This human-machine collaborative correction mechanism combines automation efficiency with human experience and judgment, enabling more precise guidance of the data generation process to meet complex or subjective requirements, thereby further improving the alignment between the final training data and the user's real needs.

[0030] In some feasible implementations, the planning agent executes the loading of task packages from the directed acyclic graph into the corresponding agent queue, specifically including: Get the queue occupancy rate of the agent queue.

[0031] If the queue occupancy rate is greater than or equal to the occupancy rate threshold, then create an agent corresponding to the agent queue.

[0032] If the queue occupancy rate is less than the occupancy rate threshold, the task package in the directed acyclic graph will be loaded into the corresponding agent queue.

[0033] In this way, by acquiring the real-time occupancy rate of the agent queue and dynamically deciding whether to create new agents based on preset thresholds, adaptive management of computing resources is achieved. When the queue load is high, automatic expansion can avoid task congestion and ensure timely task processing. When the load is low, task packages are directly loaded into the existing queue, which helps to save system resources and improve resource utilization. This dynamic scaling scheduling mechanism can effectively cope with fluctuations in task load, ensuring task execution efficiency while taking into account the economy of system operation, and improving the elasticity and stability of overall processing capacity.

[0034] Secondly, embodiments of this application provide a server, including: The processor is configured as follows: Upon receiving the training data generation task, a global session context is generated through a planning agent. The global session context is used to maintain the task execution flow of the training data generation task.

[0035] A planning agent creates a data generation workflow and its sub-session contexts based on a global session context. The data generation workflow comprises multiple worker nodes. The sub-session contexts have the same data structure as the global session context. Each sub-session context includes a context identifier, which indicates a worker node belonging to the same data generation workflow.

[0036] The data generation workflow is encapsulated as a directed acyclic graph (DAG) based on the sub-session context. The DAG includes multiple task packages corresponding to worker nodes and the context relationships between these task packages. There is a mapping relationship between task packages and worker nodes. The context relationships between the multiple task packages are determined based on the sub-session context.

[0037] Load the task packages in the directed acyclic graph into the corresponding agent queue.

[0038] Generative agents, processing agents, and evaluation agents perform training data generation tasks based on task packages with the same context identifier in their respective queues.

[0039] If the evaluation metrics of the training data output by the evaluative agent meet the expected values, store the training data generated based on task packages with the same context identifier. Attached Figure Description

[0040] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 Flowcharts for training data generation provided in some embodiments of this application; Figure 2 A flowchart illustrating the process of determining queue occupancy rate for an agent queue, provided in some embodiments of this application; Figure 3 This application provides schematic diagrams of configuration management interfaces for some embodiments. Figure 4 A flowchart illustrating the global session context generation process provided in some embodiments of this application; Figure 5 A flowchart illustrating the dialogue training data generation process provided in some embodiments of this application; Figure 6 Multi-agent cooperative timing diagrams provided for some embodiments of this application; Figure 7 A flowchart illustrating the generation of first correction information provided in some embodiments of this application; Figure 8 A flowchart illustrating the trajectory training data generation process provided in some embodiments of this application; Figure 9 A flowchart illustrating the generation of second correction information provided in some embodiments of this application; Figure 10 Timing diagrams for iterative optimization of multi-agent systems based on manually corrected information provided in some embodiments of this application. Detailed Implementation

[0042] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.

[0043] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.

[0044] With the rapid development of artificial intelligence technology, voice interaction systems based on large language models have been widely used in the field of smart TVs. To improve the accuracy and naturalness of multi-turn dialogues in TV scenarios, a large amount of high-quality training data with contextual information is needed for model fine-tuning. This type of data not only includes the dialogue text content but also needs to accurately record real-time scene elements such as the TV interface state, user operation history, and media asset information, which is crucial for the accuracy of semantic understanding and intent recognition.

[0045] Currently, various methods have been proposed for constructing training data, but all have significant limitations. Traditional methods based on manual annotation require professionals to record the TV interface state through screenshots, screen recordings, etc., and then manually write the dialogue content using Excel spreadsheets. While this method can ensure data accuracy, it is extremely inefficient and heavily reliant on the subjective judgment of the annotators, making it difficult to guarantee data consistency and scalability. Furthermore, the training and selection of annotators is extremely costly, yet the annotation quality is difficult to guarantee, and the generated data may still lack diversity.

[0046] With the development of generative large-scale models, data generation methods based on single language models have gradually emerged. These methods utilize the text generation capabilities of large language models to automatically generate dialogue content, improving data construction efficiency to some extent. However, existing methods generally suffer from a lack of scene information; the generated dialogue content is disconnected from the actual state of the television interface and cannot accurately reflect the user's real operational logic. Especially in multi-turn dialogues involving cross-business scenarios, the lack of dynamic tracking of interface state changes makes it difficult to adapt to complex and ever-changing television business scenarios, resulting in training data that cannot effectively support the fine-tuning needs of large models.

[0047] In real-world television interaction scenarios, users' dialogue intentions are often closely related to real-time contextual information such as the terminal's display interface, the media content being played, and historical operation records. Traditional data construction methods cannot effectively integrate this multimodal information, resulting in training data lacking contextual realism and coherence. Furthermore, current technologies have not yet resolved key issues such as data format standardization and automatic quality verification, severely hindering the improvement of large-scale models' semantic understanding capabilities in television scenarios. Therefore, there is an urgent need for a technical solution that can automatically construct high-quality training data with contextual information to further promote the development of smart TV voice interaction technology.

[0048] In response to the above issues, such as Figure 1 As shown, this application provides a method for generating training data based on multiple agents, including: S101: Upon receiving the training data generation task, generate a global session context through a planning agent.

[0049] In some embodiments, the training data generation task is created and submitted immediately by the user after entering configuration parameters in the configuration management interface, and is packaged in the form of a task package. After the task package of the training data generation task is loaded into the agent queue of the planning agent, the planning agent can retrieve the task package and parse the task type, task background and task complexity according to the instructions in the task package to generate a global conversation context containing multi-turn dialogue scenarios.

[0050] The global session context is used to maintain the task execution flow of the training data generation task. The global session context is a structured database that can store the following information: Task objectives and constraints: the user's original requirements and the script corresponding to the training data. Shared state: the progress of the current training data generation task, the index of generated data segments, and global variables (e.g., character definitions, story background). Data trajectory: records the generation trajectory of each data segment (which agent generated it, based on which upstream data, etc.).

[0051] A planning agent is used for the overall design and planning of training data generation tasks, defining the data structure of the global session context.

[0052] In some embodiments, when a terminal device such as a server that can run a training data generation task receives a training data generation task, it can generate a global session context through a planning agent according to the instructions of the training data generation task, so as to plan the overall process of the training data generation task through the global session context.

[0053] In some examples, the task execution flow of the training data generation task includes multiple nodes such as dialogue generation related to the training data, dialogue optimization, dialogue evaluation, and optimization of execution parameters for multiple agents. The planning agent determines the execution order and relationships of these nodes according to the instructions of the training data generation task and records them in the global session context.

[0054] S102: The planning agent creates a data generation workflow and a sub-session context of the data generation workflow based on the global session context; The data generation workflow comprises multiple worker nodes; the data structure of the sub-session context is identical to that of the global session context. To improve the efficiency of training data generation, multiple sets of training data can be generated by creating multiple data generation workflows when sufficient computing resources are available. That is, each data generation workflow is used to generate one set of training data. Each training data generation task can correspond to multiple data generation workflows.

[0055] In some examples, data generation workflows can be created based on a pre-configured scheduler in conjunction with a planning agent, for example, the number of data generation workflows is 1000.

[0056] To ensure the diversity of training data, the content of the training data generated by different data generation workflows is different, in order to adapt to the needs of complex television services. To maintain the stable operation of each data generation workflow, the planning agent creates a corresponding sub-session context for each data generation workflow.

[0057] Understandably, the global session context is used to maintain the overall execution of the training data generation task, while the sub-session context is used to maintain the execution of each training data generation workflow. Thus, each data generation workflow runs based on the information indicated in the sub-session context.

[0058] In some examples, the sub-session context includes a context identifier, which indicates the worker node belonging to the same data generation workflow. Different context identifiers distinguish different sub-session contexts and data generation workflows, ensuring that in the case of multiple data generation workflows processing in parallel, the agent can differentiate between different data generation workflows based on the context identifier, preventing issues such as inconsistent training data outputs or execution processes corresponding to different data generation workflows.

[0059] S103: Based on the sub-session context, encapsulate the data generation workflow into a directed acyclic graph; A directed acyclic graph (DAG) consists of multiple task packages corresponding to worker nodes and multiple context relationships between these task packages. There is a mapping relationship between task packages and worker nodes, and the context relationships between multiple task packages are determined based on the sub-session context.

[0060] Leveraging the characteristics of directed acyclic graphs (DAGs), the training data generation task can be transformed from sequential execution to network-based execution. By modeling the data generation workflow as a DAG, task packages can be scheduled for parallel or sequential execution based on dependencies, improving overall execution efficiency.

[0061] Even if a local task fails, the network-based execution characteristics of a directed acyclic graph (DAG) allow the task to continue executing without causing a global task failure due to a local failure. Furthermore, based on the dependencies between task packages within the DAG, anomalies can be effectively located, and repair or retry strategies can be quickly implemented.

[0062] In addition, the structure of a directed acyclic graph supports dynamic task plugging and unplugging, allowing workflow logic to be adjusted at runtime according to actual needs.

[0063] Therefore, by encapsulating the data generation workflow into a directed acyclic graph, the normal execution of the training data generation task and the efficient iteration and optimization of the task can be fully guaranteed.

[0064] In some examples, a pre-configured workflow-level scheduler can encapsulate data generation workflows into task packages, forming a directed acyclic graph based on the relationships between multiple task packages. Specifically, the workflow-level scheduler can decompose tasks into multiple standardized task packages based on the task execution logic and task background information indicated in the sub-session context output by the planning agent, and map the dependencies between task packages as directed edges, ensuring that the task execution order conforms to the expected logic.

[0065] The task package is encapsulated in a universal format that can be recognized by multiple agents, so that multiple agents can execute the corresponding task processing sub-processes according to the task execution flow planned by the planning agent.

[0066] S104: Load the task package in the directed acyclic graph into the corresponding agent queue; The number of agent queues is not unique. Each agent queue corresponds to a specific agent, meaning that an agent can process tasks corresponding to the task packages in its respective agent queue.

[0067] In some embodiments, the workflow-level scheduler can distribute task packages in a directed acyclic graph to the corresponding agent type queues, such as generative, evaluative, or processing queues, according to the task package type, ensuring that the task packages are correctly routed to agent instances with the corresponding processing capabilities.

[0068] Generative, evaluative, and processing agents can each execute tasks according to the task packages in their respective queues. For example, a generative agent is responsible for executing data creation tasks, an evaluative agent performs quality checks on the generated results, and a processing agent performs post-processing operations such as cleaning, completion, and formatting on the raw generated data.

[0069] Understandably, the capacity of the agent queue can be dynamically adjusted according to the task load, supporting elastic scaling to cope with high-concurrency scenarios. When the queue backlog exceeds the threshold, the system automatically triggers the expansion mechanism to increase the number of agent instances, ensuring the real-time performance and stability of task processing.

[0070] like Figure 2 As shown, in some embodiments, the planning agent performs the task loading of the directed acyclic graph into the corresponding agent queue, specifically including: S201: Obtain the queue occupancy rate of the agent queue; S202: If the queue occupancy rate is greater than or equal to the occupancy rate threshold, then create an agent corresponding to the agent queue; S203: If the queue occupancy rate is less than the occupancy rate threshold, then the task package in the directed acyclic graph is loaded into the corresponding agent queue.

[0071] In some examples, different types of agents can correspond to multiple agent queues, and the number of different types of agent instances is not limited to one. A pre-configured agent instance-level scheduler can listen to these agent queues and then dynamically allocate task packages based on the priority of task packages, the queue occupancy rate of agent queues (task backlog), and the real-time load of agent instances to achieve optimal resource utilization.

[0072] For example, when the agent instance-level scheduler detects that the task backlog in the queue of generative agent instance A exceeds a threshold and its load is high, it will automatically trigger a scaling mechanism to create a new generative agent instance B to add to the processing queue. After the new instance starts, the scheduler allocates the task packages to be processed in real time to ensure the processing efficiency of the task queue and the stability of the system.

[0073] In addition, task packages can be allocated based on pre-defined priority strategies. In some examples, after receiving a new task package, the agent instance-level scheduler calculates its comprehensive priority weight based on parameters such as the user level, project urgency, deadline, and waiting time corresponding to the task package, and allocates the task package to an agent instance with a lower load and matching capabilities, taking into account the agent instance's load status.

[0074] In other examples, the agent instance-level scheduler allocates tasks by combining computing resources and agent capabilities. Computing resources and agent capabilities are uniformly managed within a resource pool, supporting on-demand allocation and dynamic reclamation. The agent instance-level scheduler accurately matches task packages with available agent instances based on the real-time status of the resource pool.

[0075] In this way, the agent instance-level scheduler can dynamically adjust the task package allocation strategy by combining the availability of computing resources and the urgency of tasks, prioritizing the scheduling of high-priority tasks to agent instances with sufficient idle resources. When resources are scarce, the scheduler can suspend low-priority tasks according to the preemption mechanism, releasing computing units to ensure the execution progress of critical tasks, and ensuring optimal throughput and response latency of the overall workflow under limited resources.

[0076] S105: The generative agent, the processing agent, and the evaluation agent perform training data generation tasks based on task packages with the same context identifier in their respective queues.

[0077] Generative agents are used to create initial content based on task packages, such as generating queries, reasoning steps or tool call sequences, and entity objects. Furthermore, generative agents can enrich the generated results as much as possible based on pre-defined contextual information and task objectives, thereby forming rich training data.

[0078] Processing agents are responsible for processing and transforming the generated intermediate results, such as performing tool call simulations, information extraction, entity linking, or logic verification, and attaching the processing results to the context link.

[0079] The evaluation agent uses a multi-dimensional scoring system to determine the quality of the processed data, including indicators such as semantic consistency, logical integrity, and format compliance, and generates scores and improvement suggestions to ensure that the output data meets the predetermined quality standards.

[0080] In some embodiments, after the task package corresponding to the data generation workflow generated by the planning agent is loaded into a data bus / agent queue accessible to all agents, the generative agent can obtain the task package from its agent queue and generate initial data content that meets the requirements based on the data format, task background, and other information indicated in the task package. The processing agent can process and transform the initial data content output by the generative agent, such as performing operations like referential resolution, omission completion, synonym substitution, and format standardization, to make the data closer to real user expressions. The evaluation agent then performs a multi-dimensional quality evaluation of the processed data to determine whether it meets the requirements of annotation specifications and semantic integrity. If the data fails the evaluation, the feedback learning module is triggered to record the problem type and generate an optimization task package to re-enter the scheduling queue, achieving closed-loop iteration.

[0081] Taking the same data training and generation task as an example, multiple types of intelligent agents can work together through the same context identifier to ensure the continuity and consistency of the data generation process.

[0082] S106: If the evaluation index of the training data output by the evaluation agent reaches the expected value, store the training data generated based on the task package with the same context identifier.

[0083] Understandably, the expected value of the training data evaluation metric is either a pre-set standard data set or a quality threshold dynamically generated by the planning agent based on the task complexity upon receiving the generation task. This threshold measures whether the generated data meets the annotation requirements of the current scenario. The expected value can be defined from multiple dimensions, such as the semantic coverage breadth of the training data, the coherence of the contextual logic, the degree of format standardization, and the fit with real user behavior.

[0084] In some embodiments, the evaluative agent can score the generated data item by item based on expected values ​​with multiple dimensions, and perform subsequent processing based on the scoring results.

[0085] In some examples, if the training data generated by multiple agents achieves the expected scores in all dimensions, it can be determined that the training data meets the requirements. Then, the training data, along with its context identifier, generation path, and quality assessment report, can be stored in a standardized training database.

[0086] In other examples, if the evaluation results show that some dimensions do not meet the expected values, a feedback mechanism will be automatically triggered, i.e., feedback information will be generated. Based on the characteristics of a directed acyclic graph, the feedback information can accurately pinpoint the problem area and generate an optimization task package, which will then be re-entered into the scheduling queue for iterative correction. Through the closed-loop feedback mechanism, the system can continuously improve data quality until all indicators meet the expected thresholds.

[0087] In some embodiments, an anomaly processor can be configured to optimize the generation of training data in conjunction with the evaluation metrics output by the evaluative agent. Upon detecting feedback, the anomaly processor can remove invalid data generated by upstream and downstream agents based on the anomaly type and contextual dependencies, thus preventing invalid data from interfering with subsequent data generation processes.

[0088] like Figure 3As shown, the terminal device used to generate training data can be configured with a user interface, which may include a configuration management interface and multiple configuration items for configuring the training data generation task. These include task type (e.g., task execution trajectory training data, dialogue training data), task background (e.g., family movie-watching scenario, children's movie-watching scenario), and task complexity (e.g., simple, medium, complex). Users can input corresponding configuration parameters based on the configuration items in the configuration management interface. The terminal device can then create a training data generation task based on the user-input configuration parameters and place the training data generation task into the agent queue of the planning agent. The planning agent then retrieves the task from the queue and plans the task.

[0089] like Figure 4 As shown, the planning agent generates a global session context corresponding to each task package based on the task packages in its agent queue. The global session context is also unique; that is, the global session context corresponding to each data training generation task is different. The process of generating a global session context through the planning agent upon receiving a training data generation task specifically includes: S401: Analyze the training data generation task to determine the task theme, task round, query type corresponding to the task round, and task execution logic of the training data generation task; S402: Encapsulate a global task package based on the task topic, task round, query type corresponding to the task round, and task execution logic; S403: The planning agent generates a global session context based on the global task package.

[0090] In some embodiments, the planning agent can parse the task package according to predefined parsing rules and determine key parameters such as the task topic, task round, query type and execution logic of the corresponding training data generation task from the task package. Combined with a preset scenario knowledge base and user-configured constraints, it can automatically generate a structured global session context.

[0091] In this system, there is a correspondence between task rounds and the corresponding query types. Each task round can correspond to different query types to enrich the diversity of the training data. In some examples, the planning agent can determine the distribution of query types in each round based on the task topic to ensure coverage of nine query types, including semantically complete, referential, and ellipsis queries. For example, the task topic is "film and television consultation," which includes six rounds of dialogue. The first round uses query type A (semantically complete), asking about "The Story of A." Subsequent rounds use types B (simple rewriting), C (complex rewriting), and D (subject omission), achieving contextual dependence through referencing, ellipsis, and reconstruction. Each round's query is dynamically generated based on the entity state and focus transfer rules in the global conversation context, ensuring semantic coherence and logical closure, and improving the relevance to the user's real dialogue.

[0092] The task execution logic defines the dependencies and state transition rules between each round, ensuring that the dialogue progresses in accordance with the actual application scenario.

[0093] Therefore, based on the content obtained from the above analysis, the planning agent can generate a structured conversation blueprint containing multiple rounds and types of queries, clarify the context dependencies, entity bindings and focus transfer paths of each round, and write the blueprint into the global context as a unified basis for subsequent generative agents to execute data instantiation, ensuring the coordinated unity of each round of dialogue in terms of semantic coherence, logical consistency and scenario fit.

[0094] Furthermore, based on the creation of a global session context, the behavioral boundaries and output specifications of each generative agent can be effectively constrained, ensuring data instantiation within a unified semantic framework.

[0095] In some embodiments, the training data includes dialogue training data, which is used to simulate multi-turn interactions between a user and a smart device, covering queries, instructions, and responses in different scenarios. Figure 5 As shown, the training data generation task is performed by generative agents, processing agents, and evaluation agents based on task packages with the same context identifier in their respective queues. Specifically, this includes: S501: The generative agent determines the entity corresponding to the task generated by the training data based on the task topic; the entity is the participant in the conversation scenario simulated by the training data; S502: The generative agent generates multi-round dialogue training data based on the entity and the sub-conversation context; It's understandable that "previous rounds" and "subsequent rounds" are relative, not a limitation on a single round. Based on users' real-world conversational habits, pronouns are used to represent entities that have already appeared during dialogue. Therefore, in multi-round dialogue training data, the dialogue training data in subsequent rounds includes pronouns, which are used to represent entities in the dialogue training data in previous rounds. This effectively aligns with users' conversational habits, improving the authenticity of the training data and the naturalness of the interaction.

[0096] The task theme determines the knowledge domain and entity scope of the dialogue scenario. Subsequently, the intelligent agent can call the relevant knowledge domain and entity scope according to the task theme to construct dialogue content that conforms to the scenario, ensuring that the relationship between entities is accurate and the focus shift is natural.

[0097] In some embodiments, under the topic of film and television works consultation, the system will activate entity categories such as media assets, people, and roles, and dynamically adjust the recommendation strategy based on the user's historical preferences and current session status, so that the generated training data is closer to the real interaction scenario and improves the authenticity and generalization ability of the training data.

[0098] In some examples, after reading task packages from the queue, the generative agent determines that the task topic is film and television consultation. The agent then invokes a media asset knowledge base to identify the user's historically preferred film and television genres and frequently mentioned actors, and combines this with the role identity set in the current conversation context to construct a multi-turn dialogue that includes film recommendations, character associations, and plot analysis. In the first round of generation, a semantically complete question, "What show is this?", is generated, along with the answer, "This is 'A's Story'." In the second round, pronouns can be added to fully simulate the user's real-life dialogue scenario, such as, "Who is the director of this show?", with the generated answer, "The director is AA, and he's very famous."

[0099] In this way, the introduction of pronouns can effectively simulate real user conversation habits, thereby improving the quality of generated training data. Furthermore, the generative model creates multi-turn dialogues based on the task turns, query types, and other constraints indicated by the sub-conversation context created by the planning agent, ensuring comprehensive coverage of the training data.

[0100] It is understandable that each data training and generation task is completed collaboratively by multiple agents. In this way, each agent performs its own duties and leverages its expertise to form an efficient collaborative agent cluster, which is conducive to improving the quality of training data generation at each stage of task execution, thereby improving the overall quality of training data.

[0101] like Figure 6As shown, after the generative agent completes the generation of multi-turn dialogue content, the processing agent can optimize the dialogue training data generated by the generative agent. That is, after the generative agent generates dialogue training data based on the entity and the sub-conversation context, the process further includes: The processing agent replaces pronouns in subsequent dialogue training data with entities from previous dialogue training data.

[0102] Multiple intelligent agents can transmit data based on a data bus and a preset standard format, such as the following data transmission format: { "data_id": "Unique identifier", "type": "raw_text / structured_data / image", "content": { ...}, / / Actual data "metadata": { "source_agent": "Generative-A", "source_task_id": "xxx", "quality_score": 0.92, "context_ref": "session_ctx_001" / / Global context }, "expected_next_actions": ["format_standardize", "consistency_check"] / / Prompt downstream actions } Multiple intelligent agents read data and execute subsequent tasks based on the data stored in the data packet according to a standard format.

[0103] As shown in the above embodiments, the dialogue training data in later rounds includes some pronouns, such as "this play" replacing the play title mentioned in previous rounds. This ensures clear contextual reference and semantic coherence while fully simulating the user's real speaking habits. During the training process, the agent or model needs to accurately understand and correctly handle pronoun reference relationships to improve the accuracy of semantic parsing.

[0104] In some embodiments, the processing agent performs restoration processing on subsequent rounds of dialogue containing pronouns, replacing the referent "this play" with the entity name "The Story of A" explicitly mentioned above. By restoring pronouns to their corresponding entities, the clarity and semantic integrity of entity referencing in the training data are ensured, avoiding model training bias caused by unclear referencing.

[0105] like Figure 7 As shown, multiple agents collaborate in a closed-loop manner, and each agent can adjust its task execution parameters based on the evaluation metrics output by the evaluative agent. That is, after the processing agent replaces pronouns in subsequent dialogue training data with entities from previous rounds of dialogue training data, the process further includes: S701: The evaluation agent compares the dialogue training data with the expected dialogue training data in terms of dialogue format and dialogue logic to generate a first comparison result. S702: The evaluation agent generates first correction information based on the first comparison result; the first correction information is used to drive the planning agent, the generative agent, and the processing agent to adjust the execution parameters of the dialogue training data generation task.

[0106] In some embodiments, the evaluation criteria for dialogue training data cover dimensions such as format compliance, logical consistency, and semantic completeness. The evaluative agent compares the data with a reference benchmark according to preset rules and outputs a first comparison result. The first comparison result may include scoring details and bias analysis for each dimension.

[0107] In some examples, the evaluative agent can further generate first correction information based on the first comparison result. The first correction information includes optimization suggestions for each agent, such as adjusting the generation strategy, revising the prompt word template, or improving the referential resolution rules.

[0108] In some examples, prompt word templates are stored in a prompt word database, optimization rules such as referential resolution rules are stored in a rule database, and relevant parameters of the generation strategy are also stored in the corresponding templates or databases. Therefore, based on the first correction information, each agent can be driven to dynamically update and iterate these rules and parameters from the corresponding database, ensuring that the optimized configuration is used in subsequent task execution.

[0109] Understandably, multi-agent collaboration can be used to generate both dialogue training data and trajectory training data. Trajectory training data refers to the complete behavioral path record of a TV completing a task based on the user's multi-turn voice commands, combined with reasoning and tool calls, in a scenario where a user interacts with a TV to query questions via voice. Trajectory training data includes user intent recognition, multi-step reasoning processes, tool call sequences, and feedback results. For example...Figure 8 As shown, embodiments of this application can also generate trajectory training data based on a multi-agent generative architecture, the steps of which include: S801: The generative agent determines the task processing trajectory and task processing tool corresponding to the task generated from the training data based on the task theme; S802: The generative agent initiates a task processing tool invocation request to the processing agent; S803: The processing agent determines the task processing tool based on the task processing tool invocation request; S804: The processing agent simulates the task processing result based on the task processing tool.

[0110] Understandably, generating trajectory training data requires the generative agent to determine the task processing trajectory (task reasoning process), the task processing tool, the order in which the task processing tool is called, and the results fed back by the task processing tool.

[0111] For example, the trajectory structure of trajectory training data can be as follows: json { "trajectory": [ { "step": number of steps "thought": "The reasoning process, demonstrating why this action was chosen". "action": { "tool": "tool name", "parameters": {"parameters": "values"}, "action_type": "Action type" }, "observation": "Observations after the action is carried out should be based on real-world knowledge." } ] } In the process of generating trajectory training data, various tools can be gradually invoked based on the above trajectory structure to generate multi-step interactive trajectories that conform to real scenarios. The evolution of the user's real intentions can be simulated by dynamically adjusting the reasoning logic and tool invocation.

[0112] In some embodiments, after the generative agent determines the task processing trajectory and the task processing tool, it initiates a tool invocation request to the processing agent. Upon receiving the request, the processing agent parses the required tool and determines the current task's context based on the shared state in the context manager, ensuring the tool invocation conforms to the overall logic. Subsequently, the processing agent performs simulation calculations, generates feedback results consistent with the real environment, and writes them into the data trajectory.

[0113] In some examples, generative agents generate multi-step inference trajectories that include weather queries, clothing recommendations, and outdoor activity recommendations. First, they call a weather query tool to obtain meteorological data for the target city for the next three days. After analyzing parameters such as temperature and precipitation probability, they generate suitable clothing suggestions and further combine user preferences with weather conditions to recommend suitable types of outdoor activities. All steps are recorded in the trajectory.

[0114] For example, a generative agent initiates the following trajectory planning: "thought": "I need to check the weather in Beijing and then recommend clothing and activities based on the weather", "thought": "The weather is sunny and the temperature is moderate. I can recommend appropriate clothing and activities", "observation": "It is recommended to wear a long-sleeved T-shirt and a jacket. The temperature difference between morning and evening is large, so pay attention to keeping warm".

[0115] Processing agents can receive tool invocation requests from generative agents. They can then parse the tool name, parameters, and invocation order from the requests generated by the generative agents and provide the simulated task processing results corresponding to the tool invocation requests. For example, "observation": "Beijing today is sunny, temperature 5-15℃, light breeze.", "observation": "It is recommended to wear a long-sleeved T-shirt and a jacket; the temperature difference between day and night is large, so pay attention to keeping warm.", "observation": "Suitable for outdoor activities such as walking, hiking, and cycling." In this way, trajectory planning data generated by generative and processing agents and simulation task processing results can constitute trajectory training data.

[0116] Understandably, during the generation of trajectory training data, it is also necessary to evaluate the trajectory training data using an evaluative agent and optimize the execution parameters of each agent based on the evaluation results. For example... Figure 9 As shown, after the processing agent generates the task processing result based on the task processing tool, the process further includes: S901: The evaluation agent compares the task execution trajectory and task processing result of the trajectory training data with the expected trajectory training data to generate a second comparison result; S902: The evaluation agent generates second correction information based on the second comparison result; the correction information is used to drive the planning agent, the generative agent, and the processing agent to adjust the execution parameters of the trajectory data generation task.

[0117] Understandably, an evaluative agent can evaluate trajectory training data by calling pre-stored evaluation dimensions and weights to output a second comparison result based on multiple evaluation dimensions.

[0118] In some embodiments, the second comparison result includes inference quality score, tool usage score, trajectory coherence score, learning demonstration score, and task completion score. Users can view the second comparison result in the human-computer interaction interface and judge the generation effect of the trajectory training data based on the second comparison result.

[0119] Furthermore, the evaluation agent can generate second correction information based on the second comparison result, and optimize multiple agents involved in generating trajectory training data based on this second correction information. The second correction information may include a list of advantages, a list of disadvantages, and a list of improvement suggestions for the trajectory training data. The list of improvement suggestions may cover directions for optimizing prompt words, strategies for correcting tool invocation logic, and adjustments to the agent collaboration process, ensuring continuous improvement in semantic accuracy, contextual coherence, and task adaptability of the generated trajectory.

[0120] When the generative agent and the processing agent detect the second correction information, they can dynamically adjust the generation parameters, prompt word templates and tool call sequences to generate new task packages, and gradually bring the trajectory training data closer to the expected standard through multiple iterations.

[0121] In other embodiments, after viewing the second comparison result, the user can also actively modify the agent's execution parameters and other content through the human-computer interaction interface to improve the agent's optimization effect by combining user experience. For example... Figure 10 As shown, after the evaluation agent compares the task execution trajectory and task processing result of the trajectory training data with the expected trajectory training data to generate a second comparison result, it is further configured to: In response to user-inputted correction information, the planning agent, generative agent, and processing agent are driven to adjust the execution parameters of the trajectory data generation task based on the correction information.

[0122] The human-computer interface (HCI) is the interface provided to users by terminal devices such as servers. Users can view the entire process log of trajectory data generation through this interface, including the decision-making basis of each agent, tool call records, and intermediate inference results, and submit manual correction commands for abnormal nodes. Upon receiving manual correction information, the system will trigger the parameter reconfiguration mechanism of the corresponding agent, enabling adjustments to various aspects such as prompt word logic, trajectory generation strategy, and tool call order.

[0123] In this way, the collaborative optimization mechanism that combines closed-loop logic evaluation of multi-agent systems with manual correction can effectively improve the optimization effect of multi-agent systems.

[0124] This application embodiment also provides a server, including: a processor, the processor being configured to: Upon receiving a training data generation task, a global session context is generated through a planning agent; the global session context is used to maintain the task execution flow of the training data generation task. The planning agent creates a data generation workflow and sub-session contexts of the data generation workflow based on the global session context; the data generation workflow includes multiple work nodes; wherein, the data structure of the sub-session context is the same as that of the global session context; the sub-session context includes a context identifier, which is used to indicate work nodes belonging to the same data generation workflow; The data generation workflow is encapsulated into a directed acyclic graph based on the sub-session context; the directed acyclic graph includes multiple task packages corresponding to the work nodes and the context relationships of the multiple task packages; the task packages and the work nodes have a mapping relationship; the context relationships of the multiple task packages are determined according to the sub-session context; Load the task package in the directed acyclic graph into the corresponding agent queue; The training data generation task is performed by generative agents, processing agents, and evaluation agents based on task packages with the same context identifier in their respective queues. If the evaluation metrics of the training data output by the evaluative agent reach the expected value, the training data generated based on the task package with the same context identifier is stored.

[0125] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.

Claims

1. A method for generating training data based on multi-agent systems, characterized in that, include: Upon receiving the training data generation task, a global session context is generated through a planning agent; The global session context is used to maintain the task execution flow of the training data generation task; The planning agent creates a data generation workflow and sub-session contexts of the data generation workflow based on the global session context; the data generation workflow includes multiple work nodes; wherein, the data structure of the sub-session context is the same as the data structure of the global session context; the sub-session context includes a context identifier, which is used to distinguish different data generation workflows; The data generation workflow is encapsulated into a directed acyclic graph based on the sub-session context; the directed acyclic graph includes multiple task packages corresponding to the work nodes and the context relationships of the multiple task packages; the task packages and the work nodes have a mapping relationship; the context relationships of the multiple task packages are determined according to the sub-session context; Load the multiple task packages in the directed acyclic graph into the corresponding agent queues; The training data generation task is performed by generative agents, processing agents, and evaluation agents based on task packages with the same context identifier in the corresponding queues. If the evaluation metrics of the training data output by the evaluative agent reach the expected value, the training data generated based on the task package with the same context identifier is stored.

2. The training data generation method according to claim 1, characterized in that, When the training data generation task is received, a global session context is generated through a planning agent, specifically including: The training data generation task is parsed to determine the task theme, task round, query type corresponding to the task round, and task execution logic of the training data generation task; A global task package is encapsulated based on the task topic, task round, query type corresponding to the task round, and task execution logic. The planning agent generates a global session context based on the global task package.

3. The training data generation method according to claim 2, characterized in that, The training data includes dialogue training data; the step of generating training data through generative agents, processing agents, and evaluation agents based on task packages with the same context identifier in their respective queues specifically includes: The generative agent determines the entity corresponding to the training data generation task based on the task topic; the entity is the participant in the conversation scenario simulated by the training data. The generative agent generates multi-round dialogue training data based on the entity and the sub-conversation context.

4. The training data generation method according to claim 3, characterized in that, In the multi-round dialogue training data, the dialogue training data in the later rounds includes pronouns, which are used to represent entities in the dialogue training data in the earlier rounds. After generating dialogue training data based on the entity and the sub-conversation context using the generative agent, the process further includes: The processing agent uses entities from previous rounds of the dialogue training data to replace pronouns from subsequent rounds.

5. The training data generation method according to claim 4, characterized in that, After the process agent replaces pronouns in subsequent rounds of dialogue training data with entities from previous rounds of dialogue training data, it further includes: The evaluation agent compares the dialogue training data with the expected dialogue training data in terms of dialogue format and dialogue logic to generate a first comparison result. The evaluation agent generates first correction information based on the first comparison result; the first correction information is used to drive the planning agent, the generative agent, and the processing agent to adjust the execution parameters of the dialogue training data generation task.

6. The training data generation method according to claim 2, characterized in that, The training data includes trajectory training data; the step of generating training data by generative agents, processing agents, and evaluation agents based on task packages with the same context identifier in their respective queues specifically includes: The generative agent determines the task processing trajectory and task processing tools corresponding to the task generated from the training data based on the task theme. The generative agent initiates a task processing tool invocation request to the processing agent; The processing agent determines the task processing tool based on the task processing tool invocation request. The processing agent simulates the task processing results based on the task processing tool.

7. The training data generation method according to claim 6, characterized in that, After the processing agent generates the task processing result based on the task processing tool, the process further includes: The evaluation agent compares the task execution trajectory and task processing result of the trajectory training data with the expected trajectory training data to generate a second comparison result. The evaluation agent generates second correction information based on the second comparison result; the correction information is used to drive the execution parameters of the planning agent, the generative agent, and the processing agent in iterating the trajectory data generation task.

8. The training data generation method according to claim 7, characterized in that, After the evaluation agent compares the task execution trajectory and task processing result with the expected trajectory training data to generate a second comparison result, it is further configured to: In response to user-inputted manual correction information, the execution parameters of the planning agent, the generative agent, and the processing agent are driven to iterate the trajectory data generation task based on the manual correction information.

9. The training data generation method according to claim 7, characterized in that, The planning agent executes the loading of task packages from the directed acyclic graph into the corresponding agent queue, specifically including: Obtain the queue occupancy rate of the agent queue; If the queue occupancy rate is greater than or equal to the occupancy rate threshold, then create an agent corresponding to the agent queue; If the queue occupancy rate is less than the occupancy rate threshold, then the task package in the directed acyclic graph is loaded into the corresponding agent queue.

10. A server, characterized in that, include: The processor is configured as follows: Upon receiving the training data generation task, a global session context is generated through a planning agent; The global session context is used to maintain the task execution flow of the training data generation task; The planning agent creates a data generation workflow and sub-session contexts of the data generation workflow based on the global session context; the data generation workflow includes multiple work nodes; wherein, the data structure of the sub-session context is the same as the data structure of the global session context; the sub-session context includes a context identifier, which is used to distinguish different data generation workflows; The data generation workflow is encapsulated into a directed acyclic graph based on the sub-session context; the directed acyclic graph includes multiple task packages corresponding to the work nodes and the context relationships of the multiple task packages; the task packages and the work nodes have a mapping relationship; the context relationships of the multiple task packages are determined according to the sub-session context; Load the multiple task packages in the directed acyclic graph into the corresponding agent queues; The training data generation task is performed by generative agents, processing agents, and evaluation agents based on task packages with the same context identifier in the corresponding queues. If the evaluation metrics of the training data output by the evaluative agent reach the expected value, the training data generated based on the task package with the same context identifier is stored.