Task execution method and device, electronic equipment, storage medium and program product

By generating the execution code of batch tasks and using the code interpreter to execute, the problem of distraction in the large model during multi-sub-task processing is solved, the execution accuracy and stability of batch tasks is improved, and the batch tasks are enriched. Execution method.

CN119271378APending Publication Date: 2025-01-07BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411472467.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

In the prior art, when using a large model to process batch tasks, attention is distracted when the number of sub-tasks is large, resulting in poor accuracy and stability of processing results, and the execution results of batch tasks cannot be effectively improved.

Method used

By generating the execution code of batch tasks and executing the code with the code interpreter, avoiding direct execution of batch tasks, enriching the execution methods of batch tasks, and improving the accuracy and stability of task execution results.

Benefits of technology

It realizes the accuracy and stability of task execution results in batch tasks, avoids the problem of distraction in large models when processing multi-sub-tasks, and enhances the processing reliability of batch tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271378A_ABST
    Figure CN119271378A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task execution method and device, electronic equipment, a storage medium and a program product. The method comprises the steps of receiving task information of a to-be-executed task; in response to the fact that the to-be-executed task is a batch processing task, generating a task execution code of the to-be-executed task according to the task information, and calling a code interpreter to run the task execution code to execute the to-be-executed task; and obtaining a task execution result of the to-be-executed task. By means of the technical scheme, the execution modes of the batch processing tasks can be enriched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular, to a task execution method, device, electronic device, storage medium, and program product. Background Art

[0002] Batch processing technology is a way of computer processing tasks. It can combine a series of tasks together for execution, thereby improving work efficiency and automation.

[0003] However, in the prior art, the execution method of batch processing tasks is relatively simple. Summary of the invention

[0004] The embodiments of the present disclosure provide a task execution method, device, electronic device, storage medium and program product to enrich the execution mode of batch processing tasks.

[0005] In a first aspect, an embodiment of the present disclosure provides a task execution method, including:

[0006] Receive task information of tasks to be executed;

[0007] In response to the task to be executed being a batch processing task, generating a task execution code for the task to be executed according to the task information, and calling a code interpreter to run the task execution code to execute the task to be executed;

[0008] Obtain the task execution result of the task to be executed.

[0009] In a second aspect, the present disclosure also provides a task execution device, including:

[0010] An information receiving module, used for receiving task information of tasks to be executed;

[0011] A code generation module, for generating a task execution code for the task to be executed according to the task information in response to the task to be executed being a batch task, and calling a code interpreter to run the task execution code to execute the task to be executed;

[0012] The result acquisition module is used to obtain the task execution result of the task to be executed.

[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, including:

[0014] one or more processors;

[0015] a memory for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the task execution method as described in the embodiment of the present disclosure.

[0017] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the task execution method as described in the embodiment of the present disclosure is implemented.

[0018] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product. When the computer program product is executed by a computer, the computer implements the task execution method as described in the embodiment of the present disclosure.

[0019] The task execution method, device, electronic device, storage medium and program product provided by the embodiments of the present disclosure receive the task information of the task to be executed; in response to the situation that the task to be executed is a batch task, generate the task execution code of the task to be executed according to the task information of the task to be executed, call the code interpreter to run the generated task execution code to execute the task to be executed; and obtain the task execution result of the task to be executed. This embodiment uses the above technical solution to generate the task execution code of the batch task, and executes the batch task based on the generated task execution code through the code interpreter without directly executing the batch task. Compared with the technical solution of directly using a large model to execute the batch task in the related art, it can enrich the execution method of the batch task and improve the accuracy of the task execution result of the batch task. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0021] Figure 1 A flowchart of a task execution method provided by an embodiment of the present disclosure;

[0022] Figure 2 A flowchart of another task execution method provided by an embodiment of the present disclosure;

[0023] Figure 3 A schematic diagram of the execution process of a batch processing task provided by an embodiment of the present disclosure;

[0024] Figure 4 A structural block diagram of a task execution device provided in an embodiment of the present disclosure;

[0025] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0032] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0033] Figure 1A flowchart of a task execution method provided in an embodiment of the present disclosure. The method can be executed by a task execution device, wherein the device can be implemented by software and / or hardware and can be configured in an electronic device, typically, in a computer, a mobile phone or a tablet computer. The task execution method provided in an embodiment of the present disclosure is applicable to scenarios of executing tasks, such as scenarios of executing batch tasks.

