Task processing method and device, and electronic device
By migrating and filtering data during subtask switching within the AI model, the accuracy and consistency issues of AI models in processing contextual information are resolved, achieving efficient data management and task execution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- VIVO MOBILE COMM CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-26
Smart Images

Figure CN122285207A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of artificial intelligence technology, specifically relating to a task processing method, apparatus, and electronic device. Background Technology
[0002] With the rapid development of artificial intelligence (AI) technology, AI models have been widely used in long-process task scenarios such as research report generation, engineering code development, and personal assistants.
[0003] In related technologies, AI models for such tasks need to process a large amount of contextual information, such as initial user commands, real-time retrieved web pages and documents, records of multi-round reasoning processes, and intermediate generated results. However, when the contextual information exceeds the processing capacity of the AI model, some contextual information usually needs to be removed. This can easily lead to the loss of important commands or key details, causing the task execution to deviate from user expectations, resulting in low accuracy of the AI model's reasoning. Summary of the Invention
[0004] The purpose of this application is to provide a task processing method, apparatus, and electronic device that can improve the accuracy and consistency of AI models in processing tasks.
[0005] In a first aspect, embodiments of this application provide a task processing method, the method comprising: when switching from executing a first subtask to executing a second subtask, migrating at least one first retrieval information of the first subtask from a first storage area to a second storage area, and storing summary information of the first subtask execution information of the first subtask in a third storage area; generating task execution information of the first task based on the summary information of the first subtask and the subtask execution information of the second subtask; wherein the first task includes the first subtask and the second subtask.
[0006] In this embodiment, when switching from executing a first subtask to executing a second subtask, at least one first retrieval information of the first subtask is migrated from the first storage area to the second storage area, and the summary information of the first subtask execution information of the first subtask is stored in the third storage area. Based on the summary information of the first subtask and the subtask execution information of the second subtask, task execution information of the first task is generated; wherein, the first task includes the first subtask and the second subtask. Through this solution, when switching tasks, at least one first retrieval information of the previous subtask is actively moved out of the first storage area, such as the fast access area, and the task execution information of the previous subtask is extracted into summary information and stored independently. This frees up storage space for storing relevant information of the current subtask, effectively avoiding information overflow and truncation caused by the context window being filled with irrelevant data, thereby improving the accuracy and consistency of AI model task processing.
[0007] In some embodiments of this application, before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, the method further includes: when switching from executing the first subtask to executing the second subtask, migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, and storing summary information of the first subtask execution information of the first subtask in the third storage area; generating task execution information of the first task based on the summary information of the first subtask and the subtask execution information of the second subtask; wherein the first task includes the first subtask and the second subtask.
[0008] In this embodiment of the application, by determining the correlation score between the retrieval information corresponding to the first subtask and the subtask, a large amount of retrieval information is filtered based on the correlation score, and only highly correlated data is stored in the hot zone, which avoids irrelevant data occupying the limited context window and ensures that high-quality results can be generated based on accurate data when the subtask is executed.
[0009] In some embodiments of this application, before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, the method further includes: during the execution of the first subtask, obtaining at least one second retrieval information corresponding to the first subtask; determining the relevance score between the at least one second retrieval information and the first subtask; storing at least one third retrieval information among the at least one second retrieval information whose relevance score is greater than or equal to a first threshold in the first storage area; wherein the at least one third retrieval information includes at least one first retrieval information.
[0010] In this embodiment of the application, an automated and objective correlation assessment is achieved by calling a correlation scoring model, which can accurately and efficiently determine the correlation between the retrieved information and the currently executed sub-task, thereby providing an accurate and reliable basis for subsequent data partitioning.
[0011] In some embodiments of this application, determining the relevance score between at least one second retrieval information and the first subtask includes: inputting at least one second retrieval information and the task description information of the first subtask into the relevance scoring model to obtain the relevance score.
[0012] In some embodiments of this application, before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, the method further includes: inputting at least one third retrieval information and the task description information of the second subtask into the relevance scoring model to obtain a relevance score; and determining at least one third retrieval information with a relevance score less than a second threshold as the first retrieval information.
[0013] In this embodiment, by re-evaluating the cross-task correlation of existing data during task switching and comparing the determined correlation with a threshold, low-correlation data is downgraded when the correlation is less than the threshold, thus achieving the adaptation of data storage location and task status, thereby further optimizing the utilization rate of hot zone space.
[0014] In some embodiments of this application, the first storage area and the third storage area are located in the memory of the electronic device, and the second storage area is located in the vector database.
[0015] In some embodiments of this application, before storing the summary information of the first subtask in the third storage area, the method further includes: extracting key information from the subtask execution information of the first subtask; generating summary information based on the key information and task fields; wherein the key information includes at least one of the following: task identifier; key conclusion; numerical parameters; time range.
[0016] In this embodiment of the application, by extracting key information and generating a structured summary according to preset fields, efficient compression of subtask execution information is achieved. This not only preserves the key summary content of the subtask execution information but also significantly reduces storage space, while providing accurate background information references for subsequent subtasks.
[0017] In some embodiments of this application, migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area includes: deleting at least one first retrieval information from the first storage area and storing at least one first retrieval information in the second storage area; storing an index identifier of at least one first retrieval information in the first storage area; wherein the index identifier has a mapping relationship with the first retrieval information in the second storage area.
[0018] In this embodiment of the application, by deleting at least one first retrieval information stored in the first storage area and retaining the index of the at least one first retrieval information in the first storage area, lossless degradation of low-association data is achieved, which not only releases hot zone space but also retains data traceability, providing a foundation for subsequent information retrieval.
[0019] In some embodiments of this application, after migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, the method further includes: obtaining a first related query request message during the execution of the second subtask; determining at least one fourth retrieval information based on the first related query request message; the fourth retrieval information being retrieval information in the second storage area whose relevance score to the first related query request message is greater than or equal to a fourth threshold; and migrating at least one fourth retrieval information from the second storage area to the first storage area.
[0020] In this embodiment, by introducing a query-based cold zone data promotion mechanism, the agent can activate historical data on demand, enabling in-depth cross-analysis across subtasks without preloading all data, thus further optimizing the dynamic balance of memory and computing resources.
[0021] In some embodiments of this application, after storing the summary information of the execution information of the first subtask of the first subtask in the third storage area, the method further includes: obtaining a second related query request message during the execution of the second subtask; determining the first summary information corresponding to the second related query request message; the first summary information is the summary information in the third storage area whose correlation score with the related query request message is greater than or equal to a fifth threshold; and migrating the first summary information from the third storage area to the first storage area.
[0022] In this embodiment, by promoting the temperature zone summary to the hot zone as needed, the historical conclusions can be referenced instantly, avoiding repeated retrieval or recalculation, and further improving the task execution efficiency.
[0023] Secondly, embodiments of this application provide a task processing apparatus, which includes: a processing module, configured to, when switching from executing a first subtask to executing a second subtask, migrate at least one first retrieval information of the first subtask from a first storage area to a second storage area, and store summary information of the first subtask execution information of the first subtask in a third storage area; the processing module is further configured to generate task execution information of the first task based on the summary information of the first subtask and the subtask execution information of the second subtask; wherein the first task includes the first subtask and the second subtask.
[0024] In some embodiments of this application, the processing module is further configured to: during the execution of the first subtask, obtain at least one second search information corresponding to the first subtask; determine the correlation score between the at least one second search information and the first subtask; and store at least one third search information in the at least one second search information whose correlation score is greater than or equal to a first threshold in the first storage area; wherein the at least one third search information includes the at least one first search information.
[0025] In some embodiments of this application, the processing module is specifically used to: input the at least one second retrieval information and the task description information of the first subtask into the relevance scoring model to obtain the relevance score.
[0026] In some embodiments of this application, the processing module is further configured to: before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, input the at least one third retrieval information and the task description information of the second subtask into the relevance scoring model to obtain a relevance score; and determine at least one third retrieval information with a relevance score less than a second threshold as the first retrieval information.
[0027] In some embodiments of this application, the first storage area and the third storage area are located in the memory of the electronic device, and the second storage area is located in the vector database.
[0028] In some embodiments of this application, the processing module is further configured to: extract key information from the subtask execution information of the first subtask before storing the summary information of the first subtask into the third memory; generate summary information based on the key information and the task field; wherein the key information includes at least one of the following: task identifier; key conclusion; numerical parameters; time range.
[0029] In some embodiments of this application, the processing module is specifically configured to: delete the at least one first retrieval information from the first storage area and store the at least one first retrieval information in the second storage area; store the index identifier of the at least one first retrieval information in the first storage area; wherein the index identifier has a mapping relationship with the first retrieval information in the second storage area.
[0030] In some embodiments of this application, the processing module is further configured to: obtain a first association query request message during the execution of the second subtask; determine at least one fourth retrieval information based on the first association query request message; the fourth retrieval information is retrieval information in the second storage area whose association score with the first association query request message is greater than or equal to a fourth threshold; and migrate the at least one fourth retrieval information from the second storage area to the first storage area.
[0031] In some embodiments of this application, the processing module is further configured to: obtain a second related query request message during the execution of the second subtask; determine first summary information corresponding to the second related query request message; the first summary information is summary information in the third storage area whose correlation score with the second related query request message is greater than or equal to a fifth threshold; and migrate the first summary information from the third storage area to the first storage area.
[0032] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0033] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0034] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0035] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0036] In this embodiment, when switching from executing a first subtask to executing a second subtask, at least one first retrieval information of the first subtask is migrated from the first storage area to the second storage area, and the summary information of the first subtask execution information of the first subtask is stored in the third storage area. Based on the summary information of the first subtask and the subtask execution information of the second subtask, task execution information of the first task is generated; wherein, the first task includes the first subtask and the second subtask. Through this solution, when switching tasks, at least one first retrieval information of the previous subtask is actively moved out of the first storage area, such as the fast access area, and the task execution information of the previous subtask is extracted into summary information and stored independently. This frees up storage space for storing relevant information of the current subtask, effectively avoiding information overflow and truncation caused by the context window being filled with irrelevant data, thereby improving the accuracy and consistency of AI model task processing. Attached Figure Description
[0037] Figure 1 A flowchart illustrating a task processing method provided for some embodiments of this application;
[0038] Figure 2 A schematic diagram of the AI interactive interface provided for some embodiments of this application;
[0039] Figure 3 A schematic diagram of the AI interactive interface provided for some embodiments of this application;
[0040] Figure 4 A schematic diagram of the AI interactive interface provided for some embodiments of this application;
[0041] Figure 5 A flowchart illustrating a task processing method provided for some embodiments of this application;
[0042] Figure 6 A flowchart illustrating a task processing method provided for some embodiments of this application;
[0043] Figure 7 Schematic diagrams of the structure of a task processing apparatus provided for some embodiments of this application;
[0044] Figure 8 Schematic diagrams of the structure of electronic devices provided for some embodiments of this application;
[0045] Figure 9 A schematic diagram of the hardware structure of an electronic device provided for some embodiments of this application. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0047] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0048] The terms "at least one," "at least one of," etc., used in the specification and claims of this application refer to any one, any two, or a combination of two or more of the included items. For example, at least one of a, b, and c can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple. Similarly, "at least two" refers to two or more items, and its meaning is similar to that of "at least one."
[0049] The terminology used in the implementation section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. The terminology involved in the embodiments of this application is explained below.
[0050] An AI agent is an intelligent system that can "perceive" its environment, "think," and proactively "act" to achieve specific goals.
[0051] The context manager of an intelligent agent is responsible for managing information involved in task execution.
[0052] The hot storage area for context data primarily stores data highly relevant to task execution and resides in the Agent's memory.
[0053] The context data cold storage area, or Cold Storage, mainly stores data with low relevance to task execution. It is located in the vector database, while the index is stored in the Agent's memory.
[0054] The object query method provided in this application can be executed by an object query device, which can be an electronic device, or a functional module or functional entity within an electronic device. The following description uses an electronic device executing the object query method as an example to illustrate the object query method provided in this application.
[0055] The task processing method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0056] The task processing method provided in this application can be applied to scenarios where AI models need to perform multi-step, long-process, and complex tasks.
[0057] One specific scenario is as follows: A user makes a complex travel planning request, such as "Please help me plan a two-week trip to location A, including hiking and skiing, with a budget of 50,000 yuan and a departure date of December 20th." The AI model breaks down the main task into multiple sub-tasks, such as itinerary planning for location A, hiking arrangements, and skiing arrangements, which are executed sequentially. Finally, the model integrates the execution information of each sub-task to generate a complete travel plan.
[0058] Another specific scenario is as follows: A user sends an instruction: "Please write a 2025 humanoid robot industry chain analysis report, focusing on upstream core components, midstream robot manufacturing, and downstream application scenarios, including specific market size data and analysis of leading companies." The AI model breaks down the task into sub-tasks such as "upstream component analysis," "midstream robot manufacturer analysis," "downstream application and market size forecast," and "report summary," which are executed sequentially. Finally, the information from the execution of each sub-task is integrated to generate a complete industry analysis report.
[0059] Figure 1 This is a flowchart illustrating the task processing method provided in the embodiments of this application, as shown below. Figure 1 As shown, the task processing method may include the following steps 201 and 202:
[0060] Step 201: When the electronic device switches from executing the first subtask to executing the second subtask, it migrates at least one first retrieval information of the first subtask from the first storage area to the second storage area, and stores the summary information of the first subtask execution information of the first subtask in the third storage area.
[0061] In some embodiments of this application, the electronic device acquires a first task, which includes at least one subtask.
[0062] In some embodiments of this application, the first task described above includes a first subtask and a second subtask.
[0063] In some embodiments of this application, the aforementioned first task can be determined based on task request information submitted by the user in the AI interactive interface. For example, the first task could be "writing a 2025 humanoid robot industry chain analysis report" or "planning a two-week trip to location A".
[0064] In some embodiments of this application, the AI interactive interface described above can be an interactive interface between the user and the AI assistant.
[0065] In some embodiments of this application, the AI assistant described above may be an intelligent dialogue assistant, a chatbot, or a virtual assistant, etc.
[0066] In some embodiments of this application, the task request information may include task description information.
[0067] In some embodiments of this application, after receiving task request information input by the user through an AI agent, the electronic device inputs the task request information into a large language model, identifies a first task based on the task request information through the large language model, and breaks down the first task into multiple sub-tasks to be executed sequentially.
[0068] In some embodiments of this application, the aforementioned large language model refers to a deep learning model that has been pre-trained on a large-scale corpus and has the ability to understand and generate natural language. It can understand the user's intent based on the input instruction content and output structured task decomposition results.
[0069] In some examples, the user inputs the task description "Write a 2025 humanoid robot industry chain analysis report". The electronic device inputs this task description information into a large language model through an AI agent. Based on this task description information, the large language model identifies the first task as writing a 2025 humanoid robot industry chain analysis report and breaks down this report writing task into multiple sub-tasks to be executed sequentially. For example, the sub-tasks include: the first sub-task "upstream component analysis", the second sub-task "midstream robot manufacturer analysis", and the third sub-task "downstream application scenario analysis".
[0070] In some examples, a user inputs the task description "planning a two-week trip to location A, including hiking and skiing." The AI agent inputs this task description into a large language model. Based on this description, the model identifies the primary task as travel planning for location A and breaks it down into multiple sequentially executed subtasks. For example, the resulting subtasks might include: a first subtask "hiking itinerary arrangement" and a second subtask "skiing itinerary arrangement."
[0071] The task processing method provided in the embodiments of this application will be illustrated below with specific scenarios.
[0072] In some embodiments of this application, the task processing method provided in this application can be applied to intelligent tourism planning scenarios.
[0073] For example, such as Figure 2 As shown, the electronic device displays an AI interactive interface 11, which includes a "+New Conversation" option, a prompt message "Please enter your task, and I will complete it for you," and a task description information input box 12. The user enters the initial instruction in the task description information input box 12 of the AI interactive interface 11: "Help me plan a two-week trip to location A, including hiking and skiing. The total budget is 50,000 yuan, and the departure date is December 20th." After receiving this initial instruction, the AI agent initiates the processing of the first task.
[0074] Specifically, the electronic device scores the relevance of the initial instruction using a context manager. The context manager submits the task description for the current stage to a large language model, which identifies the instruction as the user's initial task objective and outputs a score of 1.0 because it contains the user's task requirements. Based on this score, the context manager stores the user's initial instruction in complete text form in the first storage area and marks it as "locked" to ensure it remains visible throughout the entire long-process task execution.
[0075] Furthermore, the electronic device uses an AI agent to break down the first task and identify multiple implicit needs in the user's instructions. For example, by analyzing the key elements in the instructions such as "mountain climbing," "skiing," "two-week trip," "budget of 50,000 yuan," and "departure date of December 20th," the AI agent breaks down the first task into three sequentially executed sub-tasks: the first sub-task is "mountain climbing itinerary arrangement," the second sub-task is "skiing itinerary arrangement," and the third sub-task is "flight and hotel booking."
[0076] In some embodiments of this application, the task processing method provided in this application can be applied to the scenario of generating research reports in the automation industry.
[0077] For example, a user inputs a research report writing instruction: "Please write an analysis report on the Chinese humanoid robot industry chain in 2025, focusing on upstream core components, midstream robot manufacturing, and downstream application scenarios, including specific market size data and analysis of leading companies." After receiving this task request information, the AI agent starts processing the first task.
[0078] Specifically, the context manager submits the task description information for the current stage to the large language model for relevance scoring. The large language model identifies that the instruction contains the core framework requirements of the report and outputs a score of 1.0, which is the highest priority. Based on this score, the context manager stores the user's original instruction in complete text form in the first storage area and marks it as "locked".
[0079] Furthermore, the electronic device uses an AI agent to break down the first task and identify the scope of industry chain analysis explicitly stated in the user's instructions. For example, by analyzing the key elements in the instructions, such as "upstream core components," "midstream body manufacturing," "downstream application scenarios," "market size data," and "leading enterprise analysis," the AI agent breaks down the first task into four sequentially executed sub-tasks: the first sub-task is "upstream core component analysis," the second sub-task is "midstream body manufacturer analysis," the third sub-task is "downstream application scenarios and market size forecasting," and the fourth sub-task is "report summarization and output."
[0080] In some embodiments of this application, the first subtask can be a subtask of the first task, and similarly, the second subtask can be another subtask of the first task.
[0081] It should be noted that the explanations of the first and second subtasks can be found in the description above, and will not be repeated here to avoid repetition.
[0082] In some embodiments of this application, the aforementioned first retrieval information may be information obtained by the AI agent from an external data source for performing a subtask. For example, during the execution of any subtask, the AI agent may retrieve relevant information from the Internet, local databases, knowledge bases, or application programming interfaces based on the task description of the subtask to obtain the retrieval information.
[0083] In some embodiments of this application, the form of the first retrieval information includes, but is not limited to: web page text, document fragments, structured data records, image description text, audio transcribed text, or data content returned by an application programming interface.
[0084] It should be noted that the retrieved information is raw, unprocessed data, which may contain data highly relevant to the current subtask, or it may contain a large amount of irrelevant information. Therefore, it can be filtered and classified through subsequent relevance scoring and partitioned storage mechanisms.
[0085] For example, in a tourism planning scenario, the retrieved information could be the AI agent searching for web pages introducing various scenic spots in location A when performing the "hiking itinerary arrangement" subtask, and the full text of the retrieved web pages would be the primary retrieved information. In an industry research report generation scenario, the retrieved information could be the company's financial reports and brokerage research reports retrieved by the AI agent when performing the "upstream component analysis" subtask.
[0086] In some embodiments of this application, the correlation between the first retrieval information and the second subtask is less than a second threshold.
[0087] It should be noted that the second threshold is a critical value used to determine whether the first retrieved information should be migrated from the first storage area to the second storage area. When the relevance score of some first retrieved information to the second subtask is lower than the second threshold, it indicates that the retrieved information has a low relevance to the currently executed second subtask and can continue to occupy the limited space in the first storage area. Therefore, it is identified as information to be migrated.
[0088] In some embodiments of this application, the aforementioned second threshold can be preset or dynamically adjusted according to the actual application scenario. For example, the second threshold can be set to 0.3, meaning that a data migration operation is triggered when the correlation score is less than 0.3. It is understood that the specific value of the second threshold is related to the normalized range of the correlation score, and this application does not limit the specific value of the second threshold.
[0089] In some embodiments of this application, the first and third storage areas are located in the memory of the electronic device, and the second storage area is located in the vector database.
[0090] For example, the first storage area mentioned above is a fast-access memory area, such as a hot storage area in memory, used to store data that is highly relevant to the currently executing subtask.
[0091] For example, the second storage area is a slow, high-capacity storage area, such as the cold storage area in a vector database, used to store raw data with low correlation but which needs to be retained for a long time.
[0092] In some embodiments of this application, when the first subtask is completed, that is, when switching from the first subtask to the execution of the second subtask, the electronic device will migrate at least one first retrieval information stored in the first storage area to the second storage area.
[0093] It should be noted that the above migration operation is triggered by the switching of subtasks, that is, when the AI agent completes the first subtask and is ready to execute the next subtask. Furthermore, the object of the migration is the first retrieval information whose score in the cross-task relevance reassessment is lower than the second threshold. By migrating the first retrieval information, which has low relevance to the currently pending second subtask, from the hot memory area to the cold storage area of the vector database, it avoids continuing to occupy space in the first storage area, thereby facilitating the efficient execution of subsequent tasks.
[0094] In some examples, within a tourism planning scenario, after the first subtask, "Hiking Itinerary Planning," is completed, the first storage area contains detailed web pages about various hiking attractions in location A—the initial search information. When switching to the second subtask, "Skiing Itinerary Planning," the electronic device uses a context manager to evaluate the cross-task relevance of each web page. The web page about hiking attractions in location A has a relevance score of only 0.1 with the "Skiing" task, below a preset second threshold (e.g., 0.3). The electronic device then deletes this web page from memory and stores it completely in the vector database, while retaining its index in memory for future needs. Thus, the first storage area is cleared, freeing up space to load ski resort-related data.
[0095] In some examples, within an industry research report generation scenario, after the first subtask, "Upstream Component Analysis," is completed, the first storage area contains financial report information, i.e., the first retrieval information. When switching to the second subtask, "Midstream Ontology Manufacturer Analysis," the context manager performs a relevance score on this financial report information. If the score is determined to be 0.2, which is below a second threshold (e.g., 0.3), the financial report information is migrated from memory to a vector database, while retaining its index in memory. The freed-up space in the first storage area is then used to load technical parameters and product information related to the midstream ontology manufacturers, ensuring the efficient execution of subsequent subtasks.
[0096] In some embodiments of this application, the summary information of the first subtask execution information of the first subtask mentioned above refers to a lightweight data representation containing key conclusions obtained by refining the complete task execution information generated during the execution of the first subtask.
[0097] For example, after the first subtask is completed, the electronic device uses an AI agent to generate complete subtask execution information based on highly relevant search content stored in the first storage area. Then, the electronic device performs summarization processing on this subtask execution information to generate summary information. This avoids the complete subtask execution information occupying space in the first storage area for an extended period, while also facilitating quick reference to this subtask execution information by subsequent subtasks.
[0098] In some embodiments of this application, the aforementioned third storage area is located in the memory of the electronic device.
[0099] For example, the third storage area is a region for storing summary information, such as the warm storage area in memory, i.e., WarmStorage, which is used to store the core conclusion summary of the completed subtasks.
[0100] It should be noted that the first storage area is located in memory to ensure high-speed access to highly relevant data for the current subtask; the third storage area is also located in memory, but it stores lightweight summaries, which occupy little space and can be read quickly; the second storage area uses a vector database to persistently store the original data and provide retrieval capabilities based on vector similarity, while only the index is maintained in memory to save space.
[0101] In some embodiments of this application, when the electronic device finishes executing the first subtask and switches to execute the second subtask, it migrates at least one first retrieval information of the first subtask from the first storage area to the second storage area, and stores the summary information of the first subtask execution information of the first subtask in the third storage area.
[0102] For example, in a tourism planning scenario, when an AI agent completes the first sub-task, such as arranging a mountain climbing itinerary, and prepares to execute the second sub-task, such as arranging a skiing trip, a task switch is triggered. At this time, the electronic device will evaluate the relevance of the search information used during the first sub-task and migrate the parts with lower relevance to the second sub-task from the first storage area to the second storage area to free up space in the first storage area; at the same time, the execution result generated by the first sub-task, such as the draft plan for mountain climbing, is extracted into summary information and stored in the third storage area.
[0103] In some embodiments of this application, the electronic device executes the second subtask after migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area and storing the summary information of the first subtask execution information of the first subtask in the third storage area.
[0104] For example, taking a smart tourism planning scenario, the first task is "planning a two-week trip to location A," with the first sub-task being "arranging a mountain climbing itinerary" and the second sub-task being "arranging a skiing itinerary." After the first sub-task is completed and the data migration and summary storage are finished, the AI agent begins to execute the second sub-task, "arranging a skiing itinerary."
[0105] For example, the AI agent searches for relevant information from external data sources based on the task description of the second subtask, such as searching for "recommended ski resorts in location A," "ski resort transportation methods," and "ski price list," obtaining multiple second search results. The electronic device uses a context manager to score the relevance of each second search result. Specifically, the task description of the current subtask, "ski itinerary arrangement," and each second search result are input into a large language model. The large language model evaluates the relevance of each search result to completing the current subtask and outputs a relevance score normalized to the [0,1] interval. For example, a detailed introduction webpage of a ski resort, containing information highly relevant to skiing arrangements such as ski slope information, opening hours, and rental prices, receives a relevance score of 0.95; while some Hokkaido food recommendation webpages unrelated to skiing receive lower scores. Then, based on the above scoring results, the context manager identifies second search information with a relevance score greater than a first threshold, such as 0.8, as high-relevance data and stores its complete text in the hot storage area. Finally, based on the detailed ski resort data stored in the first storage area, the AI agent extracts information such as ski resort introductions, ticket prices, and transportation methods, and synthesizes this information to generate subtask execution information for the second subtask, such as a detailed "skiing guide." In this way, an intelligent assistant can be implemented based on the agent's intelligent partitioning strategy to help generate logically clear and data-complete travel guides.
[0106] For example, taking the scenario of generating an automation industry research report, the first task is "Writing an Analysis Report on the Humanoid Robot Industry Chain in 2025," with its first sub-task being "Analysis of Upstream Core Components" and the second sub-task being "Analysis of Midstream Robot Manufacturers." After the first sub-task is completed and data migration and summary storage are finished, the AI agent begins to execute the second sub-task, "Analysis of Midstream Robot Manufacturers." Based on the task description of the second sub-task, the AI agent searches for relevant information from external data sources, such as relevant technical parameters and the cost structure of midstream robot manufacturers, obtaining multiple second search results. The context manager scores the relevance of each second search result. Specifically, the task description of the current sub-task, "Analysis of Midstream Robot Manufacturers," and each second search result are input into a large language model. The large language model evaluates the relevance of each search result to completing the current sub-task and outputs a relevance score normalized to the [0,1] interval. For example, a technical parameter report, containing content highly relevant to midstream manufacturing such as robot structure, drive system, and control algorithm, receives a relevance score of 0.92; while some upstream raw material price news unrelated to robot manufacturing receives a lower score. Based on the scoring results, the context manager identifies the second retrieval information with a relevance score greater than the first threshold as highly relevant data and stores its complete text in the hot storage area. Finally, the AI agent extracts technical parameters, product characteristics, supply chain information, etc., from the detailed data of midstream ontology manufacturers stored in the first storage area, and analyzes it in conjunction with upstream summary information in the third storage area to comprehensively generate subtask execution information for the second subtask. In this way, an industry research agent can be implemented based on the agent's intelligent partitioning strategy, helping to output complete industry research reports with detailed data support.
[0107] In this embodiment of the application, through the above steps, when switching tasks, the low-association original data of the previous subtask is automatically migrated to the cold zone and the task execution information summary is stored in the warm zone, thereby freeing up hot zone space for the current subtask, while retaining lightweight references to historical conclusions, effectively avoiding context overflow and loss of key information, and improving the continuity and accuracy of long-process task execution.
[0108] Step 202: The electronic device generates task execution information for the first subtask based on the summary information of the first subtask and the subtask execution information of the second subtask.
[0109] In some embodiments of this application, after the second subtask is completed, the electronic device can combine the summary information of the first subtask and the detailed results of the second subtask to generate the final first task execution information.
[0110] For example, in a tourism planning scenario, after the second subtask "skiing itinerary arrangement" is completed, the electronic device reads the subtask execution information "mountain climbing itinerary planning summary" of the first subtask in the hot storage area and "skiing itinerary arrangement" in the hot storage area, and generates a "two-week trip plan for location A" that includes the complete itinerary, budget and precautions for both locations.
[0111] The following specific examples illustrate the task processing method provided in the embodiments of this application.
[0112] In some embodiments of this application, taking the intelligent tourism planning scenario as an example, the first task is "planning a two-week trip to location A", which includes multiple sub-tasks executed in sequence, such as the first sub-task "mountain climbing itinerary arrangement" and the second sub-task "skiing itinerary arrangement".
[0113] For example, after all subtasks have been completed, the AI agent enters the final summary stage and begins generating the final result of the first task. At this point, the following data has been accumulated in each storage area:
[0114] The first storage area stores highly relevant data for the last subtask currently being processed, such as detailed guides and original user instructions generated by the "skiing itinerary planning" subtask, and the original user instructions are locked.
[0115] The third storage area stores summary information generated by each completed subtask, such as "Mountain climbing trip summary: five-day trip, overnight stay at a mountain climbing hotel, visit attractions such as the main peak and waterfall, budget consumption of 18,000 yuan";
[0116] The second storage area stores the original search content and its index identifiers used by each subtask, such as the full text of the detailed introduction webpage of mountain climbing attractions and the original data of ski resorts.
[0117] Then, the AI agent performs comprehensive analysis and content fusion based on the detailed data of the current subtask in the first storage area, the summary information of historical subtasks in the third storage area, and the optional references to the original data in the second storage area. For example, the AI agent reads the mountain climbing itinerary summary stored in the temperate zone to obtain the core conclusions of the completed portion, reads the detailed ski resort guide stored in the hot zone to obtain the specific arrangements for the current portion, and integrates the two into a complete two-week travel plan for location A. Figure 3As shown, the electronic device displays an AI interactive interface 13, which includes the task name "Two-week trip plan for location A", the task description information entered by the user "Help me plan a two-week trip to location A, I hope to go hiking and skiing, the total budget is 50,000 yuan, the departure time is December 20th", and a detailed two-week trip plan for location A, which includes detailed itineraries for both locations, daily arrangements, accommodation recommendations, budget allocation, transportation suggestions, etc.
[0118] In some embodiments of this application, taking the automation industry research report generation scenario as an example, the first task is "writing an annual humanoid robot industry chain analysis report", which includes multiple sub-tasks executed in sequence, such as the first sub-task "upstream core component analysis", the second sub-task "midstream robot manufacturer analysis", and the third sub-task "downstream application scenarios and market size forecast", etc.
[0119] For example, after all subtasks have been completed, the AI agent enters the overall summary task and begins generating the final result of the first task, namely the complete industry analysis report. At this point, the following data has been accumulated in each storage area:
[0120] The third storage area stores the summary information generated by each subtask, such as the upstream summary: {"segment": "reducer", "top_player": "a leading enterprise", "market_share": "40%", "trend": "accelerating domestic substitution"}; the midstream summary: {"segment": "ontology manufacturing", "key_players": "ontology manufacturer A, ontology manufacturer B", "cost_structure": "reducer accounts for 35%"}; and the downstream summary: {"market_size_2025": "20 billion yuan", "growth_rate": "25%"}, etc.
[0121] The first storage area may still retain some highly relevant data used by the last executed subtask, such as the specific technical parameters of an ontology manufacturer that were just used for analysis.
[0122] The second storage area stores the original search content and its index identifiers used by each subtask, such as the full text of each company's financial report, the original text of research report, and industry statistics.
[0123] Then, the context manager performs a final-stage relevance score on the data in the first and third storage areas to determine the core materials needed to generate the final report. Specifically, the user's initial task request information and the summary information in the third storage area are input into the large language model, which evaluates the relevance of each summary to the conclusions of the final report. For example, the chapter summaries, because they highly summarize the core conclusions of each link in the industry chain, receive a score of 0.95 and are identified as highly relevant data; while the specific technical parameters of a certain body manufacturer recently used in the first storage area, because they are too detailed and have already been referenced in the midstream chapters, have reduced relevance to the conclusions of the macro report, and their score drops to 0.3. They can be cleaned up from the first storage area or migrated to the second storage area for archiving as needed. Based on the above scoring results, the AI agent mainly relies on the high-level summary information in the third storage area, integrates the core conclusions of each sub-task, performs macro-level summarization and content integration, and synthesizes a complete annual humanoid robot industry chain analysis report, such as... Figure 4 As shown, the electronic device displays an AI interactive interface 14, which includes the task name "Annual Humanoid Robot Industry Chain Analysis Report", the task description information entered by the user "Please write an annual humanoid robot industry chain analysis report, focusing on upstream core components, midstream robot manufacturing and downstream application scenarios, and must include specific market size data and analysis of leading enterprises", as well as the specific annual humanoid robot industry chain analysis report 15.
[0124] The task processing method provided in this application embodiment involves an electronic device switching from executing a first subtask to executing a second subtask. At least one first retrieval piece of information from the first subtask is moved from a first storage area to a second storage area, and a summary of the first subtask execution information is stored in a third storage area. Based on the summary information of the first subtask and the subtask execution information of the second subtask, task execution information for the first task is generated. This solution proactively removes at least one first retrieval piece of information from the previous subtask (e.g., from the quick access area) during task switching, while simultaneously refining the task execution information of the previous subtask into a summary and storing it independently. This frees up storage space for the relevant information of the current subtask, effectively preventing information overflow and truncation caused by the context window being filled with irrelevant data, thereby improving the accuracy and consistency of AI model task processing.
[0125] In some embodiments of this application, before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area in step 201 above, the task processing method provided in this application embodiment may further include the following steps 204 to 206:
[0126] Step 204: During the execution of the first subtask, the electronic device obtains at least one second retrieval information corresponding to the first subtask.
[0127] Step 205: The electronic device determines a correlation score between at least one second retrieval information and the first subtask.
[0128] Step 206: The electronic device stores at least one third retrieval information in the first storage area where the relevance score of at least one second retrieval information is greater than or equal to the first threshold.
[0129] Wherein, the at least one third search information includes the at least one first search information.
[0130] In some embodiments of this application, during the execution of the first subtask, the electronic device can retrieve relevant information from an external data source to assist in completing the subtask, which is the second retrieval information, and its form can be web page text, document fragments, structured data, etc.
[0131] In some embodiments of this application, the aforementioned external data source may be the Internet, databases, knowledge bases, etc.
[0132] For example, in the "Planning Itinerary for Location A" subtask, the electronic device searches for web pages such as "Official Website of Location A" and "Travel Guide for Location A" through an intelligent agent, and the content of the obtained web pages is the second search information.
[0133] In some embodiments of this application, the aforementioned relevance score is used to measure the value of the retrieved information to the current subtask. For example, the electronic device can input each second retrieval piece of information and the task description of the first subtask into a preset relevance score model, which outputs a normalized score; a higher score indicates a stronger relevance to the subtask.
[0134] For example, for the webpage "Official Website of Location A", the model outputs a relevance score of 0.9; for the webpage "Official Website of Location B", the model outputs a score of 0.2.
[0135] In some embodiments of this application, the first threshold is a preset critical value for filtering highly correlated data, such as 0.8.
[0136] It should be noted that the electronic device only stores the retrieval information whose score reaches or exceeds the first threshold, i.e., the third retrieval information, into the first storage area for the intelligent agent to quickly access when generating subtask execution information.
[0137] For example, in the trip planning for location A, the official website webpage of location A with a rating of 0.9 is stored in the hot zone, while the official website webpage of location B with a rating of 0.2 is discarded or stored in other areas.
[0138] The following specific examples illustrate the task processing method provided in the embodiments of this application.
[0139] In some embodiments of this application, taking the intelligent tourism planning scenario as an example, the first task is "planning a two-week trip to location A", the first sub-task is "arranging a mountain climbing itinerary", and the second sub-task is "arranging a skiing itinerary".
[0140] For example, during the execution of the first subtask, "Hike Itinerary Planning," the electronic device uses an AI agent to search and retrieve a large number of introductory web pages related to hiking in location A from external data sources, such as "Official Website of the Main Peak Scenic Area in Location A" and "Visit Guide to the Waterfall in Location A," resulting in multiple first search results. The context manager scores the relevance of each first search result. Specifically, the electronic device inputs the task description "Hike Itinerary Planning" of the current subtask and each first search result into a large language model through the context manager. The large language model evaluates the relevance of the search result to completing the current subtask and outputs a relevance score normalized to the [0,1] interval. For example, the "Official Website of the Main Peak Scenic Area in Location A" webpage, due to its detailed introduction of hiking routes, altitude, and ticket information, is highly relevant to the "Hike Itinerary Planning" task and receives a relevance score of 0.9; while the "Recommendation of Local Specialties and Foods in Location A" webpage has a lower relevance to the hiking task and receives a score of 0.2.
[0141] For example, based on the aforementioned relevance score, the electronic device uses a context manager to identify the first search result with a relevance score greater than the first threshold, namely the webpage for "Official Website of the Main Peak Scenic Area of Location A" with a score of 0.9, as highly relevant data, and stores its complete text in the hot storage area. The AI agent, based on these highly relevant search results stored in the first storage area, extracts detailed information such as attraction descriptions, hiking routes, ticket prices, and opening hours, and comprehensively generates the execution result of the first sub-task, such as a detailed "Draft Itinerary for a Five-Day Hiking Trip to Location A". This execution result can be used as the output of the first sub-task and can be used to generate a summary in subsequent steps.
[0142] For example, after the first subtask "mountain climbing itinerary arrangement" is completed, the AI agent starts to execute the next subtask, namely the second subtask "skiing itinerary arrangement". When switching from the first subtask to the second subtask, the context manager performs data re-evaluation and dynamic partitioning operations.
[0143] First, the context manager re-evaluates the cross-task relevance of each context data stored in the first storage area during the first subtask. Specifically, each data point is input into the large language model along with the task description of the second subtask, "Skiing Itinerary Arrangement," to obtain a new relevance score. For example, for the original search content used during the first subtask, such as the full text of the webpage "Official Website of the Main Peak Scenic Area in Location A," because its content focuses on hiking and is unrelated to the skiing arrangement, the large language model outputs a score of 0.1, indicating extremely low relevance. For the execution result generated by the first subtask, namely the "Draft Itinerary for a Five-Day Hiking Trip to Location A," because it contains the core conclusions of the completed itinerary, such as the number of days, hotels, and budget, and has background reference value for subsequent tasks, the large language model outputs a score of 0.5, indicating moderate relevance.
[0144] Next, based on the above scoring results, the context manager performs the following partitioning actions: Original search content with a relevance score less than the second threshold is migrated from the hot storage area to the cold storage area, such as a vector database. Specifically, the complete text of the webpage is deleted from the first storage area and stored in the second storage area, while its index identifier is retained in the first storage area. Simultaneously, the execution result of the first subtask, namely the "Draft Itinerary for a Five-Day Mountain Climbing Trip to Location A," is summarized and stored in the warm storage area. Specifically, the "Draft Itinerary for a Five-Day Mountain Climbing Trip to Location A" is input into a large language model or text summarization model to extract core elements, such as the number of days, hotels, attractions, and budget, and organized into a formatted summary according to preset fields, for example: {"Task": "Mountain Climbing Itinerary Arrangement", "Summary": "Five-day trip, staying in a mountain view hotel, visiting the main peak, waterfall, etc.", "Budget": "18,000 yuan", "Dates": "12.20-12.24"}. This summary information is stored in the third storage area as reference information for subsequent subtasks.
[0145] Understandably, after the above operations, the low-relevance raw data in the first storage area is cleared, freeing up storage space to prepare for the second subtask to load high-relevance data; at the same time, the core conclusions of the first subtask are retained in the third storage area in the form of a lightweight summary, which can be referenced by subsequent subtasks at any time.
[0146] In some embodiments of this application, taking the automation industry research report generation scenario as an example, the first task is "writing the 2025 humanoid robot industry chain analysis report", the first sub-task is "upstream core component analysis", and the second sub-task is "midstream robot manufacturer analysis".
[0147] For example, during the execution of the first subtask, "Analysis of Upstream Core Components," the AI agent searches the internet from external data sources to obtain raw data related to upstream components. For instance, the AI agent searches for 2024 financial reports and brokerage research reports, obtaining approximately 8,000 words of raw text, which serves as the first search content. Next, a context manager scores the relevance of each first search content. Specifically, the context manager inputs the task description of the current subtask, "Analysis of Upstream Components for Humanoid Robots," along with each first search content, such as the full text of a financial report, into a large language model. The large language model evaluates the relevance of the search content to completing the current subtask and outputs a relevance score normalized to the [0,1] interval. For example, the financial report information, containing key information such as financial data, technical parameters, and shipment volume of harmonic reducers, is highly relevant to the "Analysis of Upstream Components" task and receives a relevance score of 0.95; while some financial report paragraphs involving corporate administration or non-core business may receive lower scores. Next, based on the above scoring results, the context manager identifies the first search information with a relevance score greater than the first threshold as highly relevant data and stores its complete text in its original format in the hot storage area. The AI agent then extracts core data from these highly relevant search contents stored in the first storage area, such as harmonic reducer shipments, market share, and technological trends, and writes the execution results of the first sub-task, for example, the first chapter of the report, "Core Components: Reducer Market Landscape," citing specific figures such as "2024 harmonic reducer shipments" as supporting data.
[0148] For example, after the first subtask, "Upstream Core Component Analysis," is completed, the AI agent moves on to the next subtask, the second subtask, "Midstream Ontology Manufacturer Analysis." Upon switching from the first to the second subtask, the context manager performs data reassessment and dynamic partitioning. First, the context manager reassesses the cross-task relevance of each context data stored in the first storage area during the first subtask. Specifically, each data point is input into the large language model along with the task description of the second subtask, "Humanoid Robot Midstream Ontology Manufacturer Analysis," to obtain a new relevance score. For example, the original search content used during the first subtask, focusing on upstream component suppliers, has low relevance to midstream ontology manufacturing analysis, resulting in a score of 0.2 from the large language model, indicating low relevance. The execution results generated by the first subtask contain the core conclusions of the upstream analysis and can serve as background reference for subsequent subtasks; the large language model outputs a score of 0.6, indicating moderate relevance. It should be noted that this score can also be directly determined based on the markings made to the execution information of the first subtask after the previous round of execution, without needing to repeatedly call the large language model.
[0149] Finally, based on the above scoring results, the context manager performs the following partitioning actions: Original search content with relevance scores below the second threshold is migrated from the hot storage area to the cold storage area. Specifically, the complete text of the financial report is deleted from the first storage area and stored in the second storage area, while its index identifier is retained in the first storage area to support possible future on-demand retrieval. Simultaneously, the execution results of the first subtask are summarized, generating summary information which is stored in the warm storage area. Specifically, this section is input into a large language model or text summarization model to extract its core conclusions, which are then organized into a formatted summary according to preset fields, serving as background reference information for subsequent subtasks.
[0150] Understandably, after the above processing, the low-association original data in the first storage area is cleared, and only the user's initial instructions and the target description of the current subtask are retained, freeing up storage space for the second subtask to load the relevant data of the midstream ontology manufacturer; at the same time, the core conclusions of the first subtask are retained in the third storage area in the form of a lightweight summary, which can be referenced by subsequent subtasks at any time.
[0151] In this embodiment of the application, by determining the correlation score between the retrieval information corresponding to the first subtask and the subtask, a large amount of retrieval information is filtered based on the correlation score, and only highly correlated data is stored in the hot zone, which avoids irrelevant data occupying the limited context window and ensures that high-quality results can be generated based on accurate data when the subtask is executed.
[0152] In some embodiments of this application, step 205 described above can be implemented by step 205a.
[0153] Step 205a: The electronic device inputs at least one second retrieval information and the task description information of the first subtask into the relevance scoring model to obtain a relevance score.
[0154] In some embodiments of this application, the electronic device can input at least one second retrieval information and the task description information of the first subtask into the relevance scoring model for relevance scoring to obtain a relevance score.
[0155] In some embodiments of this application, the relevance scoring model can be a pre-trained large language model, such as an LLM, or other machine learning-based scoring networks. Exemplarily, the relevance scoring model takes the retrieved content and task description as input and outputs a numerical value reflecting the degree of relevance between the two. This value can be a normalized probability value or a direct score.
[0156] For example, if the text of the "Official Website of Location A" webpage and the task description "Five-day tour itinerary of Location A" are input into LLM, LLM will return a score of 0.9 after inference.
[0157] Understandably, relevance scoring models can also take other forms, such as vector similarity-based models: the search content and task description are encoded into vectors respectively, and the cosine similarity is calculated as the score.
[0158] In this embodiment of the application, an automated and objective correlation assessment is achieved by calling a correlation scoring model, which can accurately and efficiently determine the correlation between the retrieved information and the currently executed sub-task, thereby providing an accurate and reliable basis for subsequent data partitioning.
[0159] In some embodiments of this application, before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area in step 201 above, the task processing method provided in this application embodiment may further include the following steps 207 and 208:
[0160] Step 207: The electronic device inputs at least one third retrieval information and the task description information of the second subtask into the relevance scoring model to obtain the relevance score.
[0161] Step 208: The electronic device identifies at least one third search result with a relevance score less than the second threshold as the first search result.
[0162] In some embodiments of this application, the aforementioned third retrieval information refers to information previously stored in the first storage area for performing the first subtask.
[0163] In some embodiments of this application, when switching from executing a first subtask to executing a second subtask, the electronic device reassesses the relevance between the aforementioned third retrieval information and the second subtask. This involves removing retrieval information from the previous task that has a low relevance to the current second subtask from the first storage area, thereby freeing up space in the first storage area for the efficient execution of the current second subtask. Specifically, the electronic device inputs each piece of third retrieval information and the task description of the second subtask into a scoring model to obtain a relevance score.
[0164] For example, after completing the first subtask "mountain climbing itinerary planning", the hotspot contains a webpage titled "Historical background of the peaks in area A", with a score of 0.9. After switching to the second subtask "skiing itinerary planning", the webpage and the task description for "skiing itinerary planning" are input into the model, resulting in a new score of 0.1.
[0165] In some embodiments of this application, the second threshold is a critical value used to determine whether data should be moved out of the hot zone. For example, the second threshold can be 0.3.
[0166] It should be noted that if the relevance score between the third search information and the second subtask is lower than the second threshold, it means that the data is irrelevant to the current task and is marked as the first search information to be migrated.
[0167] For example, since the webpage "Historical background of the mountains in location A" has a score of 0.1 compared to the current "Skiing itinerary" and is less than the second threshold of 0.3, it is identified as the first search information and a migration operation is subsequently performed.
[0168] In this embodiment, by re-evaluating the cross-task correlation of existing data during task switching and comparing the determined correlation with a threshold, low-correlation data is downgraded when the correlation is less than the threshold, thus achieving the adaptation of data storage location and task status, thereby further optimizing the utilization rate of hot zone space.
[0169] In some embodiments of this application, before storing the summary information of the first subtask to the third memory in step 201 above, the task processing method provided in this application embodiment may further include the following steps 209 and 210:
[0170] Step 209: The electronic device extracts key information from the subtask execution information of the first subtask.
[0171] Step 210: The electronic device generates summary information based on the above key information and task fields.
[0172] The aforementioned key information includes at least one of the following: task identifier; key conclusions; numerical parameters; and time range.
[0173] In some embodiments of this application, the aforementioned key information refers to key elements that can summarize the conclusions of the subtask. For example, this key information can be automatically extracted from the subtask execution information by a large language model or a text summarization model.
[0174] In some embodiments of this application, the aforementioned key information may include at least one of the following: task identifier, key conclusion, numerical parameters, and time range.
[0175] For example, for a "draft itinerary for a five-day trip to location A", the model extracts: task identifier = "Itinerary for location A", key conclusion = "mountain climbing, skiing", numerical parameter = "budget of 12,000", and time range = "December 20-24".
[0176] In some embodiments of this application, the aforementioned preset fields can be predefined data structures for organizing summaries, such as {task identifier, key conclusion, numerical parameters, time range}. For example, by assigning the extracted key information to the corresponding fields, a summary record consisting of field names and field values is generated, for example, in JSON format: {“Task”: “Itinerary in Location A”, “Conclusion”: “Five-day trip, mountain climbing, skiing”, “Budget”: “12,000”, “Date”: “12.20-12.24”}.
[0177] Understandably, the above summary information is stored in a structured format to facilitate rapid subsequent parsing and citation.
[0178] In this embodiment of the application, by extracting key information and generating a structured summary according to preset fields, efficient compression of subtask execution information is achieved. This not only preserves the key summary content of the subtask execution information but also significantly reduces storage space, while providing accurate background information references for subsequent subtasks.
[0179] In some embodiments of this application, the process of migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area in step 201 above may include the following steps 201a and 201b:
[0180] Step 201a: The electronic device deletes at least one first retrieval information from the first storage area and stores at least one first retrieval information in the second storage area.
[0181] Step 201b: The electronic device stores at least one index identifier of the first retrieval information in the first storage area.
[0182] The aforementioned index identifier has a mapping relationship with the first retrieval information in the second storage area.
[0183] In some embodiments of this application, the electronic device deletes at least one first retrieval piece of information from the first storage area and stores the at least one first retrieval piece of information in the second storage area. In this way, the electronic device can remove low-association raw data from the hot zone and store it completely in the cold zone, ensuring no data loss and freeing up space in the hot zone.
[0184] For example, the electronic device deletes the full text of the "Historical Background of Location A" webpage from the hot storage area of memory and simultaneously stores the full text in a vector database.
[0185] In some embodiments of this application, the electronic device stores an index identifier for at least one first index information, such as a document ID, in a first storage area. This identifier points to the corresponding data in a second storage area. When a subsequent subtask needs this data, it can be quickly located and retrieved from the cold storage area using the index identifier.
[0186] For example, the electronic device deletes the full text of the "Historical Background of Location A" webpage from the hot storage area of memory and stores only the identifier of the "Historical Background of Location A" webpage "Ref: Kyoto_Spots_Details_ID_001" in memory.
[0187] In this embodiment of the application, by deleting at least one first retrieval information stored in the first storage area and retaining the index of the at least one first retrieval information in the first storage area, lossless degradation of low-association data is achieved, which not only releases hot zone space but also retains data traceability, providing a foundation for subsequent information retrieval.
[0188] In some embodiments of this application, after migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area in step 201 above, the task processing method provided in this application embodiment may further include the following steps 211 to 213:
[0189] Step 211: During the execution of the second subtask, the electronic device obtains the first associated query request message.
[0190] Step 212: The electronic device determines at least one fourth retrieval information based on the first association query request message.
[0191] The fourth retrieval information mentioned above refers to the retrieval information in the second storage area whose relevance score to the first associated query request message is greater than or equal to the fourth threshold.
[0192] Step 213: The electronic device migrates at least one fourth retrieval information from the second storage area to the first storage area.
[0193] In some embodiments of this application, the aforementioned first related query request message refers to a query request for historical data generated by the AI agent when performing the current subtask due to reasoning needs. This first related query request message is used to request the use of retrieval information in the second storage area. For example, when analyzing the robot's cost structure, it is necessary to review the relevant retrieval information from the previous subtask.
[0194] In some embodiments of this application, the electronic device can convert the first association query request message into a vector query expression and perform similarity calculation with the data vectors corresponding to each index identifier in the second storage area. If the similarity score of a certain cold zone data reaches a fourth threshold, such as 0.8, it is determined as the fourth retrieval information.
[0195] For example, when the agent queries "major customers of an upstream component company", the full-text vector of the company's financial report stored in the cold storage has a similarity of 0.95, so it is selected.
[0196] In some embodiments of this application, the electronic device loads the selected cold zone data back into the hot zone of memory in full for subsequent real-time access.
[0197] For example, the paragraph about "major customers" in the financial report of an upstream component company can be retrieved from the vector database and returned to the memory hotspot to assist the intelligent agent in completing supply chain relationship analysis.
[0198] The following specific examples illustrate the task processing method provided in the embodiments of this application.
[0199] In some embodiments of this application, taking the automation industry research report generation scenario as an example, the first task is "writing an annual humanoid robot industry chain analysis report", and its second sub-task is "analysis of midstream robot manufacturers".
[0200] For example, during the execution of the second subtask, the AI agent searched for and obtained data such as the technical parameters and product specifications of a midstream component manufacturer A and a midstream component manufacturer B. When analyzing the cost structure of midstream component manufacturer A, the AI agent needs to assess its supply chain for upstream components; specifically, it needs to determine whether a leading upstream component supplier has entered the supply chain of midstream component manufacturer A. During the reasoning process, the AI agent generates a related query request: "I need to review whether the leading upstream component supplier I previously investigated has entered the supply chain of midstream component manufacturer A." Based on this query request, the system performs the following retrieval and promotion operations:
[0201] First, the AI agent reads the summary information of the first subtask stored in the third storage area and finds that it contains core conclusions from the upstream component analysis, such as the upstream summary recording that "a leading upstream component company is an industry leader." Based on this clue, the AI agent further initiates a query, retrieving detailed paragraphs about "major customers" from the upstream component company's financial statements through index identifiers retained in the second storage area, such as the index of the full text of the upstream component company's financial statements.
[0202] Next, the context manager re-evaluates the relevance of the paragraph. Specifically, the AI agent's query request, "Determine whether a leading upstream component manufacturer has entered the supply chain of midstream component manufacturer A," is input into the large language model along with a financial report paragraph retrieved from the second storage area. The large language model then assesses the relevance of this financial report paragraph to completing the current query task. For example, because the paragraph provides a detailed list of the company's customers, it is highly relevant to the query request, and the large language model outputs a relevance score of 0.9.
[0203] Then, based on the scoring result, the context manager promotes the specific paragraph from the second storage area back to the first storage area, that is, loads the complete text of the paragraph into the memory hotspot for immediate access by the AI agent. Based on the paragraph information in the hotspot, the AI agent analyzes and confirms that the leading upstream component manufacturer is indeed a supplier of the midstream mainframe manufacturer A, and improves the analysis of the supply chain relationship accordingly. This analysis result can be used as part of the execution result of the second subtask, and can be further refined into a summary and stored in the third storage area.
[0204] For example, after the second subtask is completed and data migration and summary storage are finished, the AI agent begins to execute the third subtask. During execution, the AI agent needs to predict the market size, and its reasoning process generates the following thought: "To predict the future market size, I need to estimate it based on the cost decline trend. This requires the 'component cost ratio' data from the first subtask and the mass production expectation data from the second subtask."
[0205] Then, based on the above reasoning requirements, the context manager performs the following scoring and promotion operations:
[0206] Secondary Storage Area Data Retrieval and Promotion: The AI agent also needs to compare price trends across different years to calculate cost reductions. The electronic device retrieves previously stored price data tables from the secondary storage area using index identifiers retained there, such as indexes of upstream raw data. The context manager evaluates the relevance of this data, obtaining a score of 0.92, which is greater than the third threshold. Therefore, the price data is promoted from the secondary storage area back to the primary storage area.
[0207] Finally, the AI agent performs fusion reasoning based on multi-source data in the first storage area: combining upstream cost ratio data and midstream mass production expectation data to calculate the predicted value of the future whole machine cost, such as "the whole machine cost is expected to drop to a specific value in a certain year", and writes the execution result of the third subtask accordingly.
[0208] For example, the execution result can be further refined into a summary and stored in a third storage area for use in the final report summary.
[0209] In this embodiment, by introducing a query-based cold zone data promotion mechanism, the agent can activate historical data on demand, enabling in-depth cross-analysis across subtasks without preloading all data, thus further optimizing the dynamic balance of memory and computing resources.
[0210] In some embodiments of this application, after storing the summary information of the first subtask execution information of the first subtask in the third storage area in step 201 above, the task processing method provided in the embodiments of this application may further include the following steps 214 to 216:
[0211] Step 214: During the execution of the second subtask, the electronic device obtains the second related query request message.
[0212] Step 215: The electronic device determines the first summary information corresponding to the second associated query request message.
[0213] The first summary information mentioned above refers to the summary information in the third storage area whose relevance score with the second associated query request message is greater than or equal to the fifth threshold.
[0214] Step 216: The electronic device migrates the first summary information from the third storage area to the first storage area.
[0215] In some embodiments of this application, the aforementioned second association query request message may be generated by the agent reasoning process, and the second association query request message is used to request the use of summary information in the third storage area.
[0216] In some embodiments of this application, the electronic device matches the second association query request message with each summary in the temperature range, for example by vector similarity or keyword matching, to filter out summaries whose relevance reaches the fifth threshold.
[0217] For example, when querying "Budget for Location A", the "Destination A Trip Summary" in the third storage area contains the budget field and has a similarity score of 0.9, so it is selected.
[0218] In some embodiments of this application, the electronic device loads selected summary information into a first storage area, allowing the intelligent agent to directly reference it.
[0219] For example, by moving the "Itinerary Summary of Location A" from the temperate zone to the hot zone, the intelligent agent can learn that 12,000 of the budget has been consumed, and thus rationally plan skiing expenses.
[0220] In this embodiment, by promoting the temperature zone summary to the hot zone as needed, the historical conclusions can be referenced instantly, avoiding repeated retrieval or recalculation, and further improving the task execution efficiency.
[0221] The following specific examples illustrate the task processing method provided in the embodiments of this application.
[0222] In some embodiments of this application, the task processing method provided in this application can be applied to intelligent tourism planning scenarios. For example... Figure 5 As shown, the task processing method may include the following steps:
[0223] Step 21: The electronic device performs task initialization and loads the first storage area.
[0224] For example, an electronic device acquires a first task, which includes a plurality of subtasks executed in sequence.
[0225] Specifically, the user inputs an initial command through the AI interactive interface. For example, the user inputs: "Please plan a two-week trip to location A, including hiking and skiing. The total budget is 50,000 yuan, and the departure date is December 20th." The context manager scores the initial command for relevance, storing commands with scores greater than a first threshold in complete text form in the first storage area and marking them as locked. The AI agent breaks down the first task, generating a list of subtasks. For example, the subtask list includes: the first subtask "Hiking Itinerary Planning," the second subtask "Skiing Itinerary Planning," and the third subtask "Flight and Hotel Booking."
[0226] Step 22: The electronic device performs the first subtask and information collection.
[0227] For example, during the execution of the first subtask, the electronic device obtains at least one first search content retrieved for the execution of the first subtask, determines the relevance score between each first search content and the first subtask, stores the first search content with a relevance score greater than a first threshold in the first storage area, and generates first subtask execution information of the first subtask based on the first search content stored in the first storage area.
[0228] For example, during the execution of the first subtask, "mountain climbing itinerary arrangement," the AI agent searches for and retrieves web pages related to mountain climbing in location A, i.e., the first search content. The context manager inputs each web page and the task description "mountain climbing itinerary arrangement" into a large language model for correlation scoring, and stores web pages with scores greater than 0.8, such as "Official Website of the Main Peak Scenic Area in Location A," in the first storage area. Based on this highly correlated data, the AI agent generates a "Draft Itinerary for a Five-Day Mountain Climbing Tour in Location A" as the execution information for the first subtask.
[0229] Step 23: Electronic devices perform task switching and information degradation.
[0230] For example, when an electronic device switches from executing a first subtask to executing a second subtask, it migrates the portion of the context data stored in the first storage area for executing the first subtask that is less than a second threshold related to the second subtask to the second storage area, and compresses the execution information of the first subtask into summary information and stores it in the third storage area.
[0231] For example, when the first subtask "Hiking Itinerary Planning" is completed and the process switches to the second subtask "Skiing Itinerary Planning," the context manager performs a cross-task re-evaluation of the data in the first storage area. The detailed webpages of hiking attractions are migrated from the first storage area to the second storage area, while the index identifiers are retained in the first storage area. The "Draft Itinerary for a 5-Day Hiking Trip to Location A" is compressed into a structured summary and stored in the third storage area. The first storage area is then released, ready to load ski resort-related data.
[0232] Step 24: The electronic device performs the second subtask.
[0233] For example, the electronic device performs a second subtask, obtains at least one second search content retrieved for performing the second subtask, stores the portion of the second search content whose relevance score to the second subtask is greater than the first threshold in the first storage area, and generates second subtask execution information of the second subtask based on the second search content stored in the first storage area.
[0234] For example, when executing the second subtask "Skiing Itinerary Planning," the AI agent searches for and retrieves relevant data about ski resorts in location A. The context manager stores detailed web pages about ski resorts with a rating greater than 0.8 in the first storage area. At this time, the first storage area contains the user's original instructions and the newly loaded detailed ski resort data, the third storage area retains a summary of the hiking itinerary, and the second storage area retains the original hiking web page and its index. Based on the ski resort data in the first storage area, the AI agent generates "Ski Resort Guide for Location A" as the execution information for the second subtask.
[0235] Step 25: The electronic device generates the task execution information for the first task.
[0236] For example, when both the first subtask and the second subtask have been completed, the electronic device generates task execution information for the first task based on the summary information of the first subtask, the execution information of the second subtask, and, optionally, the original data references in the second storage area.
[0237] For example, after all subtasks are completed, the AI agent reads the mountain climbing itinerary summary in the third storage area to obtain the core conclusions of the completed portion, reads the detailed ski resort guide in the first storage area to obtain the specific arrangements for the current portion, integrates the two into a complete "Two-Week Trip Plan for Location A" and outputs it. This plan may include a reference to the original document in the second storage area for users to view detailed information.
[0238] In some embodiments of this application, the task processing method provided can be applied to scenarios involving the generation of research reports in the automation industry. For example... Figure 6 As shown, the task processing method may include the following steps:
[0239] Step 31: The electronic device performs task initialization and loads the first storage area.
[0240] For example, an electronic device acquires a first task, which includes a plurality of subtasks executed in sequence.
[0241] Specifically, the user inputs a research report writing instruction. For example, the user inputs: "Please write an annual analysis report on the humanoid robot industry chain, focusing on upstream core components, midstream robot manufacturing, and downstream application scenarios. It must include specific market size data and analysis of leading companies." The context manager scores the initial instruction for relevance, storing instructions with scores greater than a first threshold as complete text in the first storage area (hot storage area) and marking them as locked. The AI agent breaks down the first task, generating a list of subtasks. For example, the subtask list includes: the first subtask "Analysis of Upstream Core Components," the second subtask "Analysis of Midstream Robot Manufacturers," the third subtask "Downstream Application Scenarios and Market Size Forecast," and the fourth subtask "Report Summary and Output."
[0242] Step 32: The electronic device performs the first subtask and data storage.
[0243] For example, during the execution of the first subtask, at least one first search content retrieved for the execution of the first subtask is obtained, the relevance score between each first search content and the first subtask is determined, the first search content with a relevance score greater than a first threshold is stored in the first storage area, and the first subtask execution information of the first subtask is generated based on the first search content stored in the first storage area.
[0244] For example, when executing the first subtask "Upstream Core Component Analysis," the AI agent searches for and retrieves the annual financial reports and brokerage research reports of upstream component company A and upstream component company B. The context manager inputs the data and the task description "Upstream Core Component Analysis" into a large language model for correlation scoring, and stores the full text of financial reports with scores greater than 0.8 in the first storage area. Based on this highly correlated data, the AI agent writes the first chapter of the report, "Core Components: Reducer Market Landscape," as the execution information for the first subtask.
[0245] Step 33: Electronic devices perform task switching and data degradation.
[0246] For example, when an electronic device switches from executing the first subtask to executing the second subtask, it migrates the portion of the context data stored in the first storage area for executing the first subtask that is less than a second threshold related to the second subtask to the second storage area, and compresses the execution information of the first subtask into summary information and stores it in the third storage area.
[0247] For example, when the first subtask is completed and the task switches to the second subtask, "Analysis of Midstream Ontology Manufacturers," the context manager performs a cross-task re-evaluation of the data in the first storage area. The full text of the financial reports of upstream component companies is migrated from the first storage area to the second storage area, while the index identifiers are retained in the first storage area. The completed chapter, "Core Components: Reducer Market Landscape," is compressed into a structured summary, such as {"segment": "Reducer", "top_player": "A Leading Enterprise", "market_share": "40%", "trend": "Accelerating Domestic Substitution"}, and stored in the third storage area. The first storage area is then released, retaining only the user instructions and the current task objective, in preparation for loading midstream manufacturer data.
[0248] Step 34: Data promotion and cross-analysis during the execution of the second subtask by the electronic device.
[0249] For example, the electronic device performs the second subtask, obtains at least one second search result retrieved for performing the second subtask, and stores the portion of the second search result whose relevance score to the second subtask is greater than the first threshold in the first storage area. During the execution of the second subtask, a related query requirement is obtained, and based on the related query requirement, data with a relevance score greater than the third threshold is retrieved from the third storage area and / or the second storage area, and the retrieved data is loaded into the first storage area.
[0250] For example, when executing the second subtask "Midstream Ontology Manufacturer Analysis," the AI agent searches for and retrieves the technical parameters of a midstream ontology manufacturer A and a midstream ontology manufacturer B, storing data with a score greater than 0.8 in the first storage area. When analyzing the cost structure of midstream ontology manufacturer A, the AI agent needs to determine whether a leading upstream component supplier is part of its supply chain, generating a related query request. The electronic device reads the upstream summary from the third storage area to obtain information about the leading supplier, and then retrieves the section on "major customers" from the upstream supplier's financial report in the second storage area using an index. The context manager scores the relevance of this section to the query request; if the score is 0.9, the section is loaded back into the first storage area. Based on this data analysis, the AI agent completes the supply chain relationship analysis and refines the execution information of the second subtask.
[0251] Step 35: Multi-source data fusion and computation during the execution of the third subtask by the electronic device.
[0252] For example, the electronic device performs the third subtask, obtains the related query requirements during the execution process, retrieves data with a correlation degree greater than a third threshold from the third storage area and / or the second storage area based on the related query requirements, and loads the retrieved data into the first storage area.
[0253] For example, when executing the third subtask, "Downstream Application Scenarios and Market Size Forecast," the AI agent needs cost data and price trend data to predict market size and generate related query requirements. The system detects that the upstream summary in the third storage area contains "component cost ratio: reducer cost accounts for approximately 35% of the whole machine," assigns it a correlation score of 0.95 with the query requirements, and loads the summary back into the first storage area. Simultaneously, it retrieves the previously stored price data table from the second storage area through an index, assigns a score of 0.92, and loads the table back into the first storage area. The AI agent combines the upstream cost data and midstream mass production data in the first storage area to calculate "the estimated cost of the whole machine will drop to a specific value in a certain year," and writes the third subtask execution information accordingly.
[0254] Step 36: Summarize electronic device execution reports and generate task execution information.
[0255] For example, after multiple subtasks have been completed, the electronic device generates task execution information for the first task based on the summary information of each subtask, the user's initial instruction, and the original data reference in the optional second storage area.
[0256] For example, after all subtasks are completed, the context manager scores the relevance of each chapter summary in the third storage area to the user's initial instructions. Each summary with a score of 0.95 is identified as core material. The AI agent mainly relies on the high-level summary information in the third storage area, integrates the core conclusions of each subtask, and synthesizes a complete "Annual Humanoid Robot Industry Chain Analysis Report." This report includes the core conclusions of each chapter, key data summaries, development trend predictions, etc., and can include reference links to the original document in the second storage area for manual verification or in-depth tracing.
[0257] In this embodiment, a three-tiered storage architecture consisting of hot, warm, and cold zones is constructed, and a dynamic partition migration mechanism based on correlation scoring is introduced to achieve intelligent management of context data when an AI agent executes long-process tasks. Specifically, when switching subtasks, low-correlation raw data is automatically downgraded to the cold zone, and task execution information is extracted into a summary and stored in the warm zone, freeing up hot zone space for the current subtask. During execution, it supports promoting raw data from the cold zone or summaries from the warm zone back to the hot zone as needed, meeting the cross-reference requirements across subtasks. Thus, this solution achieves accurate retention of high-value data, lossless archiving of low-value data, and lightweight referencing of historical conclusions within a limited context window, effectively avoiding problems such as context overflow, loss of key information, repeated retrieval, and reasoning illusion, significantly improving the accuracy, consistency, and resource utilization efficiency of the AI agent in handling complex tasks.
[0258] In this embodiment, by partitioning the Agent execution context according to importance and adopting the optimal storage method for different partitions, storage costs are reduced and data integrity is improved. On the other hand, a lightweight ContextManager is introduced to assist in partitioning process data during task execution, ensuring intelligent data partitioning; furthermore, by upgrading and downgrading data in different partitions during task execution, dynamic data updates are maintained, thereby improving overall task processing performance.
[0259] It should be noted that each of the above method embodiments, or various possible implementations of each method embodiment, can be executed individually or in combination of any two or more. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.
[0260] The task processing method provided in this application can be executed by a task processing device. This application uses the execution of the task processing method by a task processing device as an example to illustrate the task processing device provided in this application.
[0261] Figure 7 This is a schematic diagram of a task processing device provided in an embodiment of this application. Figure 7 As shown, the task processing device 400 includes: a processing module 401, configured to acquire a first task, the first task including at least one subtask; the processing module 401 is further configured to, when switching from executing the first subtask to executing the second subtask, migrate at least one first retrieval information of the first subtask from a first storage area to a second storage area, and store summary information of the first subtask execution information of the first subtask in a third storage area; the processing module 401 is further configured to generate task execution information of the first task based on the summary information of the first subtask and the subtask execution information of the second subtask; wherein the first task includes the first subtask and the second subtask.
[0262] In some embodiments of this application, the processing module is further configured to: during the execution of the first subtask, obtain at least one second search information corresponding to the first subtask; determine the relevance score between the at least one second search information and the first subtask; and store at least one third search information in the at least one second search information whose relevance score is greater than or equal to a first threshold in a first storage area; wherein the at least one third search information includes at least one first search information.
[0263] In some embodiments of this application, the processing module is specifically used to: input at least one second retrieval information and the task description information of the first subtask into the relevance scoring model for relevance scoring to obtain a relevance score.
[0264] In some embodiments of this application, the processing module is further configured to: before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, input at least one third retrieval information and the task description information of the second subtask into the relevance scoring model to obtain a relevance score; and determine at least one third retrieval information with a relevance score less than a second threshold as the first retrieval information.
[0265] In some embodiments of this application, the first storage area and the third storage area are located in the memory of the electronic device, and the second storage area is located in the vector database.
[0266] In some embodiments of this application, the processing module is further configured to: extract key information from the subtask execution information of the first subtask before storing the summary information of the first subtask into the third memory; generate summary information based on the key information and the task field; wherein the key information includes at least one of the following: task identifier; key conclusion; numerical parameters; time range.
[0267] In some embodiments of this application, the processing module is specifically configured to: delete at least one first retrieval information from a first storage area and store at least one first retrieval information in a second storage area; store an index identifier of at least one first retrieval information in the first storage area; wherein the index identifier has a mapping relationship with the first retrieval information in the second storage area.
[0268] In some embodiments of this application, the processing module is further configured to: obtain a first association query request message during the execution of the second subtask; determine at least one fourth retrieval information based on the first association query request message, wherein the fourth retrieval information is retrieval information in the second storage area whose association score with the first association query request message is greater than or equal to a fourth threshold; and migrate at least one fourth retrieval information from the second storage area to the first storage area.
[0269] In some embodiments of this application, the processing module is further configured to: retrieve the second related query request message during the execution of the second subtask; determine the first summary information corresponding to the second related query request message; the first summary information is a summary information in the third storage area whose correlation score with the second related query request message is greater than or equal to a fifth threshold; and migrate the first summary information from the third storage area to the first storage area.
[0270] The task processing apparatus provided in this application embodiment, when switching from executing a first subtask to executing a second subtask, migrates at least one first retrieval information of the first subtask from a first storage area to a second storage area, and stores summary information of the first subtask execution information of the first subtask in a third storage area; based on the summary information of the first subtask and the subtask execution information of the second subtask, task execution information of the first task is generated. Through this solution, when switching tasks, at least one first retrieval information of the previous subtask is actively moved out of the first storage area, such as the fast access area, while the task execution information of the previous subtask is extracted into summary information and stored independently. This frees up storage space for storing relevant information of the current subtask, effectively avoiding information overflow and truncation caused by the context window being filled with irrelevant data, thereby improving the accuracy and consistency of AI model task processing.
[0271] The task processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0272] The task processing device in this application embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.
[0273] The task processing apparatus provided in this application embodiment can implement the various processes of the task processing method embodiment, and will not be described again here to avoid repetition.
[0274] Optionally, such as Figure 8As shown, this application embodiment also provides an electronic device 500, including a processor 501 and a memory 502. The memory 502 stores a program or instructions that can run on the processor 501. When the program or instructions are executed by the processor 501, they implement the various steps of the above-described task processing method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0275] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0276] Figure 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0277] The electronic device 100 includes, but is not limited to, components such as: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, and processor 110.
[0278] Those skilled in the art will understand that the electronic device 100 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0279] The processor 110 is configured to, when switching from executing a first subtask to executing a second subtask, migrate at least one first retrieval information of the first subtask from a first storage area to a second storage area, and store summary information of the first subtask execution information of the first subtask in a third storage area; the processor 110 is further configured to generate task execution information of the first task based on the summary information of the first subtask and the subtask execution information of the second subtask; wherein the first task includes the first subtask and the second subtask.
[0280] In some embodiments of this application, the processor 110 is further configured to: during the execution of a first subtask, acquire at least one second search information corresponding to the first subtask; determine a correlation score between the at least one second search information and the first subtask; and store at least one third search information in the at least one second search information whose correlation score is greater than or equal to a first threshold in a first storage area; wherein the at least one third search information includes at least one first search information.
[0281] In some embodiments of this application, processor 110 is specifically configured to: input at least one second retrieval information and the task description information of the first subtask into the relevance scoring model to obtain a relevance score.
[0282] In some embodiments of this application, the processor 110 is further configured to: before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, input at least one third retrieval information and the task description information of the second subtask into the relevance scoring model to obtain a relevance score; and determine at least one third retrieval information with a relevance score less than a second threshold as the first retrieval information.
[0283] In some embodiments of this application, the first storage area and the third storage area are located in the memory of the electronic device, and the second storage area is located in the vector database.
[0284] In some embodiments of this application, the processor 110 is further configured to: extract key information from the subtask execution information of the first subtask before storing the summary information of the first subtask into the third memory; generate summary information based on the key information and task fields; wherein the key information includes at least one of the following: task identifier; key conclusion; numerical parameters; time range.
[0285] In some embodiments of this application, the processor 110 is specifically configured to: delete at least one first retrieval information from a first storage area and store at least one first retrieval information in a second storage area; store an index identifier of at least one first retrieval information in the first storage area; wherein the index identifier has a mapping relationship with the first retrieval information in the second storage area.
[0286] In some embodiments of this application, the processor 110 is further configured to: obtain a first association query request message during the execution of a second subtask; determine at least one fourth retrieval information based on the first association query request message, wherein the fourth retrieval information is retrieval information in the second storage area whose association score with the first association query request message is greater than or equal to a fourth threshold; and migrate at least one fourth retrieval information from the second storage area to the first storage area.
[0287] In some embodiments of this application, the processor 110 is further configured to: acquire a second association query request message during the execution of a second subtask; determine a first summary information corresponding to the second association query request message, wherein the first summary information is a summary information in a third storage area whose association score with the second association query request message is greater than or equal to a fifth threshold; and migrate the first summary information from the third storage area to the first storage area.
[0288] The electronic device provided in this application, when switching from executing a first subtask to executing a second subtask, migrates at least one first retrieval information of the first subtask from a first storage area to a second storage area, and stores summary information of the first subtask execution information of the first subtask in a third storage area; based on the summary information of the first subtask and the subtask execution information of the second subtask, task execution information of the first task is generated. Through this solution, when switching tasks, at least one first retrieval information of the previous subtask is actively moved out of the first storage area, such as the quick access area, while the task execution information of the previous subtask is extracted into summary information and stored independently. This frees up storage space for storing relevant information of the current subtask, effectively avoiding information overflow and truncation caused by the context window being filled with irrelevant data, thereby improving the accuracy and consistency of AI model task processing.
[0289] It should be understood that, in this embodiment, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0290] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 109 may include volatile memory or non-volatile memory, or it may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0291] Processor 110 may include one or more processing units; optionally, processor 110 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 110.
[0292] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described task processing method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0293] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0294] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described task processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0295] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0296] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the task processing method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0297] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0298] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0299] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A task processing method, characterized in that, The method includes: When switching from executing the first subtask to executing the second subtask, at least one first retrieval information of the first subtask is migrated from the first storage area to the second storage area, and the summary information of the first subtask execution information of the first subtask is stored in the third storage area; Based on the summary information of the first subtask and the subtask execution information of the second subtask, the task execution information of the first task is generated; The first task includes the first sub-task and the second sub-task.
2. The method according to claim 1, characterized in that, Before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, the method further includes: During the execution of the first subtask, at least one second retrieval information corresponding to the first subtask is obtained; Determine the correlation score between the at least one second retrieval information and the first subtask; Store at least one third retrieval information in the at least one second retrieval information whose relevance score is greater than or equal to the first threshold into the first storage area; Wherein, the at least one third search information includes the at least one first search information.
3. The method according to claim 2, characterized in that, Determining the relevance score between the at least one second retrieval piece of information and the first subtask includes: The at least one second retrieval information and the task description information of the first subtask are input into the relevance scoring model to obtain the relevance score.
4. The method according to claim 2, characterized in that, Before migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, the method further includes: Input the at least one third retrieval information and the task description information of the second subtask into the relevance scoring model to obtain the relevance score; At least one third search result with a relevance score less than the second threshold is identified as the first search result.
5. The method according to any one of claims 1 to 4, characterized in that, The first storage area and the third storage area are located in the memory of the electronic device, and the second storage area is located in the vector database.
6. The method according to claim 1, characterized in that, Before storing the summary information of the first sub-task in the third storage area, the method further includes: Extract key information from the subtask execution information of the first subtask; Based on the key information and task fields, generate summary information; The key information includes at least one of the following: task identifier; key conclusions; numerical parameters; and time range.
7. The method according to claim 1, characterized in that, The step of migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area includes: Delete the at least one first retrieval information from the first storage area and store the at least one first retrieval information in the second storage area; The index identifier of the at least one first retrieval information is stored in the first storage area; The index identifier is mapped to the first retrieval information in the second storage area.
8. The method according to claim 1, characterized in that, After migrating at least one first retrieval information of the first subtask from the first storage area to the second storage area, the method further includes: During the execution of the second subtask, the first related query request message is obtained; Based on the first association query request message, at least one fourth retrieval information is determined; the fourth retrieval information is the retrieval information in the second storage area whose association score with the first association query request message is greater than or equal to a fourth threshold. The at least one fourth retrieval information is migrated from the second storage area to the first storage area.
9. The method according to claim 1, characterized in that, After storing the summary information of the execution information of the first subtask of the first subtask to the third storage area, the method further includes: During the execution of the second subtask, the second related query request message is obtained; Determine the first summary information corresponding to the second associated query request message; the first summary information is the summary information in the third storage area whose association score with the associated query request message is greater than or equal to a fifth threshold. The first summary information is migrated from the third storage area to the first storage area.
10. A task processing device, characterized in that, The device includes: The processing module is configured to, when switching from executing a first subtask to executing a second subtask, migrate at least one first retrieval information of the first subtask from a first storage area to a second storage area, and store summary information of the first subtask execution information of the first subtask in a third storage area; The processing module is further configured to generate task execution information for the first task based on the summary information of the first subtask and the subtask execution information of the second subtask; The first task mentioned above includes a first sub-task and a second sub-task.
11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the task processing apparatus as described in any one of claims 1-9.