Multi-stage task processing method and device based on intelligent Agent model and medium

Through the multi-stage task processing method of the intelligent Agent model, through task decomposition and directed graph matching relationships, the problems of insufficient flexibility and resource utilization of the existing intelligent Agent model in complex task processing are solved, and efficient and automated tasks are realized. Processing and resource optimization improves system adaptability and processing effects.

CN118656196AActive Publication Date: 2024-09-17BEIJING SHENGSHI TIANAN TECH CO LTD

Patent Information

Application Number
CN202411140299.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-09-17
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

Existing intelligent agent models have problems such as insufficient model combination flexibility, insufficient task decomposition and reorganization capabilities, low resource utilization efficiency, and limited system adaptability and optimization capabilities when processing complex multi-stage tasks, resulting in poor processing efficiency and effects.

Method used

This paper proposes a multi-stage task processing method based on the intelligent Agent model. It forms a task directed graph through task decomposition, determines the matching relationship between subtasks and the basic model, and determines the processing sequence based on the task directed graph to achieve dynamic scheduling and resources. Optimize to ensure information transfer and collaborative processing between subtasks.

Benefits of technology

It improves the automation, decomposition and matching capabilities of task processing, dynamic scheduling and resource optimization, improves the scalability and flexibility of the system, realizes intelligent decision-making, and improves the efficiency and effect of task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656196A
    Figure CN118656196A
Patent Text Reader

Abstract

The invention provides a multi-stage task processing method and device based on an intelligent Agent model and a medium, and belongs to the technical field of computers. The method comprises the steps of obtaining task information of a to-be-processed multi-stage task; performing task decomposition on the task information and the model library to form a task directed graph; based on the task feature vector of each subtask and the model feature vector of the basic model, determining a matching relationship between each subtask and the basic model; determining a task processing sequence of each subtask based on the task directed graph; according to the task processing sequence, the basic model is called to process the subtasks, subsequent subtasks are processed based on subtask processing results transmitted by the preorder subtasks on the task directed graph, and task processing results of the multi-stage tasks are obtained. The processing efficiency and the processing effect of the complex multi-stage task are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a multi-stage task processing method, device and medium based on an intelligent Agent model. Background Art

[0002] With the rapid development of artificial intelligence technology, the demand for complex multi-stage task processing is increasing, and the traditional single model or static model combination method can no longer meet these needs. Such multi-stage tasks usually refer to those diverse and comprehensive tasks that involve multiple different aspects, different links or different task types (such as text, image, voice, etc.) in the processing process. For the processing of such tasks, it is necessary not only to process multiple different types of data, but also to use different technologies and algorithms at different processing stages to achieve the ultimate goal.

[0003] With the rapid development of large models and multimodal models, building intelligent agent models that can flexibly respond to such multi-stage task requirements has become a research hotspot. An intelligent agent model is a computational model used to simulate and implement intelligent behavior. An agent is an autonomous software entity that can perceive the environment and take actions to achieve specific goals.

[0004] Although large models and multimodal models have made significant progress in recent years, current intelligent agent models still have many shortcomings. Specifically, existing intelligent agent models have obvious limitations in the following aspects: 1. Insufficient flexibility of model combination: Most intelligent agent models only support static or predefined model combinations, and cannot dynamically adjust model configurations according to the actual needs of the task, thus failing to fully utilize the complementary advantages of different models; 2. Insufficient task decomposition and reorganization capabilities: When dealing with complex multi-stage tasks, existing intelligent agent models often lack efficient task decomposition and reorganization mechanisms, resulting in inflexible task processing processes and difficulty in ensuring efficient information transmission and integration between decomposed subtasks; 3. Inefficient resource utilization: Due to the lack of effective dynamic scheduling strategies, existing intelligent agent models often waste resources in resource allocation, especially when resources are limited, and cannot maximize system performance; 4. Limited system adaptability and optimization capabilities: In the face of real-time changing task requirements and resource constraints, existing intelligent agent models often lack sufficient adaptability and self-optimization capabilities, and it is difficult to quickly adjust strategies to meet new challenges.

[0005] These problems seriously restrict the efficiency and effectiveness of intelligent agent models in processing complex tasks. An innovative intelligent agent model and its supporting optimization strategy are urgently needed to solve these problems. Summary of the invention

[0006] The purpose of this application is to provide a multi-stage task processing method, device and medium based on an intelligent Agent model to solve at least one of the above technical problems.

[0007] To achieve the above objectives, this application proposes a multi-stage task processing method based on an intelligent agent model, which includes: Get the task information of the multi-stage tasks to be processed; Decomposing the task information and the model library to form a task directed graph, wherein the nodes in the task directed graph represent the subtasks formed by decomposition or the basic models in the model library, and the edges of the nodes in the task directed graph represent the association relationship between the nodes; Based on the task feature vector of each subtask and the model feature vector of the basic model, determining the matching relationship between each subtask and the basic model; Determine a task processing order for each subtask based on the task directed graph; The associated basic model is called in accordance with the task processing order to process the subtasks, wherein subsequent subtasks are processed based on the subtask processing results transmitted by the preceding subtasks on the task directed graph to obtain the task processing results of the multi-stage task.

[0008] In one embodiment, the basic model matching at least one subtask includes a plurality of; The calling of the associated basic models to process the subtasks in the task processing order includes: when there are multiple basic models matching the subtask to be processed, selecting one basic model from the multiple matching basic models to execute the subtask to be processed.

[0009] In one embodiment, calling the associated basic model to process the subtasks in the task processing order includes: Generate an initial context vector for each node representing a subtask; When a subtask is processed, the subtask processing result of the subtask being executed is added to the initial context vector to form an updated context vector, and the updated context vector is passed to the subsequent subtask of the subtask being executed, so that the subsequent subtask merges the updated context vector into the initial context vector of the subsequent subtask.

[0010] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors execute the multi-stage task processing method based on the intelligent Agent model as described above.

[0011] In addition, to achieve the above objectives, the present application also proposes a computer storage medium, which stores executable instructions. When the instructions are executed by a processor, the processor executes the multi-stage task processing method based on the intelligent Agent model as described above.

[0012] Compared with the prior art, the beneficial effects of the present application include: 1. Automated task processing: Through the intelligent Agent model, multi-stage tasks can be automatically processed, reducing the need for manual intervention and improving the efficiency and speed of task processing; 2. Task decomposition and matching: By decomposing tasks into subtasks and matching them with the basic models in the model library, complex tasks can be processed more flexibly while ensuring that each subtask can be processed by an appropriate basic model; 3. Dynamic scheduling and resource optimization: The processing order of each subtask is determined through a task directed graph, and dynamic scheduling and resource optimization are performed during the processing process, which can maximize the use of system resources and improve the efficiency and effect of task processing; 4. Message passing and collaborative processing: By passing messages on the task directed graph and using the messages of processed subtasks to guide the processing of subsequent subtasks, collaborative processing between subtasks can be achieved, improving the quality and accuracy of overall task processing; 5. Scalability and flexibility: Through the structure of the model library and the task directed graph, the basic model can be easily expanded and updated to cope with different types of multi-stage tasks, improving the scalability and flexibility of the system; 6. Intelligent decision-making: Through the intelligent Agent model, intelligent decisions can be made based on task characteristics and system resource status, and the most appropriate basic model and processing sequence can be selected, thereby improving the effect and satisfaction of task processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope of the present application.