[0034] In the embodiments of the present disclosure, a large model, also called an artificial intelligence (AI) large model, refers to a "large parameter" model trained using large-scale data and powerful computing power. These models are usually highly versatile and generalizable, and can be applied to multiple fields such as natural language processing, image recognition, or speech recognition.

[0035] Large models generally have the following characteristics:

[0036] Huge scale: Containing billions or even hundreds of billions of parameters, the model size can reach hundreds of GB or even larger, giving it powerful expressive and learning capabilities.

[0037] Emergent capabilities: When the model’s training data reaches a certain scale, it will suddenly have unexpected and complex capabilities and features that were not available in the previous small model and can comprehensively analyze and solve deeper problems, demonstrating human-like thinking and intelligence.

[0038] Better performance and generalization: They usually have stronger learning capabilities and can perform well on a variety of tasks, such as natural language processing, image recognition, speech recognition, etc.

[0039] Multi-task learning: Multiple different tasks such as machine translation, text summarization, and / or question-answering systems can be learned together to learn broader and more generalized language understanding capabilities.

[0040] Big data training: Generally, massive amounts of data are required for training, which may be data sets of more than TB or even PB level.

[0041] Large computing resource requirements: Training large models usually requires a large number of graphics processing units (GPUs) and a long time.

[0042] Big model agent technology is an intelligent agent technology developed based on big models. It can autonomously perceive the environment, make decisions and execute tasks, and has the ability to learn and adapt. It is widely used in fields such as smart assistants and automated processes to improve efficiency and intelligence.

[0043] Batch processing technology is a way of processing tasks. It can combine a series of operations or tasks together and process them at one time, thereby improving work efficiency and automation.

[0044] The main features of batch processing technology can generally include:

[0045] Batch execution: Multiple identical or similar tasks can be processed simultaneously or sequentially without the need for the user to trigger execution one by one. For example, in file processing, a large number of files can be renamed, copied, or moved at once.

[0046] Automation: Reduce manual intervention and automatically perform tasks according to predetermined rules and processes. For example, in system maintenance, regular disk cleanup and backup tasks can be automatically performed.

[0047] Efficiency: Save time and resources by avoiding repeated operations and settings. For example, in data processing, a large amount of data can be processed at one time without the user having to trigger the processing one by one.

[0048] Batch processing technology is widely used in many fields. For example, operating system batch files and operating interface (shell) scripts in Linux are common batch processing tools; batch processing orders and report generation in enterprise-level applications; and batch processing technology may also be used in software development, such as compiling codes and deploying applications.

[0049] In general, batch processing technology brings higher efficiency and convenience to the management and operation of computer systems by integrating and automating multiple tasks.

[0050] However, during the implementation of the embodiments of the present disclosure, it was found that using a large model to process batch tasks is very difficult and unstable. For example, when a batch task contains a large number (such as more than 10) of identical or similar subtasks, the large model will become distracted when processing the subtasks in the batch task, resulting in poor reliability and stability of the large model in processing the batch tasks, and the accuracy of the processing results of the batch tasks is far from expected.

[0051] Therefore, the embodiment of the present disclosure provides a task execution method. When a batch processing task needs to be executed, an execution code of the batch processing task is generated, and the batch processing task is executed based on the execution code, so as to enrich the processing method of the batch processing task and improve the reliability and stability of the batch processing task execution results.

[0052] like Figure 1 As shown, the task execution method provided in this embodiment may include:

[0053] S101, receiving task information of a task to be executed.

[0054] Among them, the task to be executed can be understood as the task to be executed currently. The task type of the task to be executed is not limited. Exemplarily, the task to be executed can be a batch task or a non-batch task. Batch tasks can be understood as tasks that can be processed in batches, such as tasks that combine a series of subtasks together for execution. The subtasks in a batch task can be combined and executed based on batch processing technology. Batch processing technology is a technology that uses batch processing to perform operations, which supports the automatic processing of a batch of jobs under the control of a management program without human intervention. Exemplarily, this batch of jobs combined based on batch processing technology can take the form of subtasks in a batch task to form a batch task. Non-batch tasks can be understood as tasks other than batch tasks, such as other types of tasks other than batch tasks.

[0055] The task information of the task to be performed can be understood as information used to describe the task situation of the task to be performed, such as task content description information of the task to be performed. The task content description information can be information used to describe the task content of the task to be performed.

[0056] In this embodiment, task information of the task to be executed can be received, for example, task information input by the user is received as task information of the task to be executed this time, or task information sent by other electronic devices other than the current electronic device is received as task information of the task to be executed this time.

