Task processing method, system and device, medium and computer program product
Through the combination of large-model agent and reinforcement learning algorithm, the execution strategy of task processing is dynamically adjusted, and the problems of waste of resources and poor results in the existing technology are solved, the optimal balance between the effect and cost of task processing is achieved, and the task processing is adapted to task processing is adapted to task processing. diversification and dynamic requirements.
Patent Information
- Application Number
- CN202411265309.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-27
AI Technical Summary
The existing technology has problems of waste of resources and poor results in task processing, especially under the requirements of diversified and dynamic task processing, static rules or manual adjustment strategies are difficult to adapt, resulting in low resource utilization and high operating costs.
By introducing large-scale agents and reinforcement learning algorithms, the execution strategy of task processing is dynamically adjusted, and the optimal task processing tools and methods are selected according to the current system status and resource consumption, so as to realize automatic learning and dynamic adjustment of execution strategies to ensure task effect Optimal balance with cost.
It improves the execution efficiency and effectiveness of large-scale model agents, reduces resource waste and operation costs, and can achieve the best balance between task processing effects and costs in complex and changeable application scenarios.
Smart Images

Figure CN119201387A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a specific field of data processing technology, and in particular to a task processing method, system, device, medium and computer program product. Background Art
[0002] With the rapid development of artificial intelligence technology, deep learning models and large-scale machine learning models are increasingly being used in various fields. In practical applications, more and more tasks are processed using tools such as models or algorithms. These models usually require a lot of computing resources and time for training and reasoning to achieve efficient task execution.
[0003] At present, task processing often relies on static rules or manually adjusting the task execution strategy. However, the requirements for different task execution actions are different. If static rules or manually adjusting the task execution strategy are used, it is difficult to adapt to the diversified or dynamic requirements of task processing, resulting in resource waste and poor results in task processing.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a task processing method, system, device, medium and computer program product, aiming to solve the technical problems of resource waste and low effect when performing task processing.
[0006] To achieve the above objectives, the present application proposes a task processing method, which includes:
[0007] Determine the target execution action of the task to be executed according to the preset big model agent, and determine the current execution strategy of the target execution action under the current system state, and execute the target execution action according to the current execution strategy, wherein the current execution strategy includes selecting at least one task processing tool to execute the target execution action, and the task processing tool includes the big model;
[0008] Determine, based on the system state after the target execution action is executed, a current execution strategy parameter of the target execution action, wherein the current execution strategy parameter includes at least one of an execution strategy cost and an execution strategy effect of the target execution action;
[0009] When there is an abnormality in the current execution strategy parameters, dynamically adjust the execution strategy of the subsequent execution action corresponding to the target execution action;
[0010] The subsequent execution actions are executed according to the adjusted execution strategy until the to-be-executed tasks are completed.
[0011] Further, the step of dynamically adjusting the execution strategy of the subsequent execution action corresponding to the target execution action includes:
[0012] Determining at least one first strategy to be executed based on at least one task processing tool that can be used to execute the subsequent execution action;
[0013] Determining a first reinforcement parameter of the at least one first strategy to be executed according to a preset reinforcement learning model;
[0014] The execution strategy of the subsequent execution action is dynamically adjusted to match the first to-be-executed strategy corresponding to the largest first reinforcement parameter.
[0015] Further, the step of determining the first reinforcement parameter of the at least one first strategy to be executed according to the preset reinforcement learning model includes:
[0016] For any first strategy to be executed, determining a first system state corresponding to the first strategy to be executed, wherein the first system state includes a task processing tool selected according to the first strategy to be executed, a task processing progress and resource consumption of the task to be executed;
[0017] The first system state is input into a preset reinforcement learning model, and a first reinforcement parameter is output, wherein a state transition sample matching the first system state in a preset experience replay pool is determined according to the reinforcement learning model, a reinforcement learning value corresponding to the state transition sample is calculated, and the reinforcement learning value is used as the first reinforcement parameter.
[0018] Further, determining a current execution strategy of the target execution action under the current system state, and executing the target execution action according to the current execution strategy includes:
[0019] Determining at least one second strategy to be executed based on at least one task processing tool that can be used to execute the target execution action;
[0020] Determine a second reinforcement parameter of the at least one second strategy to be executed according to a preset reinforcement learning model, and select the second strategy to be executed corresponding to the largest second reinforcement parameter as the current execution strategy;
[0021] Under the current system state, the task processing tool is called according to the current execution strategy to execute the target execution action, wherein the current system state includes the task processing tool selected according to the current execution strategy, the task processing progress and resource consumption of the task to be executed.
[0022] Further, based on the system state after the target execution action is executed, the step of determining the current execution strategy parameters of the target execution action includes:
[0023] Based on the system state after the target execution action is executed, determining the computing resource cost, time cost and energy consumption cost generated when the target execution action is executed according to the current execution strategy;
[0024] The resource cost, the time cost and the energy consumption cost are weighted and summed to obtain the execution strategy cost of the target execution action.
[0025] Further, after the step of determining the current execution strategy parameters of the target execution action, at least one of the following is included:
[0026] If the execution strategy cost of the target execution action is greater than the preset cost, it is determined that the current execution strategy parameters are abnormal;
[0027] If the execution strategy effect of the target execution action does not match the expected effect, it is determined that there is an abnormality in the current execution strategy parameters.
[0028] In addition, to achieve the above purpose, the present application also proposes a task processing system, the task processing system comprising:
[0029] A task execution module, used to determine the target execution action of the task to be executed according to the preset large model agent, and determine the current execution strategy of the target execution action under the current system state, and execute the target execution action according to the current execution strategy, wherein the current execution strategy includes selecting at least one task processing tool to execute the target execution action;
[0030] a cost evaluation module, configured to determine a current execution strategy parameter of the target execution action based on a system state after the target execution action is executed, wherein the current execution strategy parameter includes at least one of an execution strategy cost and an execution strategy effect of the target execution action;
[0031] A strategy optimization module, used to dynamically adjust the execution strategy of the subsequent execution action corresponding to the target execution action when there is an abnormality in the current execution strategy parameters;
[0032] The optimization strategy execution module is used to execute the subsequent execution actions according to the adjusted execution strategy until the execution of the task to be executed is completed.
[0033] In addition, to achieve the above objectives, the present application also proposes a task processing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the task processing method described above.
[0034] In addition, to achieve the above objectives, the present application also proposes a medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the task processing method described above are implemented.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the task processing method described above are implemented.
[0036] In this application, the target execution action of the task to be executed is determined by the preset large model agent, and the current execution strategy of the target execution action in the current state is determined, and the target execution action is executed according to the current execution strategy. Since the current execution strategy includes selecting at least one task processing tool to execute the target execution action, when executing the target execution action, it is executed by selecting at least one task processing tool, such as selecting a large model for execution. And based on the system state after the target execution action is executed, the current execution strategy parameters of the target execution action are determined. When there is an abnormality in the current execution strategy parameters, the execution strategy of the subsequent execution action corresponding to the target execution action is dynamically adjusted, and then the subsequent execution action is executed according to the adjusted execution strategy until the execution of the task to be executed is completed. Since the current execution strategy parameters include at least one of the execution strategy cost and effect of the target execution action, it is possible to monitor the execution strategy cost and effect generated when the target execution action is executed during the execution of the task to be executed. When at least one of the two is abnormal, the execution strategy of the subsequent execution action will be dynamically adjusted, and then the best balance between the effect and cost during the execution of the task to be executed can be achieved, avoiding the use of static rules or manual adjustment of the execution strategy of the task, which is difficult to adapt to the diversified or dynamic requirements of task processing, resulting in waste of resources and poor effect of task processing. That is, when there is an abnormality in the execution strategy cost, the execution strategy of the subsequent execution action can be dynamically adjusted, thereby avoiding the phenomenon of waste of resources during the task processing of the task to be executed. When there is an abnormality in the execution strategy effect, the execution strategy of the subsequent execution action can be dynamically adjusted, thereby improving the effect of the task processing of the task to be executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 A flowchart of the first embodiment of the task processing method of the present application is provided;
[0040] Figure 2 A flowchart diagram of strategy selection is provided for the first embodiment of the task processing method of the present application;
[0041] Figure 3 A schematic diagram of the system architecture provided for the first embodiment of the task processing method of this application;
[0042] Figure 4 A flowchart of the dynamic adjustment mechanism in the task processing method of this application;
[0043] Figure 5 A flowchart of the cost calculation of the task processing method of this application;
[0044] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the task processing method in the embodiment of the present application.
[0045] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0046] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0047] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0048] Different tools and strategies have significant differences in performance, effect, resource consumption, etc. For example, in natural language processing tasks, different pre-trained models such as BERT and GPT-3 can be selected; in image recognition tasks, different convolutional neural networks such as ResNet and Inception can be selected. These tools and strategies have their own advantages and disadvantages, and choosing appropriate tools can significantly improve the effect and efficiency of task execution. However, it is difficult to achieve the optimal effect and cost balance in complex and changeable practical applications by selecting tools based on preset rules and simple heuristic strategies. For example, when faced with different data and task requirements, existing systems are usually difficult to dynamically adjust execution strategies according to real-time conditions, resulting in low resource utilization and high operating costs. In addition, the preset rules and heuristic methods lack adaptability and are difficult to handle the diverse and dynamically changing scenarios that may be encountered in practical applications. Therefore, in this embodiment, a method that can automatically learn and dynamically adjust execution strategies is provided, so that the system can select the most appropriate tools and strategies under different conditions, thereby minimizing resource consumption and operating costs while ensuring task effects.
[0049] Therefore, in this embodiment, by introducing reinforcement learning algorithms and real-time cost evaluation mechanisms, the system can automatically select the best tools and methods according to the current task and environment, and dynamically adjust the strategy during execution to achieve the best balance between effect and cost. This method not only improves the execution efficiency and effect of large model agents, but also greatly reduces resource waste and operating costs, and has important application value and broad application prospects.
[0050] It should be noted that the execution subject of this embodiment may 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 an electronic device capable of realizing the above functions, a task processing device, etc. The following takes the task processing device as an example to illustrate this embodiment and the following embodiments.
[0051] Based on this, the present application embodiment provides a task processing method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the task processing method of this application.
[0052] In this embodiment, the task processing method includes steps S10 to S40.
[0053] Step S10, determining the target execution action of the task to be executed according to the preset large model agent, and determining the current execution strategy of the target execution action under the current system state, and executing the target execution action according to the current execution strategy;
[0054] It should be noted that the current execution strategy includes selecting at least one task processing tool to execute the target execution action.
[0055] Optionally, the task to be executed may be a task to be processed by the task processing system. The task to be executed may be determined and generated according to the recognized user intention. The task to be executed may be a search task, a text generation task, a translation task, or other types of tasks.
[0056] Optionally, the execution action may be an action that needs to be performed when the task to be executed is executed, such as drawing, obtaining the blood relationship of characters, translation, etc. The target execution action may be any of the execution actions, such as the first execution action when the task to be executed is executed. Optionally, the task processing system may perform at least one execution action when processing the task to be executed. And for each execution action, the best execution strategy may be selected for execution according to the real-time system status.
[0057] Optionally, a tool library can be set in the task processing system, and multiple task processing tools can be set in the tool library. Multiple execution strategies can be set for each execution action of the task to be executed, and each execution strategy includes selecting at least one task processing tool to execute the execution action. For example, when the target execution action is drawing, there are task processing tools that can realize the drawing function in the tool library, including task processing tool A and task processing tool B. Then, two execution strategies can be set for drawing, one execution strategy is to use task processing tool A for drawing, and the other execution strategy is to use task processing tool B for drawing. Then, in combination with the current real-time system status, one of the two execution strategies is selected as the current execution strategy, and the target execution action is executed according to the selected current execution strategy.
[0058] Optionally, the task processing tool may be a device or apparatus for processing tasks, a model or algorithm with different functions, such as a large model (language large model, visual large model, recommendation large model, speech large model, etc.), a drawing tool, a text tool, a compiler, etc. There is no limitation here.
[0059] Optionally, this embodiment can be applied to a task processing system running in a task processing device. The task processing system can be a multi-agent system or other system for processing tasks. Taking a multi-agent system as an example, the system receives user input, determines the user's intention based on the input, determines the task to be executed based on the user's intention, selects an optimal execution strategy for each execution action of the task to be executed, calls different task processing tools to execute each execution action according to the optimal execution strategy, and then performs a comprehensive reply after the task to be executed is completed.
[0060] Optionally, after the task processing system receives input information input by the user, the task to be executed can be determined according to the input information. For example, if the user inputs "determine the blood relationship between Jia Baoyu and Lin Daiyu". Then the task to be executed can be "determine the blood relationship between Jia Baoyu and Lin Daiyu". Optionally, the intent analysis of the task to be executed can be performed to determine how many execution actions are required to complete the task to be executed. For example, an execution action including obtaining the blood relationship of the characters and an execution action including drawing. Therefore, any execution action can be selected as the target execution action. For example, the execution action including obtaining the blood relationship of the characters is selected as the target execution action.
[0061] Optionally, the current system state needs to be determined, and the target execution action needs to be executed according to the current execution strategy in the current system state. At least one task processing tool corresponding to the current execution strategy can be selected and called in the tool library to execute the target execution action until the execution is completed, and the execution result of the target execution action is obtained. Optionally, if the current system state is updated, a new execution strategy needs to be re-acquired according to the updated current system state, and the target execution action needs to be executed.
[0062] Step S20, determining the current execution strategy parameters of the target execution action based on the system state after the target execution action is executed;
[0063] It should be noted that the current execution strategy parameter includes at least one of the execution strategy cost and the execution strategy effect of the target execution action.
[0064] Optionally, after the system uses the current execution strategy to execute the target execution action of the task to be executed, it is necessary to determine the system state after the target execution action is executed. The system state at this time is different from the current system state before executing the target execution action. For example, the task processing progress of the task to be executed is different, and different task processing tools need to be selected later.
[0065] Optionally, during the execution of the task to be executed, the system status will be monitored in real time, so as to determine the execution strategy effect and execution strategy cost of the task to be executed after the target execution action is executed according to the real-time monitored system status. Optionally, the task processing system can determine the resource waste situation according to the real-time monitored system status, and then determine the total cost generated after the target execution action is executed using the current execution strategy according to the resource waste situation, and use it as the current execution strategy cost. For example, when the target execution action is executed according to the current execution strategy, two task processing tools are used to execute the target execution action, and the total cost generated by the two task processing tools will be counted. Optionally, the task processing system can determine the effect of the task to be executed after the target execution action is executed according to the real-time monitored system status. For example, when the target execution action is to determine the blood relationship of a person, the effect of the blood relationship of the person obtained after the target execution action is executed can be evaluated to determine whether it is accurate, and then the execution strategy effect can be determined according to the effect evaluation result.
[0066] Further, in a feasible embodiment, in step S20, after the step of determining the current execution strategy parameters of the target execution action, at least one of step a10 and step a20 is included.
[0067] Step a10, if the execution strategy cost of the target execution action is greater than the preset cost, it is determined that the current execution strategy parameters are abnormal;
[0068] Optionally, the preset cost includes a preset cost threshold, and the preset cost threshold may be a cost value set in advance.
[0069] Optionally, the cost value corresponding to the execution strategy cost of the target execution action can be determined and compared with a preset cost threshold. If it is greater than the preset cost threshold, it can be determined that the execution strategy cost of the target execution action is greater than the preset cost, and then it is determined that there is an abnormality in the current execution strategy parameters.
[0070] Step a20: If the execution strategy effect of the target execution action does not match the expected effect, it is determined that there is an abnormality in the current execution strategy parameters.
[0071] Optionally, the task processing effect generated when the target execution action is executed according to the current execution strategy can also be monitored to obtain the execution strategy effect of the target execution action. When a significant change in the execution strategy effect is detected, such as a large difference between the execution strategy effect and the expected effect (which can be the effect estimated in advance), it is determined that the execution strategy effect does not match the expected effect, and then it is determined that the current execution strategy parameters are abnormal.
[0072] However, if the execution strategy effect is close to the expected effect, that is, the execution strategy effect matches the expected effect, and the cost value corresponding to the execution strategy cost of the target execution action is less than or equal to the preset cost threshold, then it can be determined that there is no abnormality in the current execution strategy parameters.
[0073] In this embodiment, the execution strategy cost and the execution strategy effect of the target execution action are evaluated respectively to determine whether there are any abnormalities in the current execution strategy parameters, so as to promptly discover that the cost is too high and the effect is poor during the execution of the task to be executed, so as to make corresponding adjustments later, thereby reducing the cost generated during the execution of the task to be executed and improving the task processing effect.
[0074] Step S30, when there is an abnormality in the current execution strategy parameters, dynamically adjust the execution strategy of the subsequent execution action corresponding to the target execution action;
[0075] Optionally, when it is determined that there is an abnormality in the current execution strategy parameters, it is necessary to dynamically adjust the execution strategy of the subsequent execution action corresponding to the target execution action, that is, reselect a new execution strategy.
[0076] Optionally, when dynamically adjusting subsequent execution actions, all task processing tools that can be used to execute subsequent execution actions can be determined in the tool library, and then different execution strategies are generated based on these task processing tools. Then, an execution strategy is selected from the generated execution strategies to update the execution strategy of the subsequent execution actions to obtain an adjusted execution strategy.
[0077] For example, refer to Figure 2 , first initialize the agent, environment and strategy, that is, initialize the large model agent in the task processing system, and initialize the environment and execution strategy of the large model agent. When the task processing system receives the task to be executed, the current system state is determined according to the current environment of the task processing system, and then the current execution strategy of the target execution action of the task to be executed is determined according to the current system state, and the target execution action is executed through the current execution strategy. After the target execution action is executed, before the subsequent execution action is executed, the current strategy is evaluated, that is, the current execution strategy is evaluated, and the cost operation is performed on the current execution strategy to obtain the current execution strategy cost. When there is an abnormality in the current execution strategy cost, it is necessary to update (Q-learning (Q function) / DQN (deep Q network)) to select the optimal tools and methods, that is, dynamically adjust the execution strategy of the subsequent execution action to obtain the adjusted execution strategy. Then, the subsequent execution action is executed according to the adjusted execution strategy. And when the current environment changes, such as when the real-time system state is updated, the operation of evaluating the current strategy will be re-executed, that is, the evaluation of the current strategy will be executed cyclically until the best execution strategy is selected to execute the subsequent execution action.
[0078] Step S40, executing subsequent execution actions according to the adjusted execution strategy until the task to be executed is completed.
[0079] Optionally, after determining the adjusted execution strategy, the system state can be updated, and in the updated system state, subsequent execution actions are performed according to the adjusted execution strategy, and after all execution actions of the task to be executed are completed, the corresponding processing results are generated for display.
[0080] For example, if the subsequent execution action is drawing, and the adjusted execution strategy includes calling a drawing tool for drawing, then after completing the target execution action and obtaining the execution result of the target execution action, you can call the drawing tool in the tool library according to the adjusted execution strategy, draw according to the execution result of the target execution action, generate a corresponding image, and output and display the generated image.
[0081] In addition, to assist in understanding the task processing system in this embodiment, an example is given below.
[0082] For example, Figure 3 As shown, the system architecture of the task processing system may include a large model agent, a tool agent, a cost evaluation module, a strategy optimization module and a dynamic adjustment mechanism. It may also include other modules, such as an interface module, which is not limited here. Optionally, the large model agent is connected to the tool agent, the cost evaluation module, the strategy optimization module and the dynamic adjustment mechanism respectively. Optionally, the large model agent may be responsible for executing specific tasks, such as tasks to be executed, and calculating according to input data and the selected task processing tool. The tool library may provide a variety of task processing tools and execution strategies for the large model agent to choose from. These task processing tools and execution strategies have different costs and efficiencies. The cost evaluation module can evaluate the cost of each task processing tool and the cost of different execution strategies, including the cost of computing resources, time and energy consumption. The strategy optimization module can select the optimal strategy based on the cost evaluation results. The dynamic adjustment mechanism can dynamically adjust the optimal strategy.
[0083] Optionally, the large model agent in the task processing system can select a task processing tool from the tool library to execute the target execution action of the task to be executed according to the current execution strategy. After executing the target execution action according to the current execution strategy, the large model agent sends an instruction requesting cost evaluation to the cost evaluation module. The cost evaluation module performs cost evaluation on the cost generated by executing the target execution action according to the current execution strategy according to the instruction requesting cost evaluation, and returns the cost evaluation result to the large model agent. When there is an obvious abnormality in the cost evaluation result, the large model agent can send an instruction requesting policy optimization to the policy optimization module. The policy optimization module optimizes the execution strategy of subsequent execution actions according to the instruction requesting policy optimization. After determining the optimization strategy, it will return the optimization strategy to the large model agent. The large model agent can dynamically adjust the optimization strategy to the execution strategy of subsequent execution actions according to the dynamic adjustment mechanism, that is, the adjusted execution strategy, and execute subsequent execution actions according to the adjusted execution strategy until the task to be executed is completed.
[0084] Optionally, for the dynamic adjustment mechanism, please refer to Figure 4 , for the task processing system, the current state is monitored in real time, that is, when the task processing system is executing the task to be executed, the system state will be monitored in real time to determine whether the trigger condition is met: the cost / effect changes significantly. For example, after the task processing system uses the current execution strategy to execute the target execution action of the task to be executed, it is found that the execution strategy cost and / or the execution strategy effect of the target execution action have changed significantly, then it can be determined that there is an abnormality in the current execution strategy parameters and the trigger condition is met. At this time, it is necessary to evaluate the cost and adjust the execution strategy of the subsequent execution action to obtain a new strategy, that is, the adjusted execution strategy, and apply the new strategy. Execute the subsequent execution action according to the new strategy, and the steps of monitoring the current state will be executed cyclically, that is, monitor the system state of the task processing system in real time.
[0085] For another example, if the user inputs "the blood relationship between Jia Baoyu and Lin Daiyu" to the task processing system, the task to be executed can be determined to be "determine the blood relationship between Jia Baoyu and Lin Daiyu". The execution action of the task to be executed can include obtaining the blood relationship of the characters and drawing. When the target execution action is to obtain the blood relationship of the characters, the current execution strategy can be determined according to the current system state, and when the target execution action is executed according to the current execution strategy, the Dream of Red Mansions related knowledge base tool can be called in the tool library, and then the Dream of Red Mansions related knowledge base tool is used to obtain the blood relationship between Jia Baoyu and Lin Daiyu. At the same time, the large model agent in the system can determine the system state after obtaining the blood relationship of the characters, and then determine the current execution strategy parameters according to the system state, and when there is an abnormality in the current execution strategy parameters, dynamically adjust the execution strategy of the subsequent execution action, that is, the execution strategy of drawing, and obtain the adjusted execution strategy. The drawing operation is performed according to the adjusted execution strategy until the execution of the task to be executed is completed, and the corresponding processing results are generated and fed back to the user.
[0086] Optionally, if there are drawing tools A and B in the tool library. Drawing tools A and B can be different drawing tools. For example, drawing tool A can use a large model to generate plantum1 code and then generate a mindmap diagram through the plantum1 compiler. Drawing tool B uses a diffusion model to directly generate a diagram, and the cost of drawing tool B is higher. Optionally, since both drawing tools B and C can complete the drawing task, but the cost and effect are different, and since the service model behind it may be completed through a third-party API, the price and efficiency will also change dynamically or even be unavailable. Therefore, when the subsequent execution action is drawing, it is also necessary to obtain the corresponding execution strategy according to the real-time system status. For example, there is an execution strategy A corresponding to drawing tool A, and an execution strategy B corresponding to drawing tool B. Then you can choose one of execution strategy A and execution strategy B as the execution strategy when performing subsequent execution actions.
[0087] Optionally, if the large model agent in the task processing system determines that there is no abnormality in the current execution strategy parameters, it can be executed according to the determined execution strategy corresponding to the drawing, such as selecting drawing tool B to execute drawing. If there is an abnormality in the current execution strategy parameters, it is necessary to dynamically adjust the execution strategy of the subsequent execution action, such as reselecting a new execution strategy from execution strategy A and execution strategy B, and dynamically updating and adjusting the execution strategy of the drawing according to the new execution strategy to obtain the adjusted execution strategy. For example, if the new execution strategy is drawing tool A, it can be determined that the adjusted execution strategy is drawing tool A. And drawing is performed according to drawing tool A.
[0088] In this embodiment, the target execution action of the task to be executed is determined by the preset large model agent, and the current execution strategy of the target execution action in the current state is determined. The target execution action is executed according to the current execution strategy. Since the current execution strategy includes selecting at least one task processing tool to execute the target execution action, when executing the target execution action, it is executed by selecting at least one task processing tool, such as selecting a large model for execution. And based on the system state after the target execution action is executed, the current execution strategy parameters of the target execution action are determined. When there is an abnormality in the current execution strategy parameters, the execution strategy of the subsequent execution action corresponding to the target execution action is dynamically adjusted, and then the subsequent execution action is executed according to the adjusted execution strategy until the execution of the task to be executed is completed. Since the current execution strategy parameters include at least one of the execution strategy cost and effect of the target execution action, it is possible to monitor the execution strategy cost and effect generated when the target execution action is executed during the execution of the task to be executed. When at least one of the two is abnormal, the execution strategy of the subsequent execution action will be dynamically adjusted, and then the best balance between the effect and cost during the execution of the task to be executed can be achieved, avoiding the use of static rules or manual adjustment of the execution strategy of the task, which is difficult to adapt to the diversified or dynamic requirements of task processing, resulting in waste of resources and poor effect of task processing. That is, when there is an abnormality in the execution strategy cost, the execution strategy of the subsequent execution action can be dynamically adjusted, thereby avoiding the phenomenon of waste of resources during the task processing of the task to be executed. When there is an abnormality in the execution strategy effect, the execution strategy of the subsequent execution action can be dynamically adjusted, thereby improving the effect of the task processing of the task to be executed.
[0089] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. On this basis, in step S30, the step of dynamically adjusting the execution strategy of the subsequent execution action corresponding to the target execution action includes steps b10-b30.
[0090] Step b10, determining at least one first strategy to be executed according to at least one task processing tool that can be used to execute subsequent execution actions;
[0091] In this embodiment, after the task processing system executes the target execution action according to the current execution strategy, when it is determined that the execution strategy of the subsequent execution action needs to be adjusted, at least one task processing tool that can be used to execute the subsequent execution action can be re-determined in the tool library. And at least one first strategy to be executed can be determined based on at least one task processing tool. The first strategy to be executed can be used to execute the subsequent execution action. Each first strategy to be executed is different. For example, one first strategy to be executed is to call task processing tool A to execute the subsequent execution action, and another first strategy to be executed is to call task processing tool B to execute the subsequent execution action.
[0092] For example, if the subsequent execution action is drawing, and the task processing tools that can realize the drawing function in the tool library include drawing tool A and drawing tool B, it can be determined that there are two first strategies to be executed, namely, the first strategy to be executed including drawing tool A and the first strategy to be executed including drawing tool B.
[0093] Step b20, determining a first reinforcement parameter of at least one first strategy to be executed according to a preset reinforcement learning model;
[0094] Optionally, a reinforcement learning model that is set and trained in advance, such as a deep Q network, may be determined, and then the first reinforcement parameter of each first strategy to be executed is determined based on the reinforcement learning model.
[0095] In a feasible embodiment, in step b20, the step of determining a first reinforcement parameter of at least one first strategy to be executed according to a preset reinforcement learning model includes steps b21-b22.
[0096] Step b21, for any first strategy to be executed, determining a first system state corresponding to the first strategy to be executed, wherein the first system state includes a task processing tool selected according to the first strategy to be executed, a task processing progress and resource consumption of the task to be executed;
[0097] Step b22: input the first system state into a preset reinforcement learning model, and output a first reinforcement parameter, wherein a state transition sample matching the first system state in a preset experience replay pool is determined according to the reinforcement learning model, and a reinforcement learning value corresponding to the state transition sample is calculated, and the reinforcement learning value is used as the first reinforcement parameter.
[0098] Optionally, the task processing system may calculate the first reinforcement parameter corresponding to any first strategy to be executed in the same manner, and only the determination of the first reinforcement parameter of a first strategy to be executed is used as an example for illustration.
[0099] Optionally, the reinforcement learning model can be a deep Q network or other models with reinforcement learning functions, which are not limited here. Optionally, the deep Q network can approximate the Q function through a neural network, with the input being the system state and the output being the Q value, and the output Q value is used as a reinforcement parameter. For example, when the input is the first system state, the output Q value is the first reinforcement parameter. The Q function update formula is:
[0100]
[0101] Among them, α is the learning rate, γ is the discount factor, r is the reward, a is the action, s is the state, and s / is the new state after executing action a, represents the optimal action value to be selected in the new state.
[0102] Optionally, the reinforcement learning model needs to be trained in advance to obtain a trained reinforcement learning model, and then the first system state is input into the trained reinforcement learning model to output the first reinforcement parameter. Specifically, an environment can be simulated, including all possible states s (i.e., system states, such as the first system state, the second system state, etc.), possible actions a (i.e., execution actions, such as target execution actions), rewards r, and state transition mechanisms. In this scenario, the environment is the specific scenario in which the large model agent performs tasks in the task processing system, including the task type, the currently used task processing tools, and the resource consumption status. A deep neural network can be constructed as an approximator of the Q function, whose input is the representation of the current state s, and the output is the expected reward value (i.e., Q value) Q(s, a) for each possible action a∈A. In addition, an experience replay pool D is created to store historical interaction data (s, a, r, s / ), that is, state s, action a taken, reward r obtained, and new state s / after executing the action. Optionally, state s can be the current state of the system, including the currently selected tool, the progress of task execution and resource consumption. For example, when state s is the first system state, it includes the task processing tool selected according to the first strategy to be executed, the task processing progress and resource consumption of the task to be executed. Action a can be a task processing tool or execution strategy selected in a given state. For example, when the given state is the first system state, action a includes the first strategy to be executed and the task processing tool selected according to the first strategy to be executed. Reward r can be the feedback obtained after executing a certain execution action, which is related to the cost and effect. For example, after executing the target execution action according to the current execution strategy, feedback is obtained, and the feedback includes the cost and effect generated after the target execution action is executed using the current execution strategy.
[0103] Optionally, the corresponding constructed deep neural network is trained to obtain a trained reinforcement learning model. Optionally, when performing model training, a batch of samples can be randomly selected from the experience replay pool and used for batch update. For each sampled experience (s, a, r, s / ), the target Q value y is calculated, which is usually an estimate of the maximum Q value of the next state, and the loss function is calculated based on the sampled data. Then, the model corresponding to the deep neural network is updated by back propagation and gradient descent until the model converges to obtain a trained reinforcement learning model.
[0104] Among them, the loss function of the deep Q network is:
[0105]
[0106] Among them, θ is the parameter of the current deep Q network. - is the parameter of the target deep Q network (which can be updated periodically). D is the experience replay pool, which stores past state transition samples.
[0107] Optionally, when calculating the first reinforcement parameter corresponding to each first strategy to be executed, the first system state corresponding thereto may be determined. When determining the first system state, the task processing progress of the task to be executed is determined as the subsequent execution action to be executed, the task processing tool that should be selected from the tool library if the first strategy to be executed is executed, and the corresponding resource consumption is determined.
[0108] The first system state is input into a reinforcement learning model, such as a deep Q network. The state transition samples corresponding to the first system state in the experience replay pool D are determined in the deep Q network, including historical data (such as state s, action a, reward r, etc.), and then input into the loss function of the deep Q network to calculate the corresponding Q value, i.e., the reinforcement learning value, and use it as the first reinforcement parameter.
[0109] In this embodiment, for any first strategy to be executed, the first system state corresponding to the first strategy to be executed is input into the reinforcement learning model, and the first reinforcement parameter is output, thereby ensuring the validity of the obtained first reinforcement parameter.
[0110] Step b30: dynamically adjust the execution strategy of the subsequent execution action to match the first to-be-executed strategy corresponding to the largest first enhancement parameter.
[0111] Optionally, after determining the first reinforcement parameter corresponding to each first strategy to be executed, a comparison can be made between them to determine the largest first reinforcement parameter. The execution strategy of the subsequent execution action is adjusted to be consistent with the largest first reinforcement parameter, and then it can be determined that the new execution strategy of the subsequent execution action matches the first strategy to be executed corresponding to the largest first reinforcement parameter.
[0112] In this embodiment, at least one current execution strategy is determined based on at least one task processing tool that can be used to execute subsequent execution actions, and a first reinforcement parameter of at least one current execution strategy is determined through a reinforcement learning model. The execution strategy of the subsequent execution action is dynamically adjusted to match the first strategy to be executed corresponding to the largest first reinforcement parameter, thereby ensuring that the execution strategy of the subsequent execution action is the optimal execution strategy to ensure the effect of the subsequent execution action of the task to be executed.
[0113] Based on the first embodiment or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment or the second embodiment can be referred to the above description, and will not be described in detail later. On this basis, in step S10, the current execution strategy of the target execution action in the current system state is determined, and the steps of executing the target execution action according to the current execution strategy include steps c10-c30.
[0114] Step c10, determining at least one second strategy to be executed according to at least one task processing tool that can be used to execute the target execution action;
[0115] In this embodiment, before the target execution action of the task to be executed begins to be executed, it is necessary to determine the best execution strategy and use it as the current execution strategy.
[0116] Optionally, at least one task processing tool that can execute the target execution action can be determined in the tool library of the task processing system, and at least one second strategy to be executed can be determined based on the at least one task processing tool. The second strategy to be executed can be used to execute the target execution action. Each second strategy to be executed is different, for example, one second strategy to be executed is to call task processing tool C to execute the target execution action, and another second strategy to be executed is to call task processing tool D to execute the target execution action.
[0117] For example, if the target execution action is translation, and the task processing tools in the tool library that can implement the translation function include translation tool C and translation tool D, it can be determined that there are two second strategies to be executed, namely, the second strategy to be executed including translation tool C and the second strategy to be executed including translation tool D.
[0118] Step c20, determining a second reinforcement parameter of at least one second strategy to be executed according to a preset reinforcement learning model, and selecting the second strategy to be executed corresponding to the largest second reinforcement parameter as the current execution strategy;
[0119] Optionally, the reinforcement learning model may be a deep Q network, and thus the system state corresponding to any second strategy to be executed may be input into the deep Q network, and the Q value outputted therefrom may be used as the corresponding second reinforcement parameter.
[0120] Optionally, after determining the second reinforcement parameter of each second strategy to be executed, they may be compared with each other to determine the maximum second reinforcement parameter, and the second strategy to be executed corresponding to the maximum second reinforcement parameter is used as the current execution strategy.
[0121] Step c30, under the current system state, calling the task processing tool according to the current execution strategy to execute the target execution action, wherein the current system state includes the task processing tool selected according to the current execution strategy, the task processing progress and resource consumption of the task to be executed.
[0122] Optionally, the system state corresponding to the current execution strategy can be determined and updated to the current system state. In the current system state, the corresponding task processing tool is called in the tool library according to the current execution strategy to perform the target execution action. For example, if the target execution action is to determine the relationship between characters, the current execution strategy is to use task processing tool E to determine the relationship between characters. Task processing tool E, task processing tool F, and task processing tool H are stored in the tool library. Then, task processing tool E can be called in the tool library to perform the target execution action of the task to be executed, that is, to determine the relationship between characters.
[0123] In this embodiment, at least one second strategy to be executed is determined based on at least one task processing tool that can be used to execute the target execution action, and a second reinforcement parameter of at least one second strategy to be executed is determined based on a reinforcement learning model, and the second strategy to be executed corresponding to the largest second reinforcement parameter is selected as the current execution strategy. In the current system state, the task processing tool is called to execute the target execution action according to the current execution strategy, thereby ensuring the effective execution of the target execution action.
[0124] Based on any one of the first to third embodiments of the present application, in the fourth embodiment of the present application, the same or similar content as any one of the first to third embodiments can refer to the above introduction, and will not be repeated later. On this basis, in step S20, based on the system state after the target execution action is executed, the step of determining the current execution strategy cost of the target execution action includes steps d10-d20.
[0125] Step d10, based on the system state after the target execution action is executed, determining the computing resource cost, time cost and energy consumption cost generated when executing the target execution action according to the current execution strategy;
[0126] Optionally, the resource cost may be the usage and usage time of the CPU or GPU. The time cost may be the time required to complete the task. The energy cost may be the power consumed in executing the task.
[0127] Optionally, after executing the target execution action according to the current execution strategy, the corresponding system state will be updated, for example, the task processing progress is changed from the target execution action to be executed to the subsequent execution action to be executed.
[0128] Optionally, after the target executes the action, the system status obtained in real time can be used to determine whether the cost generated has changed significantly, so as to determine whether the execution strategy of the subsequent execution action needs to be dynamically adjusted.
[0129] Optionally, after determining the system state after the target execution action is executed, the CPU and GPU usage and usage time when the task processing system executes the target execution action according to the current execution strategy can be determined based on the resource consumption contained in the system state, and used as the resource cost. The time consumed in executing the target execution action can be determined, and used as the time cost. The power consumed in executing the target execution action can be determined, and used as the energy cost.
[0130] Step d20, performing weighted sum processing on resource cost, time cost and energy consumption cost to obtain the current execution strategy cost.
[0131] Optionally, the resource cost value of the resource cost, the time cost value of the time cost, and the energy cost value of the energy cost are summarized and calculated to obtain a total cost value, and the total cost value is used as the cost value corresponding to the current execution strategy cost. The total cost value can be calculated using the following (Formula 3), namely:
[0132]
[0133] Where C is the total cost. n is a natural number greater than 1, such as 3. i is the weight of the i-th cost, reflecting its importance. i is the i-th cost value, such as resource cost value, time cost value and energy consumption cost value.
[0134] For example, Figure 5As shown, the total cost calculation formula can be determined, that is, the above formula three. The calculated total cost may include multiple cost components, which may include resource cost, time cost and energy consumption cost, such as CPU usage, GPU usage, execution time and energy consumption.
[0135] In this embodiment, the computing resource cost, time cost and energy consumption are determined based on the system state after the target execution action is executed, and then weighted summation is performed to obtain the execution strategy cost of the target execution action, thereby ensuring the effectiveness of the determined execution strategy cost.
[0136] Furthermore, the present application provides a task processing system, the task processing system comprising:
[0137] A task execution module, used to determine the target execution action of the task to be executed according to the preset large model agent, and determine the current execution strategy of the target execution action under the current system state, and execute the target execution action according to the current execution strategy, wherein the current execution strategy includes selecting at least one task processing tool to execute the target execution action;
[0138] a cost evaluation module, configured to determine a current execution strategy parameter of the target execution action based on a system state after the target execution action is executed, wherein the current execution strategy parameter includes at least one of an execution strategy cost and an execution strategy effect of the target execution action;
[0139] A strategy optimization module, used to dynamically adjust the execution strategy of the subsequent execution action corresponding to the target execution action when there is an abnormality in the current execution strategy parameters;
[0140] The optimization strategy execution module is used to execute the subsequent execution actions according to the adjusted execution strategy until the execution of the task to be executed is completed.
[0141] The task processing system provided by the present application can avoid resource waste during task processing and improve the task processing effect. Compared with the prior art, the beneficial effects of the task processing system provided by the present application are the same as the beneficial effects of the task processing method provided by the above embodiment, which will not be repeated here.
[0142] The present application provides a task processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the task processing method in the above-mentioned embodiment one.
[0143] Reference below Figure 6, which shows a schematic diagram of the structure of a task processing device suitable for implementing an embodiment of the present application. The task processing device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The task processing device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0144] like Figure 6 As shown, the task processing device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for device operation are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the task processing device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a task processing device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0145] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0146] The task processing device provided by the present application adopts the task processing method in the above embodiment, which can avoid the waste of resources during task processing and improve the task processing effect. Compared with the prior art, the beneficial effects of the task processing device provided by the present application are the same as the beneficial effects of the task processing method provided by the above embodiment, and the other technical features in the task processing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0147] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0148] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0149] The present application provides a medium, which is a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the task processing method in the above-mentioned embodiment.
[0150] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0151] The computer-readable storage medium may be included in the task processing device; or may exist independently without being installed in the task processing device.
[0152] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the task processing device, the task processing device can execute the step flow of the task processing method.
[0153] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0154] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0155] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0156] The medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned task processing method, which can avoid waste of resources during task processing and improve the task processing effect. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the task processing method provided in the above-mentioned embodiment, and will not be repeated here.
[0157] The present application also provides a computer program product, including a computer program, which implements the steps of the task processing method as described above when the computer program is executed by a processor.
[0158] The computer program product provided by the present application can avoid resource waste during task processing and improve the task processing effect. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the task processing method provided by the above embodiment, which will not be repeated here.
[0159] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A task processing method, characterized in that: The method includes: Determine the target execution action of the task to be executed according to the preset large model agent, and determine the current execution strategy of the target execution action under the current system state, and execute the target execution action according to the current execution strategy, wherein the current execution strategy includes selecting at least one task processing tool to execute the target execution action; Determine, based on the system state after the target execution action is executed, a current execution strategy parameter of the target execution action, wherein the current execution strategy parameter includes at least one of an execution strategy cost and an execution strategy effect of the target execution action; When there is an abnormality in the current execution strategy parameters, dynamically adjust the execution strategy of the subsequent execution action corresponding to the target execution action; The subsequent execution actions are executed according to the adjusted execution strategy until the to-be-executed tasks are completed.
2. The method according to claim 1, characterized in that The step of dynamically adjusting the execution strategy of the subsequent execution action corresponding to the target execution action includes: Determining at least one first strategy to be executed based on at least one task processing tool that can be used to execute the subsequent execution action; Determining a first reinforcement parameter of the at least one first strategy to be executed according to a preset reinforcement learning model; The execution strategy of the subsequent execution action is dynamically adjusted to match the first to-be-executed strategy corresponding to the largest first reinforcement parameter.
3. The method according to claim 2, characterized in that The step of determining the first reinforcement parameter of the at least one first strategy to be executed according to the preset reinforcement learning model includes: For any first strategy to be executed, determining a first system state corresponding to the first strategy to be executed, wherein the first system state includes a task processing tool selected according to the first strategy to be executed, a task processing progress and resource consumption of the task to be executed; The first system state is input into a preset reinforcement learning model, and a first reinforcement parameter is output, wherein a state transition sample matching the first system state in a preset experience replay pool is determined according to the reinforcement learning model, a reinforcement learning value corresponding to the state transition sample is calculated, and the reinforcement learning value is used as the first reinforcement parameter.
4. The method according to claim 1, characterized in that The step of determining the current execution strategy of the target execution action under the current system state and executing the target execution action according to the current execution strategy comprises: Determining at least one second strategy to be executed based on at least one task processing tool that can be used to execute the target execution action; Determine a second reinforcement parameter of the at least one second strategy to be executed according to a preset reinforcement learning model, and select the second strategy to be executed corresponding to the largest second reinforcement parameter as the current execution strategy; Under the current system state, the task processing tool is called according to the current execution strategy to execute the target execution action, wherein the current system state includes the task processing tool selected according to the current execution strategy, the task processing progress and resource consumption of the task to be executed.
5. The method according to claim 1, characterized in that The step of determining the current execution strategy parameters of the target execution action based on the system state after the target execution action is executed includes: Based on the system state after the target execution action is executed, determining the computing resource cost, time cost and energy consumption cost generated when the target execution action is executed according to the current execution strategy; The resource cost, the time cost and the energy consumption cost are weighted and summed to obtain the execution strategy cost of the target execution action.
6. The method according to any one of claims 1 to 5, characterized in that: After the step of determining the current execution strategy parameters of the target execution action, at least one of the following is included: If the execution strategy cost of the target execution action is greater than the preset cost, it is determined that the current execution strategy parameters are abnormal; If the execution strategy effect of the target execution action does not match the expected effect, it is determined that there is an abnormality in the current execution strategy parameters.
7. A task processing system, characterized in that: The task processing system comprises: A task execution module, used to determine the target execution action of the task to be executed according to the preset large model agent, and determine the current execution strategy of the target execution action under the current system state, and execute the target execution action according to the current execution strategy, wherein the current execution strategy includes selecting at least one task processing tool to execute the target execution action; a cost evaluation module, configured to determine a current execution strategy parameter of the target execution action based on a system state after the target execution action is executed, wherein the current execution strategy parameter includes at least one of an execution strategy cost and an execution strategy effect of the target execution action; A strategy optimization module, used to dynamically adjust the execution strategy of the subsequent execution action corresponding to the target execution action when there is an abnormality in the current execution strategy parameters; The optimization strategy execution module is used to execute the subsequent execution actions according to the adjusted execution strategy until the execution of the task to be executed is completed.
8. A task processing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the task processing method according to any one of claims 1 to 6.
9. A medium, characterized in that The medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the task processing method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the task processing method according to any one of claims 1 to 6 are implemented.