[0014] Figure 1 A flowchart of a multi-stage task processing method based on an intelligent Agent model in one embodiment; Figure 2 is a schematic diagram of the structure of a task directed graph in one embodiment; Figure 3 is a schematic diagram of the matching relationship between subtasks and a basic model in one embodiment; Figure 4 A schematic diagram of a process for determining a task feature vector of each subtask and a model feature vector of a basic model in one embodiment; Figure 5A schematic diagram of a process for generating a basic model scheduling model in one embodiment; Figure 6 A schematic diagram of a process for dynamically updating a scheduling order and a resource allocation strategy in one embodiment; Figure 7 It is a structural schematic diagram of an electronic device involved in a multi-stage task processing method based on an intelligent Agent model in an embodiment of the present application. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0016] All terms (including technical and scientific terms) used in this application have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used here should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0017] For example, the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first iteration termination condition may be referred to as a second iteration termination condition, and similarly, a second iteration termination condition may be referred to as a first iteration termination condition. Both the first iteration termination condition and the second iteration termination condition are iteration termination conditions, but they are not the same iteration termination condition.

[0018] For another example, the terms “include”, “comprising”, etc. used in this application indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0019] In order to solve the above technical problems, the present application proposes a multi-stage task processing method, more specifically, a multi-stage task processing method based on an intelligent Agent model, which aims to improve the efficiency and effect of processing complex multi-stage tasks (or "multimodal tasks") through intelligent scheduling and dynamic model combination.

[0020] Among them, the intelligent agent model referred to in this application includes: (1) Input layer (Sensor & Data Ingestion): responsible for collecting multimodal data (such as images, sounds, text) from different sources and performing preliminary preprocessing.

[0021] (2) Scheduling Center (Smart Scheduler), which includes: a model feature matching module, which quickly matches the applicable model combination from the feature library based on task characteristics; a resource management module, which monitors system resources in real time and optimizes model deployment and resource allocation; and a strategy optimization engine, which continuously adjusts the model scheduling strategy based on task execution feedback.

[0022] (3) Processing layer (Multi-Stage Collaborative Processing), which includes: primary processing unit, which quickly filters and preprocesses data to prepare data for subsequent models; model collaboration module, which dynamically combines related basic models to work together according to task requirements; advanced analysis unit, which integrates related processing result data, such as the task processing result data of each basic model, and conducts in-depth analysis and decision making.

[0023] (4) Output layer (Action & Feedback): Converts processing results into actual action instructions or information output, and collects feedback information and sends it back to the strategy optimization engine.

[0024] It should be noted that the execution subject of this embodiment can be a multi-stage task processing system based on an intelligent Agent model, or it can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or it can be a thermal management device of a multi-stage task processing system based on an intelligent Agent model that can achieve the above functions, etc. This embodiment does not make specific limitations on this.

[0025] Among them, the multi-stage task processing system based on the intelligent Agent model is a system that can realize automated management from multi-stage task reception, disassembly, configuration to execution, which can effectively improve resource utilization efficiency and has good scalability and compatibility.

[0026] In one embodiment, a multi-stage task processing method based on an intelligent agent model is provided. Figure 1 The method comprises steps S10 to S50: Step S10, obtaining task information of the multi-stage task to be processed.

[0027] In this embodiment, the electronic device can receive a multi-stage task processing instruction issued by a user, and the multi-stage task instruction is an instruction containing a textual expression issued by the user through a graphical user interface (GUI), a command line interface (CLI), a voice assistant or other input device. The instruction contains task information of the multi-stage task to be processed. Based on natural language processing (NPL), the multi-stage task instruction is parsed through technologies such as word segmentation, part-of-speech tagging, named entity recognition, and dependency syntax analysis to convert the natural language instruction into a format that can be understood by the computer. Then, the task information is extracted from the parsed multi-stage task instruction.

[0028] Taking task information in text form as an example, as an optional implementation method for extracting task information, predefined rules are used to match key information in the text, pattern recognition technology can be used to identify specific patterns or structures in the text, or a machine learning model can be used to extract useful information from the text.

[0029] Through the above technology, electronic devices can extract key information from multi-stage task instructions and organize it into structured data for subsequent processing and analysis.

[0030] It is important to understand that multi-stage tasks refer to those diverse and comprehensive tasks that involve multiple different aspects, different links or different task types (such as text, images, voice, etc.) during the processing process. For the processing of such tasks, it is necessary not only to process multiple different types of data, but also to use different technologies and algorithms at different processing stages to achieve the ultimate goal. Task information refers to various data and parameters related to the task, including but not limited to one or more of the following: task content, indicating the specific content of the job to be performed; the nature of the task, such as the task type and function of each stage; data type, such as the type and format of data involved in each stage; required computing resources, the computing power and storage space required for each stage; time constraints, the time limit and execution order of each stage.

[0031] Take the multi-stage task instruction issued by the user as an example: "Please filter out resumes that meet the following conditions on recruitment website A: Java development engineer, more than 3 years of work experience, familiar with Spring framework." After obtaining this instruction, the extracted task information may include: nature of the task: instruction parsing, data retrieval, resume scoring, result sorting, result display; data type: text data (user instructions, resume content), numerical data (work experience, score, etc.); required computing resources: the data retrieval stage requires efficient database query capabilities, and the resume scoring stage requires the call of complex algorithms and a large amount of computing resources; time constraints: the result display stage needs to be completed within a short time after the user issues the instruction to ensure user experience.

[0032] Step S20, performing task decomposition on the task information and the model library to form a task directed graph.

[0033] The nodes in the task directed graph represent the decomposed subtasks or basic models in the model library, and the edges of the nodes in the task directed graph represent the association relationship between the nodes. According to the task information and the content of the model library, the multi-stage task is decomposed into multiple independent subtasks. The subtasks are atomic, that is, tasks that cannot be further decomposed, and there are clear interface definitions between each other, which facilitates information transmission and integration. The model library contains a model collection of multiple basic models, each of which is accompanied by characteristic information such as the type of task it processes, its field of expertise, and resource consumption. The basic model can include a variety of models such as large models, specific domain models, fine-tuning models, multimodal models, lightweight models, end-to-end models, modular models, reinforcement learning models, generative models, and classification and regression models. Among them, large models refer to these models that have been trained on a large amount of data and can handle multiple tasks, such as BERT (for natural language processing), ResNet (for image recognition), Transformer (for sequence-to-sequence tasks), etc. Specific domain models refer to models optimized for specific tasks or fields, such as medical image analysis models, stock market prediction models, sentiment analysis models, etc. A fine-tuned model is a model that is further trained on a specific task based on a pre-trained model to improve performance on that task. A multimodal model is a model that can handle multiple types of data, such as a model that combines images and text for image captioning or visual question answering tasks. A lightweight model is a small model designed to run on resource-constrained devices, such as MobileNet, TinyBERT, etc. An end-to-end model is a model that provides a complete solution from input to output, such as an end-to-end model for speech recognition. A modular model is a model that can be combined to solve complex tasks, with each module handling one aspect of the task. A reinforcement learning model is a model used to make decisions in a dynamic environment, such as a model used for autonomous driving or game AI. A generative model is a model that can generate new data instances, such as generative adversarial networks (GANs). Classification and regression models are models used to predict classification labels or continuous values, such as support vector machines (SVMs), random forests, gradient boosting machines, etc.