[0057] It can be understood that the task execution method provided by the embodiment of the present disclosure can be executed by the current electronic device, which can be an electronic device installed with a current application for executing the task execution method provided by the embodiment of the present disclosure; it can also be a server.

[0058] S102: In response to the task to be executed being a batch processing task, generating a task execution code for the task to be executed according to the task information, and calling a code interpreter to run the task execution code to execute the task to be executed.

[0059] The task execution code may be a code for executing the task to be executed. Optionally, the task execution code may be a program code for executing the task to be executed. For example, when the task execution code is executed, the task to be executed may be executed. The code interpreter may be used to run the code (such as the task execution code of the task to be executed). Specifically, the code interpreter may be used to interpret the task execution code of the task to be executed line by line into instructions executable by the current electronic device. Thus, the current electronic device completes the execution of the task to be executed by executing the executable instructions interpreted by the code interpreter. The code interpreter may provide a set of code running sandboxes to execute programming languages ​​that conform to the primitive design. Different programming languages ​​may be used for specific implementations as needed.

[0060] Specifically, when the task to be executed currently is a batch processing task, the task content of the task to be executed can be determined based on the task information to be executed, the task execution code of the task to be executed can be generated based on the task content, and the code executor can be called to run the task execution code to execute the task to be processed through batch processing technology.

[0061] In this embodiment, when the pending task is a batch task, the batch task may include multiple subtasks, such as multiple subtasks with the same or similar execution modes. When executing the pending task, the subtasks in the pending task may be executed sequentially or simultaneously, which may be flexibly set as needed.

[0062] Exemplarily, different subtasks in the task to be executed may have the same or different task execution environments. Thus, when the code interpreter executes a subtask in the task to be processed by running the task execution code of the task to be executed, the task execution environment of this subtask can be determined, and the determined subtask execution environment can be called, and the subtask execution result of this subtask can be returned by executing this task execution environment called. At this time, optionally, in the case that the task to be executed is a batch task, the task to be executed contains multiple subtasks, and the subtasks are executed by the code interpreter calling the task execution environment of the subtask based on the task execution code. Among them, the task execution environment of a subtask in the task to be executed can be understood as the environment for executing this subtask, such as the application programming interface (Application Programming Interface, API), system tools and / or processing tools required to execute this subtask.

[0063] The code content of the task execution code is not limited.

[0064] In some embodiments, the task execution code of the task to be executed may include a batch source code, and the batch source code may directly call the task execution environment of the subtask to execute the corresponding subtask. The batch source code may be understood as the main code for executing the task to be executed, which may be used to control the execution of the task to be executed.

[0065] In some embodiments, the task execution code of the task to be executed may include a subtask processing function (such as a single task processing function), and this subtask processing function can be used to call the task execution environment of the subtask to execute the corresponding subtask. In other words, the task execution environment of the subtask in the task to be executed can be called by this subtask processing function. At this time, optionally, the task execution code includes a subtask processing function, and the task execution environment of the subtask is called by the subtask processing function. Among them, the subtask processing function can be a function for processing the subtask in the task to be executed, and the subtask processing function can execute the corresponding subtask of the task to be executed by calling the task execution environment of the subtask in the task to be executed.

[0066] In the above implementation, the subtask processing function may be directly called by the code interpreter. For example, the code interpreter may call the task execution environment of each subtask in the task to be executed by running the subtask processing function in the task execution code to execute the corresponding subtask.

[0067] In the above implementation, the subtask processing function can also be called by the code interpreter through the batch source code of the task to be executed. The task execution code of the task to be executed can further include the batch source code of the task to be executed, and this batch source code can process each subtask in the task to be executed by calling the subtask processing function of the task to be executed when the code interpreter is running.

[0068] In some examples, the batch processing source code of the task to be executed may determine a subtask in the task to be executed, and call a task execution environment of the subtask in the task to be executed through a subprocessing function of the task to be executed to execute the subtask.

[0069] In some examples, the task execution code of the task to be executed may include a subtask determination function for determining the subtasks of the task to be executed, and the batch source code of the task to be executed may determine the subtasks of the task to be executed by calling this subtask determination function, and call the task execution environment of the subtask in the task to be executed through the sub-processing function of the task to be executed to execute the subtask. At this time, optionally, the task execution code also includes a batch source code and a subtask determination function, wherein the batch source code determines the multiple subtasks included in the task to be executed by calling the subtask determination function, and processes the subtasks by calling the subtask processing function. Among them, the subtask determination function can be a function for determining the subtasks in the task to be executed, such as the subtask determination function can be used to determine the to-be-processed objects corresponding to each subtask in the task to be executed.

[0070] As an optional example, the task execution code of the task to be executed may include a single task processing function (i.e., a subtask processing function), a batch item acquisition function (i.e., a subtask determination function), and / or a batch processing basic code (i.e., a batch processing source code). Among them, the single task processing function can be used to execute a single task item (i.e., a subtask) in a batch processing task; this batch item acquisition function can be used to obtain the single task items contained in the batch processing task; the batch processing basic code can execute the batch processing task by calling the above-mentioned single task processing function and each batch item acquisition function. In addition, the task execution code may also include a progress display function, and this progress display function can be used to display the current processing progress of the batch processing task.

[0071] Exemplarily, taking the execution of the subtasks contained in the batch task (such as the task to be executed) in sequence as an example, the process of executing the batch task based on the task execution code can be described as follows: the batch basic code calls the batch entry acquisition function to obtain the subtask list of the batch task to be executed this time; obtains the first subtask in the subtask list as the current subtask, calls the single task processing function to process the current subtask, and after the current subtask is processed, obtains the processing result of the current subtask (i.e., the execution result); after the current subtask is processed, calls the progress display function to update the current processing progress of this batch task, such as displaying the number of the current subtask in the subtask list, the task identifier of the current subtask and / or the processing result of the current subtask, etc., for the user to view; and obtains the next subtask of the current subtask in the subtask list as the current subtask, returns to execute the operation of calling the single task processing function to process the current subtask, until the next subtask does not exist in the subtask list. When it is determined that there is no next subtask, it can be determined that the execution of this batch task is completed.

[0072] In some embodiments, when the task to be executed is not a batch task, the task execution code of the task to be executed may not be generated, but the task to be executed may be directly executed. For example, the task execution environment of the task to be executed may be determined based on the task information of the task to be executed, and the task execution environment of the task to be executed may be called, and the task to be executed is executed through the called task execution environment and the task execution result of the task to be executed is returned. At this time, optionally, the task execution method may also include: in response to the task to be executed not being a batch task, determining the task execution environment of the task to be executed based on the task information, and calling the task execution environment of the task to be executed to execute the task to be executed.

[0073] The task execution environment of the task to be executed can be understood as the environment for executing the task to be executed, such as the application programming interface, system tools and / or processing tools required to be called when executing the task to be executed.

[0074] S103: Obtain the task execution result of the task to be executed.

[0075] After the pending task is completed, the task execution result of the pending task can be obtained. For example, when the pending task is a batch task, the subtask execution result of each subtask can be obtained from the task running environment or code interpreter of each subtask, and the task execution result of the pending task can be generated based on the execution result of each subtask; when the pending task is not a batch task, the task execution result of the pending task generated after the pending task is executed can be obtained.

[0076] The task execution method provided in this embodiment receives the task information of the task to be executed; in response to the situation that the task to be executed is a batch task, generates the task execution code of the task to be executed according to the task information of the task to be executed, calls the code interpreter to run the generated task execution code to execute the task to be executed; and obtains the task execution result of the task to be executed. This embodiment uses the above technical solution to generate the task execution code of the batch task, and executes the batch task based on the generated task execution code through the code interpreter without directly executing the batch task. Compared with the technical solution of directly using a large model to execute the batch task in the related art, it can enrich the execution method of the batch task and improve the accuracy of the task execution result of the batch task.

[0077] Figure 2A flow chart of another task execution method provided for an embodiment of the present disclosure. The scheme in this embodiment can be combined with one or more optional schemes in the above embodiments. Optionally, after receiving the task information of the task to be executed, it also includes: inputting the task information into a pre-trained target model; in response to the task to be executed being a batch task, generating the task execution code of the task to be executed according to the task information, and calling the code interpreter to run the task execution code to execute the task to be executed, including: in response to the task to be executed being a batch task, using the target model to generate the task execution code of the task to be executed according to the task information, and calling the code interpreter to run the task execution code to execute the task to be executed; obtaining the task execution result of the task to be executed includes: obtaining the task execution result output by the target model as the task execution result of the task to be executed.

[0078] Correspondingly, such as Figure 2 As shown, the task execution method provided in this embodiment may include:

[0079] S201, receiving task information of a task to be executed.

[0080] S202: Input the task information into a pre-trained target model.

[0081] Among them, the target model can be a model for generating task execution codes for batch tasks. The type of the target model is not limited. For example, the target model can be a large model. Optionally, the target model is an AI large model to further enrich the functions of the target model. It should be noted that the AI ​​large model can be used not only to generate task execution codes for batch tasks, such as the AI ​​large model can also have a series of functions such as executing non-batch tasks, performing natural language processing, image recognition, speech recognition, machine translation, text summarization, knowledge question answering, etc., which are not limited in comparison in this embodiment.