[0034] Taking the task information of the multi-stage task of resume screening on the above recruitment website as an example, it can be broken down into the following multiple stages, each of which includes one or more subtasks. (1) Instruction parsing stage: Natural language processing subtask (NLP), which is used to parse the screening conditions input by the user using NLP technology, including keyword extraction, semantic analysis, etc.; entity recognition subtask, which is used to identify key entities in the user input, such as job title, skill requirements, work experience, etc. (2) Data retrieval stage: Index construction subtask, which is used to build an efficient index for the resume database to speed up the retrieval process; query optimization subtask, which is used to optimize the database query statement and improve query efficiency; multi-condition matching subtask, which is used to support multi-condition matching to ensure that the retrieved resumes fully meet the user's needs. (3) Resume scoring stage: Feature extraction subtask, which is used to extract valuable features from the resume, such as work experience, educational background, skills, etc.; model selection subtask, which is used to select a suitable scoring model, such as regression model, classification model, etc.; multi-dimensional scoring subtask, which is used to score resumes from multiple dimensions, such as skill matching, work experience, educational background, etc. Result sorting stage: Sorting algorithm selection subtask, used to select the appropriate sorting algorithm, such as quick sort, merge sort, etc.; multi-factor sorting subtask, used to sort resumes according to multiple factors, such as score, relevance, freshness, etc. User preference adjustment subtask: adjust the sorting results according to user preferences, such as giving priority to resumes with longer work experience. (4) Result display stage: User interface design subtask: design a user-friendly user interface to display the sorted resumes, so that users can view and manage resumes more conveniently.

[0035] Based on the above task decomposition results and model library, a directed graph G=(V, E) is constructed, where the node V represents the task and the model. The node representing the subtask (i.e., "task node") represents each subtask of the multi-stage task to be processed, and the node representing the basic model (i.e., "model node") represents the available basic model. Each subtask or the task type to which each subtask belongs corresponds to a task node, and each basic model corresponds to a model node. The edge E represents the association relationship between nodes, that is, the association relationship between the two nodes connected by the edge. The association relationship may specifically include one or more of the task-to-task dependency relationship (such as the subsequent task requires the result of the previous task as input), the task-to-model matching relationship (reflecting the applicability of the model to a specific task type), and the capability similarity or complementarity between models (to help model scheduling decisions).

[0036] like Figure 2As shown in the figure, subtasks 1 to 6 correspond to six task nodes. Models A to C correspond to three model nodes. The single arrows between task nodes indicate that there is a dependency relationship between the task nodes. The arrowless connecting line between subtask 1 and model A indicates that there is a matching relationship between the two. The dot connecting lines between model A, model B, and model C indicate that there is a high similarity in the model capabilities of the three.

[0037] Step S30: Based on the task feature vector of each subtask and the model feature vector of the basic model, determine the matching relationship between each subtask and the basic model.

[0038] It should be noted that the task feature vector is a feature vector that converts the feature information of each subtask into a numerical feature vector. The model feature vector is a feature vector that converts the feature information attached to the model into a numerical feature vector. This conversion process can be achieved through feature encoding, feature selection, feature scaling and other technologies, which will not be described in detail in this embodiment. The feature information of the subtask may include one or more information such as the task type of the subtask, the field to which the task belongs, and the resource consumption requirements of the task. The feature information can be parsed from the split subtasks, and the feature information of the basic model includes one or more information such as the task type, the field of expertise, and resource consumption that the model is suitable for processing.

[0039] Based on the preset matching score function f(task, model), the matching scores of the task node and the model node are calculated according to their feature vectors. For example, the cosine similarity of the feature vectors of the task node and the model node is calculated by defining the cosine_similarity function, and the cosine similarity is the matching score. The higher the matching score, the better the matching between the task and the model.

[0040] According to the calculated matching score and the preset matching score threshold, the matching relationship between each subtask and the basic model is determined. Figure 3 As shown, in one embodiment, the basic models matching at least one subtask include multiple ones. It is understandable that, for a subtask, the matching scores with different basic models may all be greater than a preset matching score threshold. It is also possible that the matching scores with the same basic model for different subtasks are all greater than a preset matching score threshold. Therefore, the matching relationship between the subtask and the basic model is actually a many-to-many relationship.

[0041] There may be one or more basic models that match the subtask. For example, the basic model with the highest matching score may be used as the only basic model that matches the subtask; or all basic models that exceed the matching threshold may be used as basic models that match the subtask.

[0042] As an optional implementation method for determining the task feature vector of each subtask and the model feature vector of the basic model, Figure 4 As shown, before step S30, steps S31 to S35 may be included: Step S31, obtaining the node feature vector to be updated of each node.

[0043] The node feature vector to be updated referred to in this embodiment refers to the feature vector extracted for each node when disassembling the multi-stage task (before passing the message through the graph neural network model). For task nodes, the node feature vector to be updated is extracted based on multi-dimensional feature information such as the input and output type of the task, required skills (such as text understanding, sentiment analysis), and resource requirements. For model nodes, the node feature vector to be updated is extracted based on feature information such as its expertise and performance indicators.

[0044] Step S32, taking each node in the task directed graph as a node to be processed, and based on the graph neural network model, passing the node feature vector to be updated of the node to be processed to the neighboring nodes of the node to be processed.

[0045] Step S33, fusing the node feature vector to be updated of the node to be processed and the node feature vector to be updated of the neighboring node, and using the fused node feature vector as a new node feature vector to be updated.

[0046] Step S34, checking whether the preset first iteration termination condition is met. If yes, executing step S35, otherwise, returning to executing step S32.

[0047] Step S35, using the node feature vector to be updated formed last time as the node feature vector of the corresponding node in the task directed graph.

[0048] When a node in the task directed graph represents a subtask, the feature vector of the node is a task feature vector; when a node in the task directed graph represents a basic model, the feature vector of the node is a model feature vector.

[0049] In this embodiment, a graph neural network model (GNN) is used to perform message passing on the task directed graph. The graph neural network model is a deep learning model suitable for processing graph structure data, and can update the feature vector of a node through a message passing mechanism.

[0050] In this process, each node in the task directed graph is treated as a node to be processed. Each node to be processed will pass its own node feature vector to be updated to its neighboring node, and will also receive its own node feature vector to be updated from the neighboring node. This allows each node to gradually integrate the information of neighboring nodes (i.e. related tasks or models) and update its own node feature vector to be updated.