[0082] Exemplarily, after obtaining the task information of the task to be executed, the current application may input the task information into a pre-trained target model to execute the task to be executed through the target model.

[0083] S203: In response to the task to be executed being a batch task, using the target model to generate a task execution code for the task to be executed according to the task information, and calling a code interpreter to run the task execution code to execute the task to be executed.

[0084] Specifically, when the task to be executed is a batch task, the target model can generate the task execution code of the task to be executed according to the input task information of the task to be executed, and call the code interpreter to run the task execution code, such as sending the generated task execution code to the code interpreter. Correspondingly, after receiving the call of the target model, the code interpreter can obtain the task execution code generated by the target model, run the task execution code, call the task execution environment of each subtask in the task to be executed to execute the corresponding subtask, and obtain the subtask execution result of the corresponding subtask generated by the task execution environment of each subtask.

[0085] Figure 3 An execution diagram of an execution process of a batch processing task provided by an embodiment of the present disclosure, such as Figure 3 As shown, the code interpreter can also determine the execution progress of the task to be executed based on the execution progress of the subtask currently being executed, such as after obtaining the subtask execution result of the corresponding subtask generated by the task execution environment of one or more subtasks that have been completed, based on the current subtask being executed and / or the subtask that has been completed, and display this execution progress for the user to view.

[0086] In addition, for the case where the current task to be executed is not a batch task, after receiving the input task information of the current task to be executed, the target model can determine the task execution environment of the task to be executed based on this task information, call the task execution environment of the task to be executed to execute the task to be executed, and obtain the task execution result of the task to be executed generated by the task execution environment of the task to be executed.

[0087] In this embodiment, the determination party of whether the task to be executed is a batch processing task is not limited. For example, the current application can determine whether the task to be executed is a batch processing task, generate a determination result, and input the task information of the task to be executed and the determination result into the target model. The target model can also determine whether the task to be executed is a target task. For example, after the current application obtains the task information of the task to be executed, it can input the task information into the target model; accordingly, the target model can parse the input task information of the task to be executed, determine whether the task to be executed is a task that indicates batch processing of multiple objects to be processed, generate a parsing result, and determine whether the task to be executed is a batch processing task based on the parsing result. For example, in the case where the parsing determines that the task to be executed indicates batch processing of multiple objects to be processed, it can be determined that the task to be executed is a batch processing task. In the case where the parsing determines that the task to be executed does not indicate batch processing of multiple objects to be processed, it can be determined that the task to be executed is not a batch processing task, and when it is determined that the task to be executed is a batch processing task, and when it is determined that the task to be executed is not a batch processing task, different execution methods are used to execute the task to be executed. At this time, optionally, in response to the task to be executed being a batch processing task, before using the target model to generate the task execution code of the task to be executed according to the task information, it also includes: using the target model to parse the task information, determine whether the task to be executed indicates batch processing of multiple objects to be processed, generate a parsing result, and determine whether the task to be executed is a batch processing task based on the parsing result. Among them, the object to be processed can be understood as the object that needs to be processed by the task to be executed.

[0088] In an optional example, the target model can be presented in the form of an intelligent assistant, a conversational robot, or a virtual contact using AI. The process of the target model executing the pending task can be described as: accepting the task information of the pending task input by the user; parsing the task information of the pending task, determining whether the pending task indicates batch processing of multiple pending objects, generating a parsing result, and judging whether the pending task is a batch task based on the parsing result. If the pending task is a batch task, a code (i.e., task execution code) that conforms to the batch primitive design is generated, the code interpreter is called to execute the code, and the single task execution environment (i.e., the execution environment of the subtask) is called back during the code interpreter's execution of the code to execute a single task (i.e., subtask) in the batch task. If the pending task is not a batch task, the task execution environment of the pending task is called to execute the pending task.

[0089] S204: Obtain the task execution result output by the target model as the task execution result of the task to be executed.

[0090] In this embodiment, the target model can execute the task to be executed and output the task execution result of the task to be executed. Accordingly, the current application can obtain the task execution result output by the target model as the task execution result of the task to be executed.

[0091] In some embodiments, since the original model (such as the original large model) is not used alone for code generation, it cannot generate task execution codes for batch tasks in a targeted manner. In other words, the original model cannot generate task execution codes for batch tasks, or the task execution codes for batch tasks generated by the original large model are less practical, resulting in large errors in the task execution results of batch tasks. Therefore, fine-tuning techniques (such as large model fine-tuning techniques) can be used to fine-tune the ability of the original model to generate task execution codes for batch tasks, so as to obtain a target model that can stably generate task execution codes for batch tasks, and further improve the accuracy and practicality of the generated task execution codes for batch tasks.

[0092] At this time, optionally, before receiving the task information of the task to be executed, it also includes: obtaining the pre-trained original model and a fine-tuning sample set, the fine-tuning sample set containing multiple batch task samples and a task execution code sample corresponding to each batch task sample; based on the fine-tuning sample set, the original model is fine-tuned for code generation capability to obtain a target model, wherein the target model has the ability to generate task execution code for batch tasks.

[0093] Among them, the original model can be understood as the model before fine-tuning the code generation capability, which can be a large model, such as an AI large model.

[0094] Specifically, a fine-tuning sample set including multiple batch task samples and task execution code samples corresponding to each batch task sample can be obtained. Based on the model fine-tuning technology, this fine-tuning sample set is used to fine-tune the original model's ability to generate task execution code for batch tasks, and a model with the ability to stably generate task execution code for batch tasks is obtained as the target model, so as to facilitate the subsequent use of this target model to execute batch tasks.

[0095] The task execution method provided in this embodiment supports the execution of batch tasks and non-batch tasks by using different execution modes through the model. In particular, for batch tasks, the execution of batch tasks is almost not limited by the number of subtasks. However, in the related art, when the batch task has many subtasks (such as more than 10), the model can hardly execute the batch task stably. Therefore, compared with the related art, not only can the task execution mode be enriched, but also the stability of batch task execution can be improved, thereby improving the accuracy of batch task execution results.

[0096] Figure 4 This is a structural block diagram of a task execution device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware, and can be configured in an electronic device, typically a computer, a mobile phone or a tablet computer, and can be applied to a task execution scenario, such as a batch task execution scenario, by executing a task execution method. Figure 4 As shown, the task execution device provided in this embodiment may include: an information receiving module 401, a code generating module 402 and a result obtaining module 403, wherein:

[0097] The information receiving module 401 is used to receive task information of the task to be executed;

[0098] A code generation module 402 is used for generating a task execution code for the task to be executed according to the task information in response to the task to be executed being a batch processing task, and calling a code interpreter to run the task execution code to execute the task to be executed;

[0099] The result acquisition module 403 is used to acquire the task execution result of the task to be executed.

[0100] The task execution device provided in this embodiment receives the task information of the task to be executed through the information receiving module; generates the task execution code of the task to be executed according to the task information of the task to be executed in response to the situation that the task to be executed is a batch task through the code generation module, calls the code interpreter to run the generated task execution code to execute the task to be executed; and obtains the task execution result of the task to be executed through the result acquisition module. This embodiment uses the above technical solution to generate the task execution code of the batch task, and executes the batch task based on the generated task execution code through the code interpreter without directly executing the batch task. Compared with the technical solution of directly using a large model to execute the batch task in the related art, it can enrich the execution method of the batch task and improve the accuracy of the task execution result of the batch task.

[0101] Optionally, the task execution device may also include: an information input module, used to input the task information of the task to be executed into a pre-trained target model after receiving the task information of the task to be executed; the code generation module 402 can be specifically used to: in response to the task to be executed being a batch task, use the target model to generate the task execution code of the task to be executed according to the task information, and call the code interpreter to run the task execution code to execute the task to be executed; the result acquisition module 403 can be specifically used to: obtain the task execution result output by the target model as the task execution result of the task to be executed.

[0102] Furthermore, the task execution device may also include: a sample set acquisition module, used to obtain a pre-trained original model and a fine-tuning sample set before receiving the task information of the task to be executed, the fine-tuning sample set containing multiple batch task samples and a task execution code sample corresponding to each batch task sample; a model fine-tuning module, used to perform code generation capability fine-tuning training on the original model based on the fine-tuning sample set to obtain a target model, wherein the target model has the ability to generate task execution code for batch tasks.

[0103] Optionally, the target model is an artificial intelligence large model.

[0104] Furthermore, the task execution device may also include: an information parsing module, which is used to parse the task information using the target model before using the target model to generate the task execution code of the task to be executed according to the task information in response to the task to be executed being a batch processing task, determine whether the task to be executed indicates batch processing of multiple objects to be processed, generate a parsing result, and determine whether the task to be executed is a batch processing task based on the parsing result.