[0051] Repeat the above-mentioned message transmission and update process of the node feature vector to be updated until the preset first iteration termination condition is met, such as reaching the preset first iteration number or the feature change is less than the preset first iteration termination threshold. The number of iterations refers to the number of times the graph neural network model completely traverses the node feature vectors to be updated of all nodes each time. Each traversal is called an iteration. The iteration termination threshold refers to the process in which the graph neural network model updates the node vectors to be updated of each node. When the change of a certain indicator of the graph neural model (such as the loss function value, accuracy, etc.) is less than this threshold, the update process can be terminated early.

[0052] Eventually, each node will converge to a stable node feature vector to be updated, taking into account the task requirements, model capabilities, and dependencies between tasks. This last formed node feature vector to be updated will be used as the node feature vector of the corresponding node in the task directed graph. When the node in the task directed graph represents a subtask, the node feature vector is the task feature vector. When the node in the task directed graph represents a basic model, the node feature vector is the model feature vector.

[0053] Step S40: determining a task processing order for each subtask based on the task directed graph.

[0054] It can be understood that the task directed graph provides a structured way to describe and manage the execution order and dependencies of tasks. Based on the task directed graph, the optimal task processing order can be determined by using algorithms such as topological sorting, thereby ensuring the correct and efficient execution of tasks.

[0055] As an optional implementation method for determining the order in which tasks are processed, a directed task graph uses edges to explicitly represent the dependencies between tasks. If a task depends on the result of another task, there will be an edge in the graph from the dependent task to the dependent task. Based on this, by clarifying the dependencies, the processing order of some tasks can be determined.

[0056] As another optional implementation for determining the task processing order, for a directed acyclic graph (DAG), a topological sort is used to determine the processing order of the nodes, so that each node is executed after all its predecessor nodes.

[0057] As another optional implementation method for determining the task processing order, for scenarios where the task directed graph is more complex and difficult to solve with a simple algorithm, heuristic algorithms, such as the A-star algorithm, genetic algorithm, simulated annealing algorithm, ant colony algorithm, etc., can be used to search the space to find the optimal or nearly optimal processing order.

[0058] Step S50: Call the associated basic model to process the subtask in the task processing order.

[0059] The subsequent subtasks are processed based on the subtask processing results transmitted by the preceding subtasks on the task directed graph to obtain the task processing results of the multi-stage task.

[0060] According to the determined task processing order, the associated basic models are called in turn to process the subtasks. In addition, when executing each task, it is necessary to ensure that all its predecessor tasks have been executed and the necessary input data are provided. For each task, the basic model will process the input data and generate the corresponding output data as the subtask processing result.

[0061] It should be understood that, when there are multiple basic models matching the subtask to be processed, it is necessary to select one basic model from the multiple matching basic models to execute the subtask to be processed.

[0062] After the subtask is completed, the corresponding task node in the task directed graph will update the task status. This includes marking the subtask as completed, recording the output data of the task, etc. It can be understood that the update of the task status helps to track the execution progress and results of the task.

[0063] In one embodiment, an initial context vector is generated for each node representing a subtask; when a subtask is processed, the subtask processing result of the subtask being executed is added to the initial context vector to form an updated context vector, and the updated context vector is passed to the subsequent subtask of the subtask being executed, so that the subsequent subtask merges the updated context vector into the initial context vector of the subsequent subtask.

[0064] To ensure the coherence between subtasks, this embodiment designs a context management mechanism. An initial context vector containing key information useful for the task or model is generated for each task node representing a subtask. The key information can be diverse, depending on the nature of the task and the requirements of the model.

[0065] Exemplarily, the initial context vector may include one or more of the following information: task requirements, which are used to clarify the goals and requirements of the task, such as identifying objects in images, translating text, or predicting user behavior; the execution result of the previous task, that is, the output of the previous subtask, which may be an intermediate result, a classification label, an entity recognition result, etc.; user history information, in interactive tasks, the user's historical input, preferences, and behavior patterns can be used as context information; environmental status, for tasks that require environmental perception, the current state of the environment (such as sensor data, location information, etc.); time information, the timestamp of the task or time-related information, which is particularly important for time-sensitive tasks; resource usage, the current resource status of the system; state, such as memory usage, availability of computing resources, etc.; model state, some models may need to maintain internal state, such as hidden state in recurrent neural networks; task dependency information, dependencies between tasks, which tasks need to wait for other tasks to complete before starting; error and exception information, errors or exceptions detected during task execution, need to be recorded and passed to subsequent tasks; strategy and heuristic information, strategy information based on experience or rules, may help the model make better decisions; interaction history, in multi-round dialogues or interactive tasks, previous interaction content can be used as contextual information; domain-specific information, knowledge or information for specific fields, such as medical record summaries in the medical field, case information in the legal field, etc.

[0066] When a subtask is processed, the subtask processing result of the subtask being executed is added to the initial context vector of the subtask to form an updated context vector. This updated context vector is passed to the subsequent subtask of the subtask being executed, so that the subsequent subtask merges the updated context vector into the initial context vector of the subsequent subtask.

[0067] Through this process, each subtask can make use of the processing results of the previous subtask, so that more reasonable decisions can be made when dealing with complex, dependent tasks. For example, in natural language processing, the output of the speech recognition model can be used as the input of the semantic understanding model to help it better understand the speech content.

[0068] To ensure that different base models can accurately understand the information in the context vector, the following measures can be taken: (1) Provide metadata for each element in the context vector, describing its meaning, type, and how to use it. (2) Design the model interface so that it can request and receive the required context vector and ignore irrelevant information. (3) Include the use of context information in the base model training process so that the base model can learn how to extract useful information from the context.

[0069] When all tasks are completed, the output data of each task can be integrated to generate the final processing results of the multi-stage tasks.