[0105] Furthermore, the task execution device may also include: a task execution module, which is used to determine the task execution environment of the task to be executed according to the task information in response to the task to be executed not being a batch task, and call the task execution environment of the task to be executed to execute the task to be executed.

[0106] Optionally, the task execution code is a program code used to execute the task to be executed; and / or, when the task to be executed is a batch task, the task to be executed includes multiple subtasks, and the subtasks are executed by the code interpreter calling the task execution environment of the subtask based on the task execution code.

[0107] Optionally, the task execution code includes a subtask processing function, and the task execution environment of the subtask is called by the subtask processing function.

[0108] Optionally, the task execution code also includes a batch source code and a subtask determination function, wherein the batch source code determines multiple subtasks included in the task to be executed by calling the subtask determination function, and processes the subtasks by calling the subtask processing function.

[0109] The task execution device provided in the embodiment of the present disclosure can execute the task execution method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the task execution method. For technical details not described in detail in this embodiment, please refer to the task execution method provided in any embodiment of the present disclosure.

[0110] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device (e.g., terminal device) 500 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic 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 disclosure.

[0111] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0112] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0113] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains 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 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0114] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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 the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0115] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0116] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0117] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives task information of the task to be executed; in response to the task to be executed being a batch task, generates a task execution code for the task to be executed according to the task information, and calls a code interpreter to run the task execution code to execute the task to be executed; and obtains the task execution result of the task to be executed.

[0118] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, 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 cases involving 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., through the Internet using an Internet service provider).

[0119] 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 disclosure. 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 implementations as replacements, 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.

[0120] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, constitute a limitation on the unit itself.

[0121] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0122] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.

[0123] According to one or more embodiments of the present disclosure, Example 1 provides a task execution method, including:

[0124] Receive task information of tasks to be executed;

[0125] In response to the task to be executed being a batch processing task, generating a task execution code for the task to be executed according to the task information, and calling a code interpreter to run the task execution code to execute the task to be executed;

[0126] Obtain the task execution result of the task to be executed.

[0127] According to one or more embodiments of the present disclosure, Example 2 is a method according to Example 1, and after receiving task information of a task to be executed, further includes:

[0128] Inputting the task information into a pre-trained target model;

[0129] In response to the task to be executed being a batch task, generating a task execution code for the task to be executed according to the task information, and calling a code interpreter to run the task execution code to execute the task to be executed, including:

[0130] In response to the task to be executed being a batch task, using the target model to generate a task execution code for the task to be executed according to the task information, and calling a code interpreter to run the task execution code to execute the task to be executed;

[0131] The obtaining the task execution result of the task to be executed includes:

[0132] The task execution result output by the target model is obtained as the task execution result of the task to be executed.

[0133] According to one or more embodiments of the present disclosure, Example 3 is a method according to Example 2, and before receiving task information of a task to be executed, further includes:

[0134] Obtaining a pre-trained original model and a fine-tuning sample set, wherein the fine-tuning sample set includes a plurality of batch processing task samples and a task execution code sample corresponding to each of the batch processing task samples;

[0135] The code generation capability of the original model is fine-tuned and trained based on the fine-tuning sample set to obtain a target model, wherein the target model has the ability to generate task execution codes for batch processing tasks.

[0136] According to one or more embodiments of the present disclosure, Example 4 is based on the method described in Example 2, wherein the target model is an artificial intelligence large model.

[0137] According to one or more embodiments of the present disclosure, Example 5 is the method according to Example 2, and before the step of generating the task execution code of the task to be executed according to the task information using the target model in response to the task to be executed being a batch task, further includes:

[0138] The target model is used to parse the task information, determine whether the task to be executed indicates batch processing of multiple objects to be processed, generate a parsing result, and determine whether the task to be executed is a batch processing task based on the parsing result.

[0139] According to one or more embodiments of the present disclosure, Example 6 is a method according to any one of Examples 1-5, further comprising:

[0140] In response to the task to be executed not being a batch processing task, a task execution environment of the task to be executed is determined according to the task information, and the task execution environment of the task to be executed is called to execute the task to be executed.

[0141] According to one or more embodiments of the present disclosure, Example 7 is based on the method described in any one of Examples 1-5, wherein the task execution code is a program code for executing the task to be executed; and / or, when the task to be executed is a batch task, the task to be executed includes multiple subtasks, and the subtasks are executed by the code interpreter calling the task execution environment of the subtask based on the task execution code.

[0142] According to one or more embodiments of the present disclosure, Example 8 is the method according to Example 7, wherein the task execution code includes a subtask processing function, and the task execution environment of the subtask is called by the subtask processing function.