[0070] Exemplarily, some pseudo codes for implementing the above technical solution are as follows: import networkx as nx import numpy as np from GNN import GraphNeuralNetwork# Assume there is a GNN class implementation class TaskModelMatchingSystem: def __init__(self): self.task_graph = nx.DiGraph()# Task directed graph self.gnn_model = GraphNeuralNetwork()# Initialize the GNN model def build_task_graph(self, tasks, models, dependencies, match_relations, similarity_relations): """Build a task directed graph, including the definition of task nodes, model nodes and edges.""" for task in tasks: self.task_graph.add_node(task.id,node_type="task", features=task.features) for model in models: self.task_graph.add_node(model.id,node_type="model", features=model.features) for src, dst in dependencies: self.task_graph.add_edge(src, dst, type="dependency") for task_id, model_id in match_relations: self.task_graph.add_edge(task_id, model_id, type="match") for model1_id, model2_id in similarity_relations: self.task_graph.add_edge(model1_id, model2_id, type="similarity") def task_feature_vectorization(self): """Feature vectorization, simplified processing here, should be implemented according to specific feature extraction logic in actual application""" pass# Implementation details omitted def train_gnn(self): """Training Graph Neural Networks Using Task-Directed Graphs""" adj_matrix = nx.adjacency_matrix(self.task_graph).todense() features = np.array([self.task_graph.nodes[node]['features']for nodein self.task_graph.nodes]) self.gnn_model.train(adj_matrix, features) def calculate_match_scores(self): """Compute the task-model matching score through GNN""" updated_features = self.gnn_model.inference() match_scores = {} for task_node in self.task_graph.nodes(data=True): if task_node[1]['node_type']== 'task': for model_node in self.task_graph.nodes(data=True): if model_node[1]['node_type']== 'model': match_score = self.match_score_function(task_node[1]['features'],model_node[1]['features']) match_scores[(task_node[0], model_node[0])] = match_score return match_scores def match_score_function(self, task_features, model_features): """Define the matching score function""" # Simplified example, actual evaluation should be based on comprehensive features return np.dot(task_features, model_features) def assign_models_to_tasks(self, match_scores): """Assign models to tasks based on matching scores""" assignments = {} for task_id, scores in match_scores.items(): best_model_id = max(scores, key=scores.get) assignments[task_id] = best_model_id return assignments def dynamic_adjustment(self, feedback_data): """Dynamically adjust GNN model parameters based on feedback data""" # Implementation details omitted, adjust GNN training or feature vectors based on collected data pass def context_management(self): """Context management logic""" # Implementation details omitted, create and maintain context vector pass # Example usage flow tasks = [...] # List of subtasks models = [...] # List of models dependencies = [...] # Task dependencies match_relations = [...] # Task-model matching relations similarity_relations = [...] # Model similarity relations system = TaskModelMatchingSystem() system.build_task_graph(tasks, models, dependencies, match_relations,similarity_relations) system.task_feature_vectorization() system.train_gnn() match_scores = system.calculate_match_scores() assignments = system.assign_models_to_tasks(match_scores) system.dynamic_adjustment(feedback_data) # Assume that feedback_data has been collected system.context_management() In this embodiment, by introducing the intelligent agent model and the task directed graph, the processing efficiency of multi-stage tasks is improved. First, by performing task decomposition on the task information and the model library to form a task directed graph, the complex task is decomposed into multiple manageable subtasks, and the dependency relationship and processing order between the subtasks are clarified. Then, by extracting the feature vectors of each subtask and the basic model, and using the graph neural network model to transfer and update the features on the task directed graph, the node feature vectors of each subtask and the basic model are obtained, thereby determining the matching relationship between the subtask and the basic model. This not only reduces the complexity of task processing, but also improves the accuracy of task allocation and model selection. Finally, the task processing order of each subtask is determined based on the task directed graph, and the associated basic model is called in this order to process the subtask. By transferring the processing results of the subtask in the task directed graph, it is ensured that the subsequent subtask can be processed based on the results of the previous subtask, thereby generating the correct final result. This mechanism not only improves the efficiency and effect of task execution, but also meets the task requirements of users, and has significant practical value and application prospects.

[0071] In one embodiment, after step S30, the method further includes: obtaining system resource status; and determining the scheduling order of the basic model and the resource allocation strategy of the basic model based on the system resource status, the task feature vector and the model feature vector of the basic model.

[0072] In this embodiment, the system resource status indicates the real-time resource usage of the system for processing subtasks, including but not limited to: one or more of CPU utilization, memory usage, storage space, network bandwidth, and other resources. Among them, CPU utilization is used to indicate the busyness of the processor; memory usage, such as the amount of RAM currently used; storage space, such as the remaining capacity of the hard disk or other storage devices; network bandwidth, such as the currently available network transmission speed; other resources, such as GPU utilization, the busyness of I / O operations, etc.

[0073] This information is very important for subsequent resource allocation and task scheduling because it determines how many tasks the system can handle at a certain moment and how to allocate resources.

[0074] The electronic device pre-sets, under different system resources, a basic model for executing the corresponding subtask and resource allocation for the determined basic model according to the task feature vectors of the subtasks to be executed and the task processing order restrictions between the subtasks.

[0075] The task processing order restriction can be determined based on the clear dependency relationship in the above-mentioned task directed graph. The electronic device can process multiple multi-stage tasks at the same time. For each subtask decomposed from the multi-stage task, there are multiple subtasks that can be processed at the same time. In this case, the model scheduling order of the basic model used to process the corresponding subtask can be further determined.

[0076] In one embodiment, a corresponding basic model scheduling model is preset, and the system resource status, task feature vector and model feature vector of the basic model are used as inputs of the basic model scheduling model, and the basic model scheduling model is run to output the scheduling order of the basic model and the resource allocation strategy of the basic model.

[0077] The basic model scheduling model is a machine learning model that can predict the best basic model scheduling order and resource allocation strategy based on the input data. The scheduling order specifies the basic model that each subtask should use; the resource allocation strategy specifies how to allocate the system's resources to each subtask to ensure that the task can be completed efficiently and accurately.

[0078] For example, there are subtask 1, subtask 2 and subtask 3, where subtask 1 has matching relationships with model A, model B and model C. The scheduling order of the basic model scheduling model output can determine the basic model that is ultimately used to process subtask 1. For example, subtask 1-model A.

[0079] In one embodiment, step S40 includes: determining the task processing order of each subtask based on the scheduling order, resource allocation strategy and the task directed graph.

[0080] First, the system needs to analyze the task directed graph in depth to understand the dependencies between the subtasks. The nodes in the task directed graph represent subtasks, and the edges represent the dependencies between subtasks. If an edge points from node A to node B, it means that subtask A must be completed before subtask B. The system needs to identify which subtasks can be executed in parallel and which subtasks must be executed sequentially.

[0081] Next, based on the scheduling order output by the pre-trained basic model scheduling model, the system can determine which basic model should be used to process each subtask. Different models may have different resource requirements, so the system needs to adjust the task processing order based on the scheduling order output by the basic model scheduling model to ensure efficient use of resources.

[0082] Then, the system also needs to consider the resource allocation strategy output by the basic model scheduling model. This strategy specifies how to allocate the system's resources (such as CPU, memory, storage, etc.) to each subtask. The resource allocation strategy may have an impact on the order of task processing. For example, some subtasks may require a large amount of resources, so they may need to be executed before or after other subtasks to avoid resource conflicts.

[0083] Finally, the optimal task processing order is determined by combining all the above factors. Optimum can refer to maximizing resource utilization, minimizing task execution time, or meeting task deadlines.

[0084] In this embodiment, through the above steps, the system can ensure that the execution order of tasks can satisfy the dependencies between tasks, while maximizing resource utilization and task processing efficiency. In this way, the system can efficiently and accurately complete the processing of multi-stage tasks, meet the task requirements of users, and has significant practical value and application prospects.

[0085] In one embodiment, the above method further includes the step of generating a basic model scheduling model, referring to Figure 5 , the step includes steps A10 to A60: Step A10, creating a meta-learning task set and a basic model parameter set.

[0086] In this embodiment, the basic model scheduling model is trained based on Model-Agnostic Meta-Learning (MAML), which is a meta-learning algorithm designed to enable models to quickly adapt to new tasks. In the context of reinforcement learning (RL), the goal of MAML is to enable agent models to quickly adapt to new environments or tasks even with little experience.

[0087] First, a basic model parameter set needs to be defined as a shared starting point for all tasks or environments. This basic model parameter set can include structural parameters of the basic model scheduling model (such as the number of neural network layers, the number of nodes per layer, etc.), hyperparameters (such as learning rate, batch size, etc.), and other key parameters related to model performance (resource management parameters, resource allocation strategies, resource usage thresholds, etc.). Through the meta-learning process, this basic model parameter set will be optimized to quickly adapt to new task environments.

[0088] Next, create a meta-learning task set, which contains a series of simulated tasks or environments. Each task simulates different task requirements (such as task type, data modality), resource constraints (such as CPU / GPU limitations, memory usage), performance goals, etc. It should be noted that the meta-learning task set should be as broad as possible to cover the diverse situations that may be encountered in model scheduling.

[0089] Step A20, generating a model scheduling strategy for the meta-learning task set based on the basic model parameter set. For each simulation task, one or more gradient updates are performed based on the basic model parameter set to generate the model scheduling strategy for each simulation task. This step simulates the process of quickly adjusting the model and resource allocation when encountering new tasks.

[0090] Step A30, executing simulation tasks based on the model scheduling strategy, and collecting performance indicators of the model scheduling strategy on each simulation task according to the execution results. The simulation task is executed based on the model scheduling strategy, and the performance indicators of the task are collected according to the execution results, such as processing time, resource utilization efficiency and task success rate.

[0091] Step A40, obtaining a meta-gradient according to the performance index calculation, and updating the basic model parameter set according to the meta-gradient, and using the updated basic model parameter set as a new basic model parameter set.

[0092] Step A50, detecting whether a preset second iteration termination condition is satisfied, if so, executing step A60, otherwise, returning to continue executing step A20.

[0093] Step A60, forming a basic model scheduling model based on the basic model parameter set generated last time. Based on the performance indicators of all simulated tasks, the meta-gradient is calculated. The meta-gradient refers to the gradient calculated by forward propagation and back propagation of a batch of tasks in the inner loop iteration. This gradient reflects the adaptability of the basic model scheduling model when facing new tasks.

[0094] In the outer loop (meta-update), the meta-gradient is used to update the base model parameter set. This can optimize the adaptation speed and performance of the base model scheduling model for all tasks. This is a key step in MAML, through which the system learns how to achieve the best performance in the fewest adaptation steps.

[0095] Repeat steps A20 to A40, using a new basic model parameter set to generate a new model scheduling strategy in each iteration, and execute it on the simulation task, so as to gradually optimize the generalization ability of the model on different tasks. Until the preset second iteration termination condition is met, a basic model scheduling model is formed.

[0096] Among them, the second iteration termination condition can be reaching a predetermined number of iterations, performance indicators such as accuracy, loss value, etc. reaching a threshold, the performance improvement of the model is not obvious or tends to be stable, time limit, model complexity (such as the number of parameters, amount of calculation, etc.) reaching a threshold, etc.

[0097] In this embodiment, by alternating the updates of the inner loop and the outer loop, the basic model scheduling model can quickly adapt to new tasks and achieve higher performance indicators after a limited number of adaptation steps. This process can be achieved by minimizing the loss function of all tasks after adaptation, thereby achieving the goal of policy optimization.

[0098] As an optional implementation method of dynamically updating the basic model scheduling model, after step S50, steps B10 to B20 are also included: Step B10, monitor the tasks being executed and obtain task execution data.

[0099] In actual operation, by continuously monitoring task execution and system resource status, collecting data and feeding it back to the MAML loop, the basic model scheduling model can be continuously optimized.

[0100] To this end, the electronic device monitors the tasks being executed and obtains task execution data, which includes one or more of task execution progress, processing time and response speed. Among them, the task execution progress is used to indicate what percentage of the current task has been completed, or which subtasks have been completed. The processing time is used to indicate the processing time of each task or subtask, that is, the time taken from start to completion. The response speed is used to indicate the speed at which the electronic device responds to user requests or tasks, that is, the time taken from receiving the request to starting processing. These data can help the electronic device understand the execution status of the current task.

[0101] The electronic device can also obtain real-time data on the status of system resources by monitoring the status of system resources used to process subtasks. This includes but is not limited to the following: CPU utilization, which indicates how busy the processor is; memory usage, such as the amount of RAM currently in use; storage space, such as the remaining capacity of a hard disk or other storage device; and network bandwidth, such as the currently available network transmission speed. These real-time data on resource status can help understand the current load and available resources of the system.

[0102] Step B20, updating the basic model scheduling model based on the task execution data and system resource status.

[0103] In this embodiment, the collected task execution data and real-time data of system resource status are cleaned and formatted to make them suitable for input into the basic model scheduling model, and the basic model scheduling model is updated.