[0143] According to one or more embodiments of the present disclosure, Example 9 is based on the method described in Example 8, wherein the task execution code also includes a batch source code and a subtask determination function, wherein the batch source code determines the multiple subtasks included in the task to be executed by calling the subtask determination function, and processes the subtasks by calling the subtask processing function.

[0144] According to one or more embodiments of the present disclosure, Example 10 provides a task execution device, including:

[0145] An information receiving module, used for receiving task information of tasks to be executed;

[0146] A code generation module, for generating a task execution code for the task to be executed according to the task information in response to the task to be executed being a batch task, and calling a code interpreter to run the task execution code to execute the task to be executed;

[0147] The result acquisition module is used to obtain the task execution result of the task to be executed.

[0148] According to one or more embodiments of the present disclosure, Example 11 provides an electronic device, including:

[0149] one or more processors;

[0150] a memory for storing one or more programs,

[0151] When the one or more programs are executed by the one or more processors, the one or more processors implement the task execution method as described in any one of Examples 1-9.

[0152] According to one or more embodiments of the present disclosure, Example 12 provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the task execution method described in any one of Examples 1-9.

[0153] According to one or more embodiments of the present disclosure, Example 13 provides a computer program product. When the computer program product is executed by a computer, the computer implements the task execution method described in any one of Examples 1-9.

[0154] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0155] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0156] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A task execution method, characterized in that: include: Receive task information of tasks to be executed; In response to the task to be executed being a batch processing task, generating a task execution code for the task to be executed according to the task information, and calling a code interpreter to run the task execution code to execute the task to be executed; Obtain the task execution result of the task to be executed.

2. The method according to claim 1, characterized in that After receiving the task information of the task to be executed, the method further includes: Inputting the task information into a pre-trained target model; In response to the task to be executed being a batch task, generating a task execution code for the task to be executed according to the task information, and calling a code interpreter to run the task execution code to execute the task to be executed, including: In response to the task to be executed being a batch task, using the target model to generate a task execution code for the task to be executed according to the task information, and calling a code interpreter to run the task execution code to execute the task to be executed; The obtaining the task execution result of the task to be executed includes: The task execution result output by the target model is obtained as the task execution result of the task to be executed.

3. The method according to claim 2, characterized in that Before receiving the task information of the task to be executed, the method further includes: Obtaining a pre-trained original model and a fine-tuning sample set, wherein the fine-tuning sample set includes a plurality of batch processing task samples and a task execution code sample corresponding to each of the batch processing task samples; The code generation capability of the original model is fine-tuned and trained based on the fine-tuning sample set to obtain a target model, wherein the target model has the ability to generate task execution codes for batch processing tasks.

4. The method according to claim 2, characterized in that: The target model is an artificial intelligence large model.

5. The method according to claim 2, characterized in that: Before, in response to the task to be executed being a batch processing task, using the target model to generate the task execution code of the task to be executed according to the task information, the method further includes: The target model is used to parse the task information, determine whether the task to be executed indicates batch processing of multiple objects to be processed, generate a parsing result, and determine whether the task to be executed is a batch processing task based on the parsing result.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: In response to the task to be executed not being a batch processing task, a task execution environment of the task to be executed is determined according to the task information, and the task execution environment of the task to be executed is called to execute the task to be executed.

7. The method according to any one of claims 1 to 5, characterized in that: The task execution code is a program code used to execute the task to be executed; and / or, when the task to be executed is a batch task, the task to be executed includes multiple subtasks, and the subtasks are executed by the code interpreter calling the task execution environment of the subtask based on the task execution code.

8. The method according to claim 7, characterized in that The task execution code includes a subtask processing function, and the task execution environment of the subtask is called by the subtask processing function.

9. The method according to claim 8, characterized in that The task execution code also includes a batch processing source code and a subtask determination function, wherein the batch processing source code determines a plurality of subtasks included in the task to be executed by calling the subtask determination function, and processes the subtasks by calling the subtask processing function.

10. A task execution device, characterized in that: include: An information receiving module, used for receiving task information of tasks to be executed; A code generation module, for generating a task execution code for the task to be executed according to the task information in response to the task to be executed being a batch task, and calling a code interpreter to run the task execution code to execute the task to be executed; The result acquisition module is used to obtain the task execution result of the task to be executed.

11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the task execution method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the task execution method according to any one of claims 1 to 9 when executed.

13. 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 computer program implements the task execution method according to any one of claims 1 to 9.