[0104] For example, a partial pseudo-code implementation framework for dynamic model scheduling based on Meta-RL with MAML is as follows: import numpy as np from collections import namedtuple # Define key components and operations in meta-learning Task = namedtuple('Task', ['id', 'environment', 'requirements']) # Task definition MetaLearner = namedtuple('MetaLearner', ['theta', 'meta_gradient', 'policy_net'])# Meta learner structure def initialize_meta_learner(base_theta, policy_structure): """Initialize the meta-learner""" return MetaLearner(theta=base_theta, meta_gradient=None, policy_net=policy_structure) def build_meta_learning_tasks(num_tasks, diversity_factor): """Building a diverse set of meta-learning tasks""" tasks = [Task(id=i, environment=f"env_{i}", requirements=np.random.rand(1)) for i in range(num_tasks)] # In actual applications, the environment and requirements should be constructed more based on the actual task characteristics. return tasks def inner_loop_adaptation(task, learner, adaptation_steps): """Inner loop: fast adaptation for a single task""" theta_prime = learner.theta.copy()# Copy basic parameters for the task for _ in range(adaptation_steps): # The simplified gradient update logic here should actually be based on the specific loss function of the task environment gradients = compute_gradients(task.environment, theta_prime) heta_prime -= learning_rate * gradients return theta_prime def compute_gradients(environment, parameters): """Simulate the process of calculating gradients, which should actually be defined by the specific task environment""" # Pseudo code, the actual environment and loss function should be used to calculate the gradient return np.random.randn(*parameters.shape)# represents random simulation of gradient def evaluate_performance(task, adapted_params): """Evaluate the performance of the adapted strategy""" # Implementation details depend on specific performance indicators, here we assume it is a simulation indicator performance = simulate_performance(task.environment, adapted_params) return performance def simulate_performance(env, params): """Performance indicators of simulated task execution""" # Pseudo code. In actual applications, the actual performance indicators should be simulated according to the environment and parameters. return -np.linalg.norm(params - env.mean()) # Negative distance as performance measure, example only def outer_loop_update(learner, tasks, adaptation_steps, num_updates): """Outer loop: meta-gradient calculation and basic parameter update""" for _ in range(num_updates): accumulated_gradients = np.zeros_like(learner.theta) for task in tasks: theta_prime = inner_loop_adaptation(task, learner, adaptation_steps) loss = evaluate_performance(task, theta_prime) task_gradients = compute_gradients(task.environment, theta_prime) accumulated_gradients += task_gradients # Accumulated gradients, simplified processing without considering task weights learner.meta_gradient = accumulated_gradients / len(tasks) # Average gradient as meta gradient learner.theta -= meta_learning_rate * learner.meta_gradient # Update basic parameters def design_policy_network(input_size, output_size): """Design basic model scheduling model architecture""" # In practical applications, deep learning frameworks should be used to define network structures pass def optimize_policy_network(policy_net, tasks, adaptation_steps): """Optimize the basic model scheduling model""" # Implementation details depend on the specific optimization algorithm and objective function pass def dynamic_resource_management(policy_net, current_state): """Dynamic model loading and resource allocation""" decision = policy_net.predict(current_state) # Dynamically adjust models and resources based on decisions. Here is the schematic logic return load_models(decision), allocate_resources(decision) def main(): # Initialization base_theta = np.zeros((10,)) # Assumed parameter vector size policy_net = design_policy_network(input_dim, output_dim) learner = initialize_meta_learner(base_theta, policy_net) # Build a task set tasks = build_meta_learning_tasks(num_tasks=100, diversity_factor=5) # Meta-learning loop outer_loop_update(learner, tasks, adaptation_steps=5, num_updates=100) # Basic model scheduling model optimization (example) optimize_policy_network(learner.policy_net, tasks, adaptation_steps=5) Online Learning and Adaptation Example current_state = observe_current_system_state() loaded_models, resource_allocation_plan = dynamic_resource_management(learner.policy_net, current_state) # Implement scheduling, monitor feedback, and continuously iterate and optimize... if __name__ == "__main__": main() In this embodiment, by introducing a meta-learning mechanism, the adaptability and generalization ability of the model are significantly improved. By creating a meta-learning task set and a basic model parameter set, and using meta-gradients to update the basic model parameter set, the basic model scheduling model can adapt and optimize on multiple simulation tasks, thereby finding a good initial parameter, so that the model can quickly adapt and show good performance when facing new tasks. In addition, by inputting system resource status and task information into the pre-trained basic model scheduling model, the system can continuously optimize its decision-making strategy during operation and improve its ability to handle multi-stage tasks. This method not only achieves efficient resource scheduling and task processing, but also enhances the system's self-optimization ability, and can maintain good performance when tasks and environments change.

[0105] In summary, by updating the basic model scheduling model through meta-learning and real-time monitoring, the system's adaptability, resource utilization and self-optimization ability are effectively improved, while the system's flexibility and scalability are enhanced, which has significant beneficial effects.

[0106] In one embodiment, after step B20, the method further comprises: Figure 6 , further comprising steps B30 to B50: Step B30, obtaining the execution prediction data of the basic model scheduling model for the multi-stage tasks before updating.

[0107] It is important to understand that the scheduling order and resource allocation strategy output by the basic model scheduling model are the optimal choices based on future simulations or predictions. In this step, it is necessary to obtain the execution prediction data of the scheduling order and resource allocation strategy made by the basic model scheduling model before the update when making decisions. The execution prediction data includes task prediction data and system resource prediction data. Among them, the task prediction data is the information such as the execution progress, processing time, response speed, etc. of the task predicted by the basic model scheduling model before the update based on the status and historical data of multi-stage tasks. The system resource prediction data is the future status of system resources predicted by the basic model scheduling model based on the status and historical data of system resources at that time, such as CPU utilization, memory usage, storage space, etc.

[0108] Step B40, calculating an offset value according to the task prediction data, the system resource prediction data, the task execution data and the real-time data of the system resource status.

[0109] Referring to step B10 in the third embodiment, real-time task execution data and system resource status are obtained, which will not be described in detail in this embodiment.

[0110] By comparing the predicted data with the actual task execution status and system resource status, the offset value can be calculated to evaluate the prediction accuracy of the base model scheduling model, and the base model scheduling model can be updated if necessary.

[0111] As an optional implementation for calculating the offset value, for numerical data (such as processing time, CPU utilization, etc.), the mean square error can be used to calculate the offset value. For example, if the predicted processing time is The actual processing time is , then the offset value can be defined as ( - ). For multiple data points, the average of the mean square errors of all data points can be calculated as the total offset value.

[0112] As another optional implementation for calculating the offset value, for numerical data, the absolute error can also be used to calculate the offset value. For example, if the predicted processing time is The actual processing time is , then the offset value can be defined as ( - ). For multiple data points, the average of the absolute errors of all data points can be calculated as the total offset value.

[0113] As another optional implementation for calculating the offset value, for categorized data, the offset value may be calculated using a classification error or cross entropy loss method.

[0114] Step B50, when the offset value is greater than a preset offset value, the updated basic model scheduling model is run based on the task execution data and the system resource status to obtain an updated scheduling order and an updated resource allocation strategy.

[0115] When the offset value is greater than the preset offset value, it indicates that the prediction result of the basic model scheduling model before the update is significantly different from the actual situation. The updated basic model scheduling model is run based on the task execution data and the system resource status to obtain the updated scheduling order and the updated resource allocation strategy. The output process of the updated basic model scheduling model and the subsequent processing process of the subtasks refer to the aforementioned embodiment, and this embodiment will not be described in detail here.

[0116] It should be noted that the updated basic model scheduling model here is not necessarily the basic model scheduling model updated based on the real-time data of the current task execution data and system resource status, because if the deviation value is greater than a certain degree, it is likely to be abnormal data and is not suitable for updating the model. Therefore, the updated basic model scheduling model here may also be the basic model scheduling model updated based on the real-time data of a previous time node.

[0117] In this embodiment, by introducing the real-time prediction and update mechanism of the basic model scheduling model, the adaptive ability and prediction accuracy of the system are effectively improved. By real-time monitoring of the execution of multi-stage tasks and the system resource status, and obtaining real-time data of task execution data and system resource status, the system can dynamically adjust and optimize according to the current actual status, thereby improving its response speed and efficiency. When the offset value is greater than the preset offset value, the output result of the updated basic model scheduling model is obtained in time, and the output result is executed. The system can respond to changes quickly and avoid resource waste and task delays caused by inaccurate predictions. This mechanism not only realizes efficient resource scheduling and task processing, but also provides a flexible configuration and adjustment mechanism, allowing users to flexibly adjust the update frequency and threshold of the basic model scheduling model according to actual needs and expected goals, thereby realizing resource configuration and task processing that is more in line with actual needs. In addition, by real-time monitoring and updating the basic model scheduling model, the system can maintain stable performance and reliable operation status in the face of external environmental changes and internal resource fluctuations, thereby enhancing the stability and reliability of the system.

[0118] In one embodiment, a computer storage medium is provided, on which executable instructions are stored. When the instructions are executed by a processor, the processor executes the steps in the above-mentioned method embodiments.

[0119] In one embodiment, an electronic device is also provided, including one or more processors; a memory, wherein one or more programs are stored in the memory, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the steps in the above-mentioned method embodiments. For example, the electronic device can be any device such as the above-mentioned thermal management device and computing service device.

[0120] In one embodiment, Figure 7 As shown, it shows a schematic diagram of the structure of an electronic device for implementing an embodiment of the present application. The electronic device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0121] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0122] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, including a computer-readable medium carrying instructions, in such an embodiment, the instructions can be downloaded and installed from a network through a communication part 709, and / or installed from a removable medium 711. When the instructions are executed by a central processing unit (CPU) 701, the various method steps described in the present application are executed.

[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0124] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the above claims, any one of the claimed embodiments may be used in any combination. The information disclosed in this background technology section is intended only to deepen the understanding of the overall background technology of the present application and should not be regarded as an admission or in any form of implication that the information constitutes prior art known to those skilled in the art.

Claims

1. A multi-stage task processing method based on an intelligent agent model, characterized in that: The method comprises: Get the task information of the multi-stage tasks to be processed; Decomposing the task information and the model library to form a task directed graph, wherein the nodes in the task directed graph represent the subtasks formed by decomposition or the basic models in the model library, and the edges of the nodes in the task directed graph represent the association relationship between the nodes; Based on the task feature vector of each subtask and the model feature vector of the basic model, determining the matching relationship between each subtask and the basic model; Determine a task processing order for each subtask based on the task directed graph; The associated basic model is called in accordance with the task processing order to process the subtasks, wherein subsequent subtasks are processed based on the subtask processing results transmitted by the preceding subtasks on the task directed graph to obtain the task processing results of the multi-stage task.

2. The multi-stage task processing method based on the intelligent agent model according to claim 1 is characterized in that: The base model matching at least one subtask includes a plurality of; The calling of the associated basic models to process the subtasks in the task processing order includes: when there are multiple basic models matching the subtask to be processed, selecting one basic model from the multiple matching basic models to execute the subtask to be processed.

3. The multi-stage task processing method based on the intelligent agent model according to claim 1 is characterized in that: Before determining the matching relationship between each subtask and the basic model based on the task feature vector of each subtask and the model feature vector of the basic model, the method further includes: Obtain the node feature vector to be updated of each node; Taking each node in the task directed graph as a node to be processed, and based on a graph neural network model, transferring the node feature vector to be updated of the node to be processed to a neighboring node of the node to be processed; Fusing the node feature vector to be updated of the node to be processed and the node feature vector to be updated of the neighboring node, taking the fused node feature vector as a new node feature vector to be updated, and re-performing the step of transferring the node feature vector to be updated of the node to be processed to the neighboring node of the node to be processed until a preset first iteration termination condition is met; The node feature vector to be updated formed last time is used as the node feature vector of the corresponding node in the task directed graph. When the node in the task directed graph represents a subtask, the node feature vector is the task feature vector. When the node in the task directed graph represents a basic model, the node feature vector is the model feature vector.

4. The multi-stage task processing method based on the intelligent agent model according to claim 1 is characterized in that: After determining the matching relationship between each subtask and the basic model based on the task feature vector of each subtask and the model feature vector of the basic model, the method further includes: Get system resource status; Determining a scheduling order of a basic model and a resource allocation strategy of the basic model based on the system resource status, the task feature vector and the model feature vector of the basic model; The determining the task processing order of each subtask based on the task directed graph includes: A task processing order of each subtask is determined based on the scheduling order, the resource allocation strategy and the task directed graph.

5. The multi-stage task processing method based on the intelligent agent model according to claim 4 is characterized in that: Before determining the scheduling order of the basic model and the resource allocation strategy of the basic model based on the system resource state, the task feature vector and the model feature vector of the basic model, the method further includes: Creating a meta-learning task set and a basic model parameter set, wherein the meta-learning task set includes a plurality of simulation tasks, and the basic model parameter set is used as a shared starting point for the simulation tasks; Generate a model scheduling strategy for the meta-learning task set based on the basic model parameter set; Execute the simulation task based on the model scheduling strategy, and collect performance indicators of the model scheduling strategy on each simulation task according to the execution results; A meta-gradient is calculated according to the performance indicator, and the basic model parameter set is updated according to the meta-gradient, the updated basic model parameter set is used as a new basic model parameter set, and the model scheduling strategy for generating the meta-learning task set based on the basic model parameter set is re-executed until a preset second iteration termination condition is met, and a basic model scheduling model is formed; The determining of the scheduling order of the basic model and the resource allocation strategy of the basic model based on the system resource state, the task feature vector and the model feature vector of the basic model comprises: The system resource status, the task feature vector and the model feature vector of the basic model are input into the basic model scheduling model to obtain the scheduling order of the basic model and the resource allocation strategy of the basic model.

6. The multi-stage task processing method based on the intelligent agent model according to claim 5 is characterized in that: After calling the associated basic model to process the subtasks in the task processing order, the method further includes: Monitor the tasks being executed and obtain task execution data, wherein the task execution data includes one or more of task execution progress, processing time and response speed; The basic model scheduling model is updated based on the task execution data and the system resource status.

7. The multi-stage task processing method based on the intelligent agent model according to claim 6 is characterized in that: After the basic model scheduling model is updated based on the task execution data and the system resource status, the method further includes: Acquire execution prediction data for the multi-stage task according to the basic model scheduling model before updating, wherein the execution prediction data includes task prediction data and system resource prediction data; Calculating an offset value according to the task prediction data, the system resource prediction data, the task execution data and the system resource status; When the offset value is greater than a preset offset value, an updated basic model scheduling model is run based on the task execution data and the system resource status to obtain an updated scheduling order and an updated resource allocation strategy.

8. The multi-stage task processing method based on the intelligent agent model according to any one of claims 1 to 7, characterized in that: The calling of the associated basic model to process the subtasks in the task processing order includes: Generate an initial context vector for each node representing a subtask; When a subtask is processed, the subtask processing result of the subtask being executed is added to the initial context vector to form an updated context vector, and the updated context vector is passed to the subsequent subtask of the subtask being executed, so that the subsequent subtask merges the updated context vector into the initial context vector of the subsequent subtask.

9. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the multi-stage task processing method based on the intelligent Agent model as described in any one of claims 1 to 8.

10. A computer storage medium, characterized in that: The storage medium stores executable instructions, and when the instructions are executed by the processor, the processor executes the multi-stage task processing method based on the intelligent Agent model as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method, system and device for prediction based on graph neural network

    CN111985729A

  • Query task staged scheduling method and system

    CN116880981A

  • Method and device for decomposing and scheduling basic model task with enhanced thinking map prompt

    CN117370638A

  • Robotic task planning for complex task instructions in natural language

    US20210232121A1

Cited By

  • Multi-factor special fund filling overdue prediction method and system, medium and equipment

    CN119128815A

  • Quick application switching method and system applied to GPU (Graphics Processing Unit) computing power scheduling

    CN119149248A

  • Method for generating machine learning features in database of multi-agent proxy

    CN119151016A

  • Robot-based task execution method and device, computer equipment, readable storage medium and program product

    CN119974026A

  • Robot-based task execution method, device, computer equipment, readable storage medium, and program product

    CN119974